31.03.2014, 21:14
tu problema esta aca DestroyVehicle(i); deberia ser asi DestroyVehicle(autos[i]);
borrara los vehiculos sin jugador en el vehiculo.
borrara los vehiculos con jugador en el vehiculo.
borrara los vehiculos sin jugador en el vehiculo.
pawn Код:
CMD:borrarautos(playerid,params[]){
for(new player; player< GetMaxPlayers(); player++){
if(!IsPlayerConnected(player)) continue;
if(autos[player] < 1) continue;
if(IsPlayerInVehicle(player, autos[player])) continue;
DestroyVehicle(autos[player]);
}
return true;
}
pawn Код:
CMD:borrarautos(playerid,params[]){
for(new player; player< GetMaxPlayers(); player++){
if(!IsPlayerConnected(player)) continue;
if(autos[player] < 1) continue;
if(!IsPlayerInVehicle(player, autos[player])) continue;
DestroyVehicle(autos[player]);
}
return true;
}