CAC_OnPlayerKick

Description

This callback is called when a player is kicked by SAMPCAC plugin.

Definition

forward CAC_OnPlayerKick(player_id, reason_id);

Parameters

Return values

Example usage

public CAC_OnPlayerKick(player_id, reason_id)
{
    static const szKickReasons[][] = {"Connection issue", "Version not compatible"};
    new buf[128], name[MAX_PLAYER_NAME] = "[UNKNOWN]";
    if(IsPlayerConnected(player_id))
        GetPlayerName(player_id, name, sizeof(name));
    format(buf, sizeof(buf), "%s [ID: %i] has been kicked by SAMPCAC, reason: %s", name, player_id, szKickReasons[reason_id]);
    SendClientMessageToAll(-1, buf);
    return 1;
}

Remarks