26.12.2015, 23:00
1. If I'm looping through the players, it's good sense that I check if the current id is connected.
2. I may have misinterpreted what you said. I thought you wanted to destroy the spawned vehicles even if they're occupied.
2. I may have misinterpreted what you said. I thought you wanted to destroy the spawned vehicles even if they're occupied.
PHP код:
for(new p = GetPlayerPoolSize(); p > -1; --p) {
if(IsPlayerConnected(p)) {
if(IsValidVehicle(PlayerInfo[p][pSpawnVehicle])) {
if(!VehicleOccupied(PlayerInfo[p][pSpawnVehicle])) {
DestroyVehicle(PlayerInfo[p][pSpawnVehicle]);
}
}
}
}