Why is this not working? Respawn Vehicles Command
#2

I'm finding it rather hard to interpret, try this:

pawn Код:
public RespawnVeh()
{
    for(new i=0; i<MAX_PLAYERS; i++)
    {
      VehicleState[GetPlayerVehicleID(i)] = 1;
    }
    for(new i=1; i<MAX_VEHICLES; i++)
    {
      if(!VehicleState[i]) SetVehicleToRespawn(i);
      else VehicleState[i] = 0;
    }
    return 1;
}
It should also require less looping, and I think it's a bit easier to understand.. If you want to use 340 instead of MAX_VEHICLES just change them..
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)