So I have this script that opens a servers menu, it all works pretty smoothly except when someone types “/servers” it still sends that message
Server side script:
util.AddNetworkString( 'open_servermenu' )
function chatCommand( ply, text, public )
if (string.sub(text, 1, 8) == "/servers") then -- If in chat the ply says /servers
net.Start( 'open_servermenu' )
net.Send( ply ) -- Open the menu for that player
return(false) -- Hide it from chat (Nope)
end
end
hook.Add( "PlayerSay", "chatCommand", chatCommand );