Hello, right now I’m trying to create a command that will open my steam group’s profile for a user when they type !join in chat, this is the code I have so far:
function myCommand ( ply, text, public ) if( string.sub( text, 1, 6) == "!join" ) then gui.OpenURL("http://steamcommunity.com/groups/basedgamings") end end hook.Add( "PlayerSay" , "myCommand" , myCommand )
It wasn’t working before, there was no response to the !join command.
The questions I have are, will this code work, and where does the .lua file with the code need to be? I’m running a TTT server.