21.05.2009, 00:48
hi. I attempted a command that respawns all vehicles. The command itself works, but all vehicles get respawned and then the server crashes.
I tried to get it to only respawn empty vehicles. Here is the code in the timer:
What have I done wrong here, or is this way which I've done not possible?
I tried to get it to only respawn empty vehicles. Here is the code in the timer:
pawn Код:
public RespawnVeh()
{
for(new v=0; v<MAX_VEHICLES; v++)
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerInVehicle(i,v)){}
else SetVehicleToRespawn(v);
}
}
return 1;
}