Код
new AntiOnFootCrash[MAX_PLAYERS char];
public OnPlayerConnect(playerid)
{
AntiOnFootCrash{playerid} = 0;
return 1;
}
public OnPlayerUpdate(playerid)
{
new Float:x, Float:y, Float:z;
GetPlayerCameraFrontVector(playerid, x, y, z);
if(floatcmp(x, -1.0) == -1 || floatcmp(x, 1.0) == 1
|| floatcmp(y, -1.0) == -1 || floatcmp(y, 1.0) == 1
|| floatcmp(z, -1.0) == -1 || floatcmp(z, 1.0) == 1)
{
if(AntiOnFootCrash{playerid};)
Kick(playerid);
else
AntiOnFootCrash{playerid}=1; //ложный вызов из-за старых данных.
return 0;
}
return 1;
}
Работает, я тестил на крмп 3е