[Free] Qb Fuel by Sna with fuel nozzles and electric charging

Fuel script that cover all vehicles, fuel, electric, air, sea

Video : Qb Fuel by Sna - YouTube
Package : GitHub - Sna-aaa/qb-sna-fuel: Fuel script that cover all vehicles, fuel, electric, air, sea

Features

  • Pumps with nozzle for electric or fuel
  • Gas pump for fuel vehicles
  • Electric chargers for electric vehicles
  • Out of energies are handled by the script, the vehicle just stop his motor, no more sparks and backwards
  • Every vehicles excepted blacklisted ones will stop when out of energy
  • Electric cars have a specific consumption model (with nothing at idle)
  • Electric cars have a charge curve (quickly until 80% then more and more slowly)
  • Electric cars have a discharge curve (slowly until 40% then more and more quickly)
  • Consumption can be specified for each vehicle separately
  • Tank sizes can be specified for each vehicle separately
  • Energy is specified in L or Kw, and price can be configured
  • Automatic charging of electric vehicles in garages
  • Admin command /fuel to refuel/charge vehicles
  • Working jerrican for fuel vehicles
  • Jerrican capacity is configurable
  • A new export “ApplyFuel” to apply fuel without electric charge for persistence scripts
  • Server synced nozzles and hozes

Requirements

8 Likes

Testing out on my server, great so far! Great script thanks for making free!

Thanks a lot for your support :wink:

Loving the way it works! However, for some reason my hud messes up. Im not sure why. Using qb-hud.

What is your problem with the hud exactly?

great job thanks for amazing work

Does this work along side leagacy fuel or is it a replacement

It’s a replacement! Works well, but there is some changes which have to be made. But for a free release, it’s a really good resource and big ups to this guy!

Yes it is a replacement
Thanks a lot for the support guys
What are the modifications you made? Maybe i can make it even better :wink:

Hi, when I use the pump with third eye, works perfetly. But then when I push E to take the hose from the car, it also picks up a hose from the pump. Then I have 2 hoses. Can we remove the E key on the pump?

There is no E key on the pump at all…

Really? Then why on line 292 of the main.lua does it have this?

CreateThread(function() -- Check key presses
    while true do
        local sleep = 1000
        if CurrentPump then
            sleep = 0
            if IsControlPressed(0, Config.ActionKey) and CurrentCapPos then
                local playerPed = PlayerPedId()
                if #(GetEntityCoords(playerPed) - CurrentCapPos) < 3.0 then -- Mount/Dismount pump

It says Mount/Dismount Pump with key press.

Also, in config it has:

Config.ActionKey = 38 -- Key binds can be found here https://docs.fivem.net/docs/game-references/controls/

38 being the E key.

Am I able to add my own Fuel Locations and make price free for Police? Say like If I had fuel pumps at PaletoPD, make them only useable for the Police Job and make it free?

You can already add your fuel locations, just add pumps in your map and it will be functional
Unfortunately, the control of the pumps need a new layer of coding to control the job or even the vehicle model
This is on the roadmap for this resource like pumps for boats or air vehicles, fuel stocks and job control

Ok perfect! Also, the Fuel HUD doesn’t work, like the resource works, but it doesn’t display the fuel thats in the vehicle. Also, how do I go about refuelling a helicopter?