07.12.2010, 15:56
(
Последний раз редактировалось NotoriousMOB; 07.12.2010 в 21:19.
)
I made a timer so all vehicles respawn automatic every hour.
but there's a problem it also respawns iff Player is in a vehicle heres how it looks like:
but there's a problem it also respawns iff Player is in a vehicle heres how it looks like:
pawn Код:
SetTimer("SetVehicleRespawn",50000,1);
//////////////////////////////////////////////
stock IsAnyPlayerInVehicle(vehicleid)
{
for (new i = 0; i != MAX_PLAYERS; i++)
{
if (IsPlayerInVehicle(i, vehicleid)) return 1;
}
return 0;
}
//////////////////////////////////////////////
public SetVehicleRespawn()
{
for(new car = 1; car <= 268; car++)
{
if(!IsPlayerInAnyVehicle(car)) SetVehicleToRespawn(car);
}
SendClientMessageToAll(COLOR_WHITE,"All vehicles has been respawned!");
}
//////////////////////////////////////////////