24.09.2013, 02:23
Linha:
O que pode ser?
Public completa:
PHP Code:
VerificarVeiculoCrashado(playerid, GetPlayerVehicleID(playerid));
Public completa:
PHP Code:
public OnPlayerUpdate(playerid)
{
new Float:pos[3], Float: x,Float:y,Float:z; GetPlayerCameraFrontVector(playerid,x,y,z);
GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
if(pos[0] >= 10000000.000000 || pos[1] >= 10000000.000000 || pos[2] >= 1410065408.000000)
{
if(IsPlayerInAnyVehicle(playerid))
{
VerificarVeiculoCrashado(playerid, GetPlayerVehicleID(playerid));
}
GameTextForPlayer(playerid, "Retornando a tela inicial", 10000, 5);
SetPlayerPos(playerid, 0.0, 0.0, 0.0);
SpawnPlayer(playerid);
}
if(((-1.0 <= x <1.0) && (-1.0 <= y <1.0) && (-1.0 <= z <1.0)) == false)
{
if(FirstKick{playerid})
{
Kick(playerid);
}
else
{
FirstKick{playerid} = 1;
}
return 0;
}
if (GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
{
new Float:vec[3];
GetPlayerCameraFrontVector(playerid, vec[0], vec[1], vec[2]);
new bool:possible_crasher = false;
for (new i = 0; !possible_crasher && i < sizeof(vec); i++)
if (floatabs(vec[i]) > 10.0)
possible_crasher = true;
if (possible_crasher)
return 0; //do not send fake data, prevents crash
}
AlertaRe(playerid);
IsVehicleDrivingBackwards(GetPlayerVehicleID(playerid));
return 0x01;
}