Код:
public OnPlayerUpdate(playerid)
{
if(!Player[playerid][onDuty])
updateWanted(playerid);
if(Player[playerid][onDerby])
{
new Float:x, Float:y, Float:z, msg[256];
format(msg, sizeof(msg), "%s is falled from the map.", GetName(playerid));
GetPlayerPos(playerid, x, y, z);
if(z < -1.00)
{
foreach(new i : Player)
{
if(Player[i][onDerby])
Info(i, msg);
}
loadData(playerid);
Player[playerid][onDerby] = false;
}
}
if(Player[playerid][onFallout])
{
new Float:x, Float:y, Float:z, msg[512];
format(msg, sizeof(msg), "%s has dropped out of Fallout event.", GetName(playerid));
GetPlayerPos(playerid, x, y, z);
if(z < 2.00)
{
foreach(new i : Player)
{
if(Player[i][onFallout])
Info(i, msg);
}
loadData(playerid);
SetCameraBehindPlayer(playerid);
Player[playerid][onFallout] = false;
}
}
if(GetPVarInt(playerid,"YEAH") == 1)
{
new
Float:VPos[3],
Float:Rotation
;
GetVehiclePos(GetPlayerVehicleID(playerid), VPos[0], VPos[1], VPos[2]);
Rotation = PointAngle(playerid, VPos[0], VPos[1], GetPVarFloat(playerid, "Spongebob"), GetPVarFloat(playerid, "Mario"));
if(!Player[playerid][truckingMission])
AttachObjectToVehicle(GPSObject[playerid], GetPlayerVehicleID(playerid), 0.0, 0.0, 1.5, 0.0, 90.0, Rotation);
else
AttachObjectToVehicle(GPSObject[playerid], GetPlayerVehicleID(playerid), 0.0, 0.0, 3.5, 0.0, 90.0, Rotation);
}
return 1;
}
Thats mine OnPlayerUpdate.