13.07.2011, 22:52
Код:
if(strcmp(cmd, "/respawnallcars", true) == 0 || strcmp(cmd, "/rac", true) == 0) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pAdmin] < 2) { SendClientMessage(playerid, 0x639EC5FF, "You are not authorized to use this command."); return 1; } new bool:unwanted[CAR_AMOUNT]; for(new player=0; player<MAX_PLAYERS; player++) { if(IsPlayerInAnyVehicle(player)) { unwanted[GetPlayerVehicleID(player)]=true; } } for(new car = 1; car <= 500; car++) { if(!unwanted[car]) SetVehicleToRespawn(car); } GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "All unused cars has been respawned by administrator %s",sendername); SendClientMessageToAll(COLOR_RED,string); } return 1; }