TActivePlayer.Kick

From Soldat Community Wiki
Revision as of 20:48, 23 June 2016 by Falcon (talk | contribs) (Added reason parameter)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
function Kick: Boolean(Reason: TKickReason)
 Result: if it worked
 Reason: Enum (TKickNoResponse, TKickNoCheatResponse,
 	TKickChangeTeam, TKickPing, TKickFlooding, TKickConsole,
   TKickConnectionCheat, TKickCheat, TKickLeft, TKickVoted,
   TKickAC, TKickSilent);

Description

Kicks a player from the server.
Results false if you attempt to kick an inactive ID; otherwise true.

Example

var i: byte;
begin
  for i := 1 to 32 do if Players[i].Active then
    Players[i].Kick(TKickConsole); //kicks all active players
end;