[SOLVED] Respawning vehicles
#10

Quote:
Originally Posted by dice7
Try
pawn Код:
forward RespawnEmptyCars();
public RespawnEmptyCars()
{
    for(new i = 1; i<MAX_VEHICLES; i++)
    {
        if(!IsVehicleOccupied(i))
        {
            if(GetVehicleModel(i))
            {
                SetVehicleToRespawn(i);
            }
        }
    }
}
so you wont respawn invalid ids
Thank you for your reply, but still the same.
Quote:
Originally Posted by MadeMan
Try this debug:

pawn Код:
forward RespawnEmptyCars();
public RespawnEmptyCars()
{
  for(new i; i<MAX_VEHICLES; i++)
  {
    printf("nr. %i is called", i);
    if(!IsVehicleOccupied(i))
    {
      SetVehicleToRespawn(i);
    }
  }
  return 1;
}
Thank you for your reply, now the serverlog says it has called from 1 to 2000 cars

EDIT: 1 to 18
Reply


Messages In This Thread
[SOLVED] Respawning vehicles - by KnooL - 13.01.2010, 17:16
Re: [UNSOLVED] Respawning vehicles - by KnooL - 14.01.2010, 16:17
Re: [UNSOLVED] Respawning vehicles - by Fedee! - 14.01.2010, 16:23
Re: [UNSOLVED] Respawning vehicles - by KnooL - 14.01.2010, 16:25
Re: [UNSOLVED] Respawning vehicles - by oncedead - 14.01.2010, 16:28
Re: [UNSOLVED] Respawning vehicles - by Badger(new) - 14.01.2010, 17:08
Re: [UNSOLVED] Respawning vehicles - by KnooL - 14.01.2010, 18:03
Re: [UNSOLVED] Respawning vehicles - by dice7 - 14.01.2010, 18:06
Re: [UNSOLVED] Respawning vehicles - by MadeMan - 14.01.2010, 18:07
Re: [UNSOLVED] Respawning vehicles - by KnooL - 14.01.2010, 18:12

Forum Jump:


Users browsing this thread: 2 Guest(s)