CAC_OnCheatDetect

Description

This callback is called when a player is detected as cheater.

Definition

forward CAC_OnCheatDetect(player_id, cheat_id, opt1, opt2);

Parameters

Return values

Example usage

public CAC_OnCheatDetect(player_id, cheat_id, opt1, opt2)
{
    if(cheat_id == CAC_CHEAT__MACRO_1)
    {
        if(opt1 == 0x20) // virtual key code for SPACE
        {
            new buf[128], name[MAX_PLAYER_NAME];
            GetPlayerName(player_id, name, sizeof(name));
            format(buf, sizeof(buf), "Detected SPACE macro. Name: %s [ID: %i]", name, player_id);
            SendClientMessageToAll(-1, buf);
        }
    }
    return 1;
}

Remarks