SA-MP Forums Archive
[HELP] new 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] new fuel (/showthread.php?tid=479069)



[HELP] new fuel - Luca12 - 02.12.2013

Beacuse I have problem with my sistem seting fuel to vehicles I wonder how can I make new system to set fuel cars, motocycles trucks...Thanks?


Re: [HELP] new fuel - SilentSoul - 02.12.2013

Show us your codes please ? maybe you created right things if you are looking for tutorials:

Tutorial 1


Re: [HELP] new fuel - Luca12 - 06.12.2013

the problem is just for setting fuel for motocycles it's set 40.0l instead 15.0l this is the code:

pawn Код:
for(new o = 1; o < MAX_VOZILA; o++)
    {
        if(o != INVALID_VEHICLE_ID)
        {
            if(IsAPlane(GetVehicleModel(o)) || IsABoat(GetVehicleModel(o)) || IsABus(GetVehicleModel(o))) Gorivo[o] = 80.00;
            else if(IsACar(GetVehicleModel(o))) Gorivo[o] = 40.00;
            else if(IsAMotocycle(GetVehicleModel(o))) Gorivo[o] = 15.00;
            else if(IsATruck(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, 1, 0, alarm, doors, bonnet, boot, objective);
            }
        }
    }