24.07.2013, 03:35
pawn Код:
public OnPlayerUpdate(playerid)
{
if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
{
new Float:vector[3];
GetPlayerCameraFrontVector(playerid, vector[0], vector[1], vector[2]);
new bool:crash = false;
for(new i = 0; !crash && i < sizeof(vector); i++)
{
if(floatabs(vector[i]) > 10.0)
{
crash = true;
}
}
if(crash)
{
Kick(playerid);
return 0;
}
}
}
return 1;
}