SA-MP Forums Archive
[HELP] fuel - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [HELP] fuel (/showthread.php?tid=469738)



[HELP] fuel - Luca12 - 14.10.2013

Hello I have a problem when I'm on my motocycle I add that fuel for that be 15.0 but it's 40 l if you know what I mean

it look like this code in ongamemodeinit:


pawn Код:
for(new o; o < MAX_VEHICLES; o++)
    {
        if(IsAPlane(GetVehicleModel(o)) || IsABoat(GetVehicleModel(o)) || IsABus(GetVehicleModel(o))) Gorivo[o] = 80.00;
        else if(IsAMotorVehicle(GetVehicleModel(o))) Gorivo[o] = 15.00;
        else if(IsATruk(GetVehicleModel(o))) Gorivo[o] = 100.00;
        else if(IsABycle(GetVehicleModel(o)) || GetVehicleModel(o) == 538) Gorivo[o] = 1000000.00;
        Gorivo[o] = 40.00;
        if(!IsABycle(GetVehicleModel(o)))
        {
            new engine, lights, alarm, doors, bonnet, boot, objective;
            GetVehicleParamsEx(o, engine, lights, alarm, doors, bonnet, boot, objective);
            SetVehicleParamsEx(o, 0, 0, alarm, doors, bonnet, boot, objective);
        }
    }
everything work expect IsAMotorVehicle so it should be 15.0 l but it is 40.0 l


Re: [HELP] fuel - bensmart469 - 14.10.2013

Here's your problem:
Gorivo[o] = 40.00;


Re: [HELP] fuel - rickisme - 14.10.2013

Wrong : Gorivo[o] = 40.00;
Right : else { Gorivo[o] = 40.00; }
Код:
for(new o; o < MAX_VEHICLES; o++)
    {
        if(IsAPlane(GetVehicleModel(o)) || IsABoat(GetVehicleModel(o)) || IsABus(GetVehicleModel(o))) Gorivo[o] = 80.00;
        else if(IsAMotorVehicle(GetVehicleModel(o))) Gorivo[o] = 15.00;
        else if(IsATruk(GetVehicleModel(o))) Gorivo[o] = 100.00;
        else if(IsABycle(GetVehicleModel(o)) || GetVehicleModel(o) == 538) Gorivo[o] = 1000000.00;
        else { Gorivo[o] = 40.00; }
        if(!IsABycle(GetVehicleModel(o)))
        {
            new engine, lights, alarm, doors, bonnet, boot, objective;
            GetVehicleParamsEx(o, engine, lights, alarm, doors, bonnet, boot, objective);
            SetVehicleParamsEx(o, 0, 0, alarm, doors, bonnet, boot, objective);
        }
    }



Re: [HELP] fuel - Luca12 - 15.10.2013

it's the same when I sit on NRG-500 it's set fuel to the 40.0 l instead 15.0 l


Re: [HELP] fuel - edzis84 - 15.10.2013

Show us your IsAMotorVehicle stock


Re: [HELP] fuel - Luca12 - 15.10.2013

don't worry about that I yesterday put all motocycles id's in the stock so stock is good


Re: [HELP] fuel - Luca12 - 16.10.2013

anyone?


Re: [HELP] fuel - Luca12 - 16.10.2013

anyone


Re: [HELP] fuel - Luca12 - 17.10.2013

Please anyone? Thanks


Re: [HELP] fuel - Luca12 - 18.10.2013

Please guys anyone? ;(