21.05.2009, 22:41
i changed it to go a different way, but now the server crashes. It respawns all vehicles except ones with players in but then no-one can join the server, although it is still online and it shows that players are connected, when they aren't.
Here is the code:
i think it may be because I have:
lots of those so the vehicle ID would be whatever i have infront right?
Here is the code:
pawn Код:
public RespawnVeh()
{
new v;
new i;
while(v<340)
{
if(i>=200){SetVehicleToRespawn(v);v++;i=0;}
if(IsPlayerConnected(i)!=1)i++;
else if(!IsPlayerInVehicle(i,v))i++;
}
i=0;
v=0;
return 1;
}
pawn Код:
BV[0]=CreateVehicle(//etc);