02.01.2012, 14:42
Code:
CMD:rac(playerid, params[]) { if(!IsAdmin(playerid, 1)) return SendClientMessage(playerid, COLOR_RED, "You are not admin!"); new bool:vehicleused[MAX_VEHICLES]; for(new i=0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i) && IsPlayerInAnyVehicle(i)) { vehicleused[GetPlayerVehicleID(i)] = true; } } for(new i=1; i < MAX_VEHICLES; i++) { if(!vehicleused[i]) { SetVehicleToRespawn(i); } } new msg[128]; format(msg, sizeof(msg), "Admin %s (%d) has respawned all unused vehicles", PlayerName(playerid), playerid); SendClientMessageToAll(COLOR_YELLOW, msg); return 1; }