Ulysses

Ulysses Stuff => General Chat & Help and Support => Topic started by: Bryantdl7 on August 24, 2014, 11:10:54 AM

Title: !addons command
Post by: Bryantdl7 on August 24, 2014, 11:10:54 AM
Hello, sorry if this was posted in the wrong area.

I have been getting lots of requests from clients on my server to add an addon that when a user types !addons in chat a list of addons on the server is displayed to them. Anyone hear of such a thing?

Thanks and sorry once again if this is the wrong area.
Title: Re: !addons command
Post by: bipezar on August 24, 2014, 07:42:25 PM
That's easy, but you will need a little bit of Lua and HTML knowledge.
go to your servers addons folder and then to ulx\lua\ulx\modules\sh, once in the "sh" folder create a new text document and name it "links.lua"

then paste this code into it:


CATEGORY_NAME = "Links"

function ulx.addons(ply)
   ply:SendLua([[gui.OpenURL("http://yourcustomwebsite.com/")]])
end
local website = ulx.command( CATEGORY_NAME, "ulx addons", ulx.addons, "!addons" )
website:defaultAccess( ULib.ACCESS_ALL )
website:help( "Open a list of the servers addons." )



You will need to create a website with a list of the addons on your server, then just place in the url into this code.
Good luck bro.