World · Overextended

ox_fuel

A small, dependency-light fuel system: petrol stations, jerry cans, electric charging and per-class consumption.

Fuel is one of those systems every roleplay server needs and nobody wants to write. ox_fuel handles the pumps, the jerry can, electric vehicles and a consumption curve that varies by vehicle class, in a resource small enough to read in one sitting. Its stations are map locations, which is where it meets the minimap: a server that adds custom stations usually wants them marked.

Official documentation Repository All resources

At a glance

MaintainerOverextended
Latest releasev1.5.4 · 2026-05-29
Last code change2026-05-29
LicenceGPL-3.0
Written inLua
GitHub stars85
StatusActive

Figures read from the repository on 2026-09-22.

Why servers run it

  • Petrol and electric in one resource, with different refuelling behaviour for each.
  • Consumption scales with vehicle class and engine load rather than being a flat drain.
  • Jerry cans as inventory items, so running dry is a real inconvenience rather than a teleport.
  • Station locations are config data, so adding a custom pump to a custom MLO is one entry.

Installing ox_fuel

  1. 1. Install ox_lib and an inventory

    ox_inventory for the jerry can, ox_lib for the UI.

  2. 2. Disable the framework's own fuel

    ESX and QBCore ship fuel scripts. Two fuel systems fight over the same vehicle state.

  3. 3. Add your custom stations

    The config lists station coordinates. A custom petrol MLO needs an entry or its pumps do nothing.

Working examples

Adding a custom station and its blip

-- In the ox_fuel config
{ coords = vec3(-70.2, -1761.8, 29.5), model = `prop_gas_pump_1d` },

-- And, in your own client script, a matching map marker
local blip = AddBlipForCoord(-70.2, -1761.8, 29.5)
SetBlipSprite(blip, 361)        -- fuel pump
SetBlipColour(blip, 4)
SetBlipScale(blip, 0.7)
SetBlipAsShortRange(blip, true)
BeginTextCommandSetBlipName('STRING')
AddTextComponentString('Petrol station')
EndTextCommandSetBlipName(blip)

What goes wrong

Two fuel systems is a classic. Symptoms are a tank that refills itself or drains twice as fast.

Electric vehicles need the class set correctly or they queue at a petrol pump forever.

A custom station without a config entry looks like a bug in the MLO.

ox_fuel — questions people ask

How do I add petrol stations to the map?
Two things: a station entry in the fuel resource so the pump works, and a blip so players can find it. Sprite 361 is the fuel pump icon; the full list of sprite ids is on our blip reference page.

Runs alongside

ox_lib

The shared library half the modern FiveM ecosystem depends on: menus, notifications, progress bars, zones, callbacks and a cache.

ox_inventory

The slot-based inventory most new FiveM servers start with, with first-class support for addon weapons, durability, metadata and shops.

PolyZone

The zone library that taught FiveM to think in shapes: polygons, boxes, circles and entity zones with enter and exit events.