BanClient

Last Updated2007-09-14
Created At2007-09-14

Bans a client.

native bool BanClient(int client, int time, int flags, const char[] reason, const char[] kick_message = "", const char[] command = "", any source = 0)

Parameters

int client
Client being banned.
int time
Time (in minutes) to ban (0 = permanent).
int flags
Flags for controlling the ban mechanism. If AUTHID is set and no AUTHID is available, the ban will fail unless AUTO is also flagged.
const char[] reason
Reason to ban the client for.
const char[] kick_message
Message to display to the user when kicking.
const char[] command
Command string to identify the source. If this is left empty, then the OnBanClient forward will not be called.
any source
A source value that could be interpreted as a player index of any sort (not actually checked by Core).

Return Value

bool True on success, false on failure.

Error

Invalid client index or client not in game.