15.07.2015, 09:14
PHP код:
public OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat)
{
GetVehiclePos(vehicleid, g_ucPos[0], g_ucPos[1], g_ucPos[2]);// this get vehicle id position
if(!IsPlayerInRangeOfPoint(playerid, 40.0, g_ucPos[0], g_ucPos[1], g_ucPos[2]))// this check if players is not in range of that vehicle respawn it
{
if(!IsPlayerInAnyVehicle(playerid))
{
SetVehicleToRespawn(vehicleid); //this will respawn it // but problem is it keep respawning that vehicle or vehicle in that range.
}
}
return 1;
}