Fuel[i] -= 1; (Insted of taking 1, takes all fuel)
#2

[pawn]
pawn Код:
public GasUpdate()
{
    for(new i=0;i<CAR_AMOUNT;i++)
    {
        GetVehicleParamsEx(i,engine,lights,alarm,doors,bonnet,boot,objective);
        if(engine==1)
        {
            if(Gas[i] > 0)
            {
                new Float:Velocity[3];
                GetVehicleVelocity(i, Velocity[0], Velocity[1], Velocity[2]);
                if(Velocity[0] <= 1 && Velocity[1] <= 1 && Velocity[2] <= 1)
                {
                    Gas[i] -= 1;
                }
                else
                {
                    Gas[i] -= 2;
                }
            }
            else
            {
                SetVehicleParamsEx(i,0,lights,alarm,doors,bonnet,boot,objective);
                if(IsPlayerInVehicle(d,i))
                {

                }
            }
        }
    }
}
YOu were loopong through car amunt 500 times meaning each car had atleast -400 fuel
Reply


Messages In This Thread
Fuel[i] -= 1; (Insted of taking 1, takes all fuel) - by HondaCBR - 15.04.2012, 12:05
Re: Fuel[i] -= 1; (Insted of taking 1, takes all fuel) - by IceCube! - 15.04.2012, 12:10
Re: Fuel[i] -= 1; (Insted of taking 1, takes all fuel) - by HondaCBR - 15.04.2012, 13:03

Forum Jump:


Users browsing this thread: 1 Guest(s)