So easy mate, this is w hat you need to do. Your using ULX? Because this works for ULX, you also need a bit of lua experience for this to work. follow this path in the ULX Files
ulx/lua/ulx/modules/cl/motdmenu.lua
That is the file you need to edit in order to add more buttons like Donation and Forum Button.
How to start.
this is how you add a simple button onto your derma Window
Code: Select all
local html = vgui.Create( "HTML", window) -- this is given already in the MOTD derma config but if --you are making something from scratch good idea to add it and localize it.
local don = vgui.Create( "DButton", window ) -- what that does is localize that DON means Create ----button and it is apart of the Derma window named as window
don:SetText( "Donation Button" )
don:Size( 50, 100 )
-- the don:Size sets the length of the button and the height of the actual button no were to move it.
SetPose( ( window:GetWide() - don:GetWide()) /2, window:GetTall() - don:GetTall:GetTall() - 10 )
-- what SetPose does is simply sets the position of the button on your derma window.
don.DoClick = function()
html:OpenURL( " the link of your Donation page on your forums goes here!" )
end
don:SetParent( window ) -- when you close the main derma page the button will close as well.
that is how you create a simple button. you can do alot more as well but I gave you the simple findings of how to make one. enjoy.