Respawn Empty Cars
#5

Or you can use...

pawn Код:
if(strcmp(cmd, "/respawnallcars", true) == 0 || strcmp(cmd, "/rac", true) == 0) // by TyreXel
    {
      if(IsPlayerConnected(playerid))
      {
        if(PlayerInfo[playerid][pAdmin] < 1337)
            {
              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 <= 500; car++)
            {
                if(!unwanted[car]) SetVehicleToRespawn(car);
            }
            GetPlayerName(playerid, sendername, sizeof(sendername));
            format(string, sizeof(string), " All unused cars have been respawned by administrator %s.", sendername);
            BroadCast(COLOR_WHITE,string);
        }
        return 1;
    }
Reply


Messages In This Thread
Respawn Empty Cars - by Beaver07 - 13.10.2009, 16:01
Re: Respawn Empty Cars - by (.Aztec); - 13.10.2009, 16:09
Re: Respawn Empty Cars - by woot - 13.10.2009, 16:11
Re: Respawn Empty Cars - by Beaver07 - 13.10.2009, 16:25
Re: Respawn Empty Cars - by tunetu - 13.10.2009, 16:27
Re: Respawn Empty Cars - by (.Aztec); - 13.10.2009, 17:43

Forum Jump:


Users browsing this thread: 1 Guest(s)