On my TTT server we have a few people who can not get along with each other but are otherwise are fine players, in particular is a player(STEAM_0:1:5057813) who has been terrorizing a girl(STEAM_0:0:6037899) who also plays on the server (note that I have altered the ids).
This code is designed to be placed in the autorun folder and scan every time someone joins first to see if she is on the server and, if so, to scan for him and kick him. Unfortunately it does not work and does not return an error, can anyone point out what I'm doing wrong?
function CheckQ( ply ) for _, v in pairs(player.GetAll()) do if v:SteamID() = STEAM_0:0:6037899 then for _, z in pairs(player.GetAll()) do if z:SteamID() = STEAM_0:1:5057813 then z:Kick("Oil and water, you two can't play together.") end end end end end hook.Add( "PlayerConnect", "playerconnect", CheckQ )