[HELP] fuel problem
#1

I have that problem, when I stay in my car and don't move with it, my fuel starts to get up
Example:

I have 100% of fuel
and in next 5 minut I have 105%

I don't know why, maybe this can help...
pawn Код:
public CheckGas()
{
    new string[256];
    for(new i=0;i<MAX_PLAYERS;i++)
    {
        if(IsPlayerConnected(i))
        {
            if(GetPlayerState(i) == PLAYER_STATE_DRIVER)
            {
                new vehicle = GetPlayerVehicleID(i);
                if(Gas[vehicle] >= 1)
                {
                    if(Gas[vehicle] <= 10)
                    {
                        PlayerPlaySound(i, 1085, 0.0, 0.0, 0.0);
                        if(gGas[i] == 0) {
                            GameTextForPlayer(i,"~w~~n~~n~~n~~n~~n~~n~~n~~n~~n~Fuel is low",5000,3);
                        }
                    }
                    if(gGas[i] == 1) {
                    if(IsAPlane(vehicle) || IsABoat(vehicle) || IsABike(vehicle) || IsAHarvest(vehicle) || IsADrugHarvest(vehicle) || IsASweeper(vehicle))
                    {
                        format(string, sizeof(string), "~b~~n~~n~~n~~n~~n~~n~~n~~n~~n~Fuel:~w~ N/A");
                    }
                    else
                    {
                        format(string, sizeof(string), "~b~~n~~n~~n~~n~~n~~n~~n~~n~~n~Fuel:~w~ %d%",Gas[vehicle]);
                    }
                    GameTextForPlayer(i,string,20500,3); }
                    if(IsAPlane(vehicle) || IsABoat(vehicle) || IsABike(vehicle) || IsAHarvest(vehicle) || IsADrugHarvest(vehicle) || IsASweeper(vehicle) || engineOn[vehicle] == 0) { Gas[vehicle]++; }
                    Gas[vehicle]--;
                }
                else
                {
                    NoFuel[i] = 1;
                    TogglePlayerControllable(i, 0);
                    GameTextForPlayer(i,"~w~~n~~n~~n~~n~~n~~n~~n~~n~~n~No fuel in Vehicle",1500,3);
                }
            }
        }
    }
    return 1;
Does anyone know this problem?
Reply
#2

Try changing:
pawn Код:
Gas[vehicle]++;
To
pawn Код:
Gas[vehicle]--;
Reply
#3

I think delete will be better, but thx
Reply
#4

no delete doesn't work

EDIT: Works!! I deleted it shitly..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)