24.04.2011, 23:52
Can anyone show me how to make a /respawnallcars command (ALSO, they must be unused!)
Thanks
Thanks
if (strcmp("/respawnallvehicles", cmdtext, true, 10) == 0) { for(new cars=0; cars<MAX_VEHICLES; cars++) { if(!VehicleOccupied(cars)) { SetVehicleToRespawn(cars); RepairVehicle(cars); } } return 1; } |
forward VehicleOccupied(vehicleid); public VehicleOccupied(vehicleid) { for(new i=0;i<MAX_PLAYERS;i++) { if(IsPlayerInVehicle(i,vehicleid)) return 1; } return 0; } |