FiveM Fuel Script: Fuel & Energy System
Gas stations, hose refuelling, jerrycan minigame, EV charging and realistic consumption.
$29.99 · one-time purchase · QBCore, Qbox, ESX and standalone
Requires: ox_lib, oxmysql, rd_bridge. Protected with Cfx.re Asset Escrow; config, locales and SQL stay editable.


A complete fuel and EV energy system: price per litre, hose refuelling, jerrycan minigame, chargers, HUD and in-game station editor, with the server deciding every purchase. QBCore · Qbox · ESX · standalone via rd_bridge.
Needs the free rd_bridge resource, which adapts it to your framework and inventory.
⛽⚡ Every drop accounted for.
Fill up, plug in, run dry: your players will feel every litre. rd_fuel is a full fuel and EV energy system: consumption that reacts to how you drive, gas stations with a price per litre, hose refuelling, a jerrycan minigame, chargers and a HUD. The server prices and charges every purchase.
Why you'll want it
- 🔥 Consumption that reacts to the driver: by vehicle class and model, engine RPM and speed, gearbox, wear, passengers and towing. Run dry and the engine coughs, then cuts out.
- ⛽ A pump you actually use: nozzle prop and rope, animation, a connect step, a gauge above the tank and an optional skill check. Cancel and you are refunded.
- 🛢️ Jerrycan minigame: buy it, fill it at the pump (you pay what you pour) and pour it into a vehicle.
- 🔌 EVs included: chargers you place in game, fast charge, battery ageing and a portable charger item.
- 🛡️ The server decides the money: price per litre or kWh, time-of-day bands and per-station multipliers, with purchases priced and charged server-side.
- 🧭 Ready in minutes: 27 default stations, /fuelstations to calibrate them in game, and GetFuel / SetFuel exports for scripts written for other fuel resources. Needs ox_lib, oxmysql and rd_bridge.
First release (v1.0): code-reviewed and lint-checked. Report any issue and we fix it.
What you get
- The rd_fuel resource (v1.0.0) for QBCore, Qbox, ESX or standalone through rd_bridge.
- 27 default gas station entries at GTA V locations (approximate centres, copied to SQL on first start).
- A NUI with the jerrycan minigame and a fuel/battery HUD.
- Item definitions for ox_inventory and qb-core (add your own rd_ev_charger.png).
- Three SQL tables installed automatically; English and Spanish texts.
Features
Driving
- Consumption by vehicle class and model, engine RPM and speed, gearbox, wear (engine, body, tank), passengers and towing, with a global multiplier.
- Empty-tank effects: engine cut, coughing before it, a low-fuel warning and optional HUD gauge.
- Bicycles and any class, model or plate you list never use energy.
Pumping
- Price per litre (or per kWh), time-of-day bands, a multiplier per station and a choice of payment account.
- Hose refuelling with nozzle prop and rope, animation, a connect step, a gauge above the tank and an optional skill check; cancelling refunds.
- Jerrycan: buy it, fill it at the pump with a NUI minigame (you pay what you pour) and pour it into a vehicle.
- Floating price cards on pumps and an optional attendant NPC that opens the jerrycan and charger shop.
Electric
- Charger stations you place in game, fast charge, optional charging at gas stations.
- Battery ageing computed by the server and a portable charger item.
- Vanilla EVs listed by default; add your add-on EVs to Config.ElectricModels.
Admin
- /fuelstations: add stations by position or by aiming, set name, radius, price multiplier and fast charge, list by distance, scan nearby objects to find pump models, export a ready-to-paste config block, reset.
- /setfuel <0-100> [plate] for admins.
- Edits are saved to SQL and broadcast live.
How it works
Inside a station radius and near a vehicle, the player interacts with a pump (E by default), picks an account and an amount, and the server computes litres and price. The hose connects, the level rises and the server accepts that rise only because a purchase was paid. Consumption is simulated by the client and reported; the server bounds how fast the saved level may drop or rise.
Requirements
- ox_lib, oxmysql and rd_bridge (rd_bridge must start first).
- Optional: ox_inventory (recommended; needed for the jerrycan and the portable charger).
- Optional: rd_holo for floating holograms, sold separately.
- Run only one fuel system at a time.
Install in 5 steps
- 1. Put rd_fuel in your resources and stop any other fuel resource.
- 2. Add the items: paste items/ox_inventory.lua into ox_inventory/data/items.lua (or items/qb-core.lua). The jerrycan is the native WEAPON_PETROLCAN your inventory already defines.
- 3. SQL installs itself with Config.AutoInstallSQL = true (rd_fuel_vehicles, rd_fuel_stations, rd_fuel_meta), or import sql/install.sql.
- 4. In server.cfg: ensure rd_bridge, then ensure rd_fuel, before scripts that call its exports.
- 5. Optional: uncomment one provide line in the manifest to serve scripts that call GetFuel / SetFuel under another resource name.
Compatibility
QBCore, Qbox, ESX and standalone through rd_bridge (adapters reviewed against each resource's official documentation). It reads and writes the Entity(vehicle).state.fuel state bag, and exposes the GetFuel and SetFuel client exports so scripts written for other fuel resources (LegacyFuel, cdn-fuel and ps-fuel style calls) can use it. Only GetFuel and SetFuel are covered: the other exports of those resources are not provided. Protected with Cfx.re Asset Escrow; config.lua, locales, SQL, items and the UI files stay editable.
FAQ
- The pump does nothing. Use Scan nearby objects in /fuelstations and add the pump model to Config.PumpProps; check you are inside a station radius.
- My garage script spawns cars with random fuel. Have it call SetFuel, or RefillByPlate from the server.
- EVs cannot charge. Add a station with kind = electric, or keep Config.Electric.chargeAtFuelStations on.
- How safe is it against cheaters? The server decides purchases and bounds changes, but a modified client can still change its local tank. Set AllowExternalSetFuel = false for strict mode.
- What if a player disconnects mid-refuel? The payment is not refunded.
- Is it tested? This is the first release (v1.0): code-reviewed and lint-checked, and the public APIs it mirrors were read from their official repositories. Report any issue and we fix it.