24.05.2009, 20:48
This is called when a timer ends. The timer starts when an admin types the respawn all vehicles command.
This is meant to respawn all empty vehicles.
It does, but then the server crashes.
What is wrong here?
This is meant to respawn all empty vehicles.
It does, but then the server crashes.
pawn Код:
public RespawnVeh()
{
new i, v;
while(v<=340)
{
if(i>=200){SetVehicleToRespawn(v);v++;i=0;}
if(IsPlayerConnected(i)!=1)i++;
else if(GetPlayerVehicleID(i)!=v)i++;
}
return 1;
}


. I was thinking about using an array with the vehicle IDs instead of respawning them inside the bit that checks if a player is inside them.