TActivePlayer.Ban

From Soldat Community Wiki
Revision as of 16:50, 1 July 2013 by Squiddy (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
function Ban(Time: Integer; Reason: string): Boolean
 Time: period in minutes for the player to be banned
 Reason: ban reason
 Result: if it worked or not.

Description

Bans a player for a certain period.
Results false if you attempt to ban an inactive ID or an admin; true otherwise.

Example

var i: byte;
begin
  for i := 1 to 32 do if Players[i].Active then
    Players[i].Ban(5,'Get out!'); //bans all active players for 5 minutes
end;