Some help Respawn car timer
#1

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:

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!");
}
//////////////////////////////////////////////
Reply


Messages In This Thread
CarRespawn - by NotoriousMOB - 07.12.2010, 15:56
Re: Some help Respawn car timer - by NotoriousMOB - 07.12.2010, 21:17
Re: Some help Respawn car timer - by TheXIII - 07.12.2010, 22:09
Re: Some help Respawn car timer - by NotoriousMOB - 07.12.2010, 22:19
Re: Some help Respawn car timer - by TheXIII - 07.12.2010, 23:07
Re: Some help Respawn car timer - by NotoriousMOB - 07.12.2010, 23:17
Re: Some help Respawn car timer - by TheXIII - 07.12.2010, 23:43
Re: Some help Respawn car timer - by NotoriousMOB - 07.12.2010, 23:54

Forum Jump:


Users browsing this thread: 1 Guest(s)