[Help] So many errors!!! Fuel Bar
#3

Sorry for double posting, although

SetProgressBarValue(gGas[playerid], gas);

That dosent require a variable there? doesnt it?

You might as well put SetProgressBarValue(playerid, gas);
and with your gGas[vehicle] var, make it like

new gGas[MAX_VEHICLES];

then through that make a loop

pawn Код:
#define LoopVehicles(%1)  for(new %1=0; %1<MAX_VEHICLES; %1++)
pawn Код:
public BenzinUpdate()
{
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
               LoopVehicles(a) {
            new vehicle = GetPlayerVehicleID(i);
            if(IsPlayerInAnyVehicle(i) == 1)
            {
                if(gGas[vehicle] >= 0 && gGas[vehicle] <= 3)
                {
                    SetProgressBarValue(gas, 0.0);
                    ShowProgressBarForAll(gas);
                    TogglePlayerControllable(i, 0);
                }
                else if(gGas[vehicle] >= 0 && gGas[vehicle] <= 10)
                {
                    SetProgressBarValue(gas, 10.0);
                    ShowProgressBarForAll(gas);
                }
                else if(gGas[vehicle] >= 10 && gGas[vehicle] <= 20)
                {
                    SetProgressBarValue(gas, 20.0);
                    ShowProgressBarForAll(gas);
                }
                else if(gGas[vehicle] >= 20 && gGas[vehicle] <= 30)
                {
                    SetProgressBarValue(gas, 30.0);
                    ShowProgressBarForAll(gas);
                }
                else if(gGas[vehicle] >= 30 && gGas[vehicle] <= 40)
                {
                    SetProgressBarValue(gas, 40.0);
                    ShowProgressBarForAll(gas);
                }
                else if(gGas[vehicle] >= 40 && gGas[vehicle] <= 50)
                {
                    SetProgressBarValue(gas, 50.0);
                    ShowProgressBarForAll(gas);
                }
                else if(gGas[vehicle] >= 50 && gGas[vehicle] <= 60)
                {
                    SetProgressBarValue(gas, 60.0);
                    ShowProgressBarForAll(gas);
                }
                else if(gGas[vehicle] >= 60 && gGas[vehicle] <= 70)
                {
                    SetProgressBarValue(gas, 70.0);
                    ShowProgressBarForAll(gas);
                }
                else if(gGas[vehicle] >= 70 && gGas[vehicle] <= 80)
                {
                    SetProgressBarValue(gas, 80.0);
                    ShowProgressBarForAll(gas);
                }
                else if(gGas[vehicle] >= 80 && gGas[vehicle] <= 90)
                {
                    SetProgressBarValue(gas, 90.0);
                    ShowProgressBarForAll(gas);
                }
                else if(gGas[vehicle] >= 90 && gGas[vehicle] <= 100)
                {
                    SetProgressBarValue(gas, 100.0);
                    ShowProgressBarForAll(gas);
                }
            }
                    }
        }
    }
    return 1;
}
Then after replace all gGas[vehicle] with gGas[a]
Reply


Messages In This Thread
[Help] So many errors!!! Fuel Bar - by drewcasey24 - 24.01.2011, 03:25
Re: [Help] So many errors!!! Fuel Bar - by Lorenc_ - 24.01.2011, 03:33
Re: [Help] So many errors!!! Fuel Bar - by Lorenc_ - 24.01.2011, 06:21
Re: [Help] So many errors!!! Fuel Bar - by drewcasey24 - 24.01.2011, 07:13
Re: [Help] So many errors!!! Fuel Bar - by Lorenc_ - 24.01.2011, 07:56
Re: [Help] So many errors!!! Fuel Bar - by HyperZ - 24.01.2011, 08:06
Re: [Help] So many errors!!! Fuel Bar - by iggy1 - 24.01.2011, 08:06
Re: [Help] So many errors!!! Fuel Bar - by drewcasey24 - 24.01.2011, 12:17
Re: [Help] So many errors!!! Fuel Bar - by DeSantis - 24.01.2011, 19:55
Re: [Help] So many errors!!! Fuel Bar - by iggy1 - 25.01.2011, 07:17

Forum Jump:


Users browsing this thread: 1 Guest(s)