22.08.2012, 01:06
Код:
CMD:rac(playerid, params[]) { if (PlayerInfo[playerid][pAdmin] >= 2) { new string[128]; new bool:unwanted[MAX_VEHICLES]; for(new player=0; player<MAX_PLAYERS; player++) { if(IsPlayerInAnyVehicle(player)) { unwanted[GetPlayerVehicleID(player)]=true; } } for(new car = 1; car <= 1850; car++) { if(!unwanted[car]) SetVehicleToRespawn(car); } SendClientMessageEx(playerid, COLOR_GREY, "You have respawned all unused vehicles."); format(string, sizeof(string), "{AA3333}AdmWarning{FFFF00}: %s has just respawned all unused cars.", GetPlayerNameEx(playerid)); ABroadCast(COLOR_YELLOW, string, 1); } else { SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use that command!"); } return 1; }