suhrab_mujeeb
Unregistered
Quote:
Originally Posted by SomebodyAndMe
Nope, still respawning cars when a guy is inside it. Damn thing.
|
Quote:
Originally Posted by suhrab_mujeeb
pawn Код:
// Top of script forward PlayerInCar(vehicleid);
// ZCMD command, anywhere in the script not under a function or callback CMD:respawnvehicles(playerid,params[]) { vehicles<MAX_VEHICLES; vehicles++) { if(!PlayerInCar(vehicles)) { SetVehicleToRespawn(vehicles); } } return 1; } else return 0; } // Bottom of the script public PlayerInCar(vehicleid) { for(new i=0;i<MAX_PLAYERS;i++) { if(IsPlayerInVehicle(i,vehicleid)) return 1; } return 0; }
EDIT: funky was very fast. I recommend using his code rather than mine.
|
Have you tried this?