/fuelcars not working ?
#1

When you want to fill one car it works fine, but when fueling all it doesnt work
pawn Код:
if(strcmp(cmd, "/fill", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(IsAtGasStation(playerid))
            {
                GameTextForPlayer(playerid,"~w~~n~~n~~n~~n~~n~~n~~n~~n~~n~Re-Fueling Vehicle, please wait",2000,3);
                SetTimer("Fillup",5000,0);
                Refueling[playerid] = 1;
            }
            else
            {
                SendClientMessage(playerid,COLOR_GREY,"   You are not at a Gas Station !");
            }
        }
        return 1;
    }
pawn Код:
if(strcmp(cmd, "/fuelcars", true) == 0 && PlayerInfo[playerid][pAdmin] >= 2)
    {
        if(IsPlayerConnected(playerid))
        {
            for(new v = 0; v < MAX_PLAYERS; v++)
            {
                Refueling[v] = 1;
                format(string, sizeof(string), "AdmWarning: %s has refueled all vehicles",PlayerName(playerid));
                ABroadCast(COLOR_YELLOW,string,1);
                return 1;
            }
        }
        return 1;
    }
Reply
#2

try MAX_VEHICLES instead of MAX_PLAYERS
Reply
#3

Do you have a Fuel System like
pawn Код:
Gas[v]
because your thing is setting all cars to refueling, or something.
Reply
#4

Why MAX_PLAYER ?
Reply
#5

in /fill i saw Refueling[playerid]
so in /fuelcars i made Refueling all players id
Reply
#6

No you have to put the variable that is in "Fillup" and add it in the command instead of Refueling[v] = 1;
Reply
#7

show public Fillup().
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)