BanClient Function

Bans a client.

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

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

True on success, false on failure.

Errors

Invalid client index or client not in game.