Hi, i have a little bit of code i edited from another post here, and i had a member try it and it didnt work. Little help?
hook.Add( "PlayerSay", "TTN Chat Commands", function(ply, text)
if (string.lower(text) == "!purebuild" ) then --Did the player say the specific command?
ply:SendLua("LocalPlayer():ConCommand('connect 192.223.29.20:27015')")
return "" --Keeps chat box from printing command
end
if (string.lower(text) == "!buildkill" ) then --Did the player say the specific command?
ply:SendLua("LocalPlayer():ConCommand('connect 192.223.29.40:27015')")
return "" --Keeps chat box from printing command
end
if (string.lower(text) == "!prophunt" ) then --Did the player say the specific command?
ply:SendLua("LocalPlayer():ConCommand('connect 74.91.114.71:27015')")
return "" --Keeps chat box from printing command
end
end)