[Help] /rac dont work
#1

ok the cmd /rac dont work
for me have this
pawn Код:
for(new h = 195; h < sizeof(CarInfo); h++)
    {
        AddStaticVehicleEx(CarInfo[h][cModel],CarInfo[h][cLocationx],CarInfo[h][cLocationy],CarInfo[h][cLocationz]+1.0,CarInfo[h][cAngle],CarInfo[h][cColorOne],CarInfo[h][cColorTwo],60000);
    }
    LinkVehicleToInterior(95, 7);
    LinkVehicleToInterior(96, 7);
    LinkVehicleToInterior(97, 7);
    LinkVehicleToInterior(98, 7);
    LinkVehicleToInterior(99, 4);
    LinkVehicleToInterior(200, 4);
    LinkVehicleToInterior(201, 4);
    LinkVehicleToInterior(202, 4);
    LinkVehicleToInterior(203, 14);
    LinkVehicleToInterior(204, 14);
    LinkVehicleToInterior(205, 14);
    LinkVehicleToInterior(206, 14);
    LinkVehicleToInterior(207, 14);
oringinal it was
pawn Код:
for(new h = 184; h < sizeof(CarInfo); h++)
    {
        AddStaticVehicleEx(CarInfo[h][cModel],CarInfo[h][cLocationx],CarInfo[h][cLocationy],CarInfo[h][cLocationz]+1.0,CarInfo[h][cAngle],CarInfo[h][cColorOne],CarInfo[h][cColorTwo],60000);
    }
    LinkVehicleToInterior(84, 7);
    LinkVehicleToInterior(85, 7);
    LinkVehicleToInterior(86, 7);
    LinkVehicleToInterior(87, 7);
    LinkVehicleToInterior(88, 4);
    LinkVehicleToInterior(89, 4);
    LinkVehicleToInterior(90, 4);
    LinkVehicleToInterior(91, 4);
    LinkVehicleToInterior(92, 14);
    LinkVehicleToInterior(93, 14);
    LinkVehicleToInterior(94, 14);
    LinkVehicleToInterior(95, 14);
    LinkVehicleToInterior(96, 14);
and /rac cmd is
pawn Код:
if(strcmp(cmd, "/respawnallcars", true) == 0 || strcmp(cmd, "/rac", true) == 0) // by Ellis
    {
      if(IsPlayerConnected(playerid))
      {
        if(PlayerInfo[playerid][pAdmin] < 3)
            {
              SendClientMessage(playerid, COLOR_GRAD1, "  Sa ei saa seda veel kasutada!");
              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 <= 310; car++)
            {
                if(!unwanted[car]) SetVehicleToRespawn(car);
            }
            GetPlayerName(playerid, sendername, sizeof(sendername));
            format(string, sizeof(string), "SERVER: All unused cars respawned by %s.", sendername);
            BroadCast(COLOR_WHITE,string);
        }
        return 1;
    }
Whats is problem?
Reply
#2

im not sure but mabye problem is because that
Код:
new CarInfo[384][cInfo];
number 384 = ammount of your server all vehicles . just cars + ownables.

Reply
#3

Quote:
Originally Posted by Peep
im not sure but mabye problem is because that
Код:
new CarInfo[384][cInfo];
number 384 = ammount of your server all vehicles . just cars + ownables.
Server say-s that unknown command.
It respawn all cars what come in gamemode but not what come to file.
Reply
#4

SOLVED I have
#define CAR_AMOUNT 100
put have to be
#define CAR_AMOUNT 700
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)