14.02.2014, 16:29
You can use this also, It doesn't spawn NPC vehicles
Код:
if(strcmp(cmd, "/RespawnAllCars", true) == 0 || strcmp(cmd, "/RAC", true) == 0) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pAdmin] < 3) { SendClientMessage(playerid, COLOR_GRAD1, " you are not authorized to use that 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 <= 268; car++) { if(!unwanted[car]) SetVehicleToRespawn(car); } GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "SERVER: "COL_WHITE"All unused vehicles were respawned by Administrator %s.", sendername); SendClientMessageToAll(COLOR_YELLOW,string); } return 1; }