17.08.2017, 23:54
Detector ESC/AFK
Modo de uso:
PHP Code:
new AFK[MAX_PLAYERS];
public OnPlayerUpdate(playerid)
{
AFK[playerid] = gettime();
return 1;
}
IsPlayerESC(playerid)
{
if(gettime() - AFK[playerid] > 3)
{
return 1;
}
return 0;
}
PHP Code:
CMD:command(playerid)
{
if(IsPlayerESC(playerid)) return SendClientMessage(playerid, -1, "Vocк nгo pode usar isso de esc");
SendClientMessage(playerid, -1, "Exito");
return 1;
}