Already an hour trying to figure out what's wrong with the code...
hook.Add( "OnPlayerChat", "HelloCommand", function( ply, strText, bTeam, bDead )
strText = string.lower( strText ) -- make the string lower case
if ( strText == "1" ) then -- if the player typed /hello then
ply:Kill()
return true -- this suppresses the message from being shown
end
end )
GM/OnPlayerChat is clientside and you can onl use Player/Kill serverside.
Sorry, you need to Log In to post a reply to this thread.