24.10.2010, 17:36
copy and paste this and then you only need a command with RespawnEmptyCars(); in it
Код:
RespawnEmptyCars(); public RespawnEmptyCars() { for(new i=0; i<MAX_VEHICLES; i++) { for(new pl = 0; pl<MAX_PLAYERS; pl++) { if(IsPlayerConnected(pl)) { if(!IsVehicleInUse(i))//if(!IsPlayerInVehicle(pl, i)) { SetVehicleToRespawn(i); } } } } } stock IsVehicleInUse(vehicleid) { for(new i=0; i<GetMaxPlayers(); i++) { if(IsPlayerConnected(i)) { if(GetPlayerVehicleID(i) == vehicleid) return true; } } return false; }