Greetings.
I have this piece of lua code working perfectly, basically it opens a recruitment window when typing !joinsgx:
function joinsgxCommand( pl, text, teamonly )
if (text == "!joinsgx") then
pl:SendLua([[gui.OpenURL("http://sg-x.info/recruitment")]]) -- Change ADDRESS to your chosen page.
end
end
hook.Add( "PlayerSay", "Chat", joinsgxCommand )
Now, I want to add another chat command for getting a list of addons the server is using when typing !addons
function getaddonsCommand( pl, text, teamonly )
if (text == "!addons") then
pl:SendLua([[gui.OpenURL("http://steamcommunity.com/sharedfiles/filedetails/?id=139301267")]]) -- Change ADDRESS to your chosen page.
end
end
hook.Add( "PlayerSay", "Chat", getaddonsCommand )
But when I type in !addons nothing happens, why? How come !joinsgx works but not !addons? I changed the function variable (or whatever it is called) so they are not the same.
Excuse my noob-skill in lua coding, I got this code from somewhere else and I edited it to fit my needs. any help appreciated!