[HELP] Please help setting fuel [REP +]
#1

Hello I have a fuel system where I set the fuel depend of type vehicle trucks are 100 L buses are 80 and bikes like nrg freeway are 15.0L and I sit in truck and it should set 100 L but it's set to 40 L

I defined Fuel as

pawn Код:
new Float:Fuel[MAX_VEHICLES];
so under ongamemodeinit I have

pawn Код:
for(new o = 0; o < MAX_VEHICLES; o++)
    {
        if(IsATruck(GetVehicleModel(o))) Fuel[o] = 100.00;
        else if(IsABus(GetVehicleModel(o))) Fuel[o] = 80.00;
        else if(IsABike(GetVehicleModel(o))) Fuel[o] = 15.00;
        else Fuel[o] = 40.00;
    }
then stocks

pawn Код:
stock IsATruck(vehicleid)
{
    switch(GetVehicleModel(vehicleid))
    {
        case 403,406,407,408,414,427,428,443,455,456,498,514,515,524,544,573,578,609: return 1;
    }
    return 0;
}
stock IsABus(id)
{
    if(id == 431 || id == 437) return 1;
    return 0;
}
stock IsABike(id)
{
    if(id == 448 || id == 461 || id == 462 || id == 463 || id == 468 || id == 471 || id == 521 || id == 522 || id == 581 || id == 586) return 1;
    return 0;
}
Reply


Messages In This Thread
[HELP] Please help setting fuel [REP +] - by Luca12 - 17.03.2015, 17:40
Re: [HELP] Please help setting fuel [REP +] - by SWAT4 - 17.03.2015, 17:46
Re: [HELP] Please help setting fuel [REP +] - by Jefff - 17.03.2015, 17:48
Re: [HELP] Please help setting fuel [REP +] - by CalvinC - 17.03.2015, 17:49
Re: [HELP] Please help setting fuel [REP +] - by Luca12 - 17.03.2015, 18:18
Re: [HELP] Please help setting fuel [REP +] - by Jefff - 18.03.2015, 01:26
Re: [HELP] Please help setting fuel [REP +] - by fuckingcruse - 18.03.2015, 09:35
Re: [HELP] Please help setting fuel [REP +] - by CalvinC - 18.03.2015, 09:41
Re: [HELP] Please help setting fuel [REP +] - by Luca12 - 18.03.2015, 11:06
Re: [HELP] Please help setting fuel [REP +] - by Jefff - 18.03.2015, 16:29

Forum Jump:


Users browsing this thread: 3 Guest(s)