Ulysses
General => Developers Corner => Topic started by: elfnet_gaming on July 25, 2018, 11:22:12 PM
-
Ok so I got this code
CATEGORY_NAME = "Our Community"
//Our Website
function ulx.website(ply)
ply:SendLua([[gui.OpenURL("URL your website Here")]])
end
local website = ulx.command( CATEGORY_NAME, "visit website", ulx.website, "!website" )
website:defaultAccess( ULib.ACCESS_ALL )
website:help( "Displays our Website." )
// Youtube Channel
function ulx.youtube(ply)
ply:SendLua([[gui.OpenURL("URL to your Youtube channel here")]])
end
local youtube = ulx.command( CATEGORY_NAME, "visit youtube", ulx.youtube, "!youtube" )
twitter:defaultAccess( ULib.ACCESS_ALL )
twitter:help( "Visit our Youtube Channel." )
What I want to do here is have this where I can change the URL for this button via the admin level panel in ULX. Is that possible?
Thanks guys
-
No, I don't think there's a way to add more data fields to the XGUI menu. Stickly can correct me on this if I'm wrong..
-
I've long since forgotten where, but Stickly has discussed this here somewhere before.
That being said, you MIGHT be able to figure out the way XGUI adds a URL input line by actually looking into the code.
https://github.com/TeamUlysses/ulx/blob/b3815da088ed03b880a29dfd3dae309d1679471d/lua/ulx/xgui/settings/server.lua#L592
There's lots of other code in that file that allows for input also. May wish to compare them (gimps, adverts, etc)