Browse documentationox_fuel
On this page
Resource guide

ox_fuel

Physical pump interactions on the established OX fuel foundation.

Framework-agnosticOX LibOX InventoryOX TargetFiveM state bagsInteractSound-compatible audio
Resource page View source
Version
v1.5.2-based
Updated
Aug 15, 2026
License
GPL-3.0
01 / OVERVIEW

Start here

This CommunityOx 1.5.2-based derivative keeps ox_fuel's native and state-bag fuel synchronization plus its ox_inventory economy while adding a default OX Target nozzle workflow. Configure the complete inventory and target stack first, and audit the inherited client-trusting server events before exposing it on a public server.

02 / REQUIREMENTS

What you need

Requiredox_lib 3.22.0+ and ox_inventory 2.30.0+
Default interactionox_target while config.ox_target is true
Economyox_inventory money item by default; custom economies must override both payment exports
Optional audioInteractSound-compatible provider plus manual OGG installation
Production reviewHarden the inherited client-trusting server events before public use
Resource nameKeep ox_fuel
03 / INSTALLATION

Install and start

  1. 01

    Place the repository in the FiveM resources folder as ox_fuel.

  2. 02

    Install and configure ox_lib 3.22.0+, ox_inventory 2.30.0+, and ox_target for the default nozzle workflow.

  3. 03

    Review refill, pricing, blip, station, nozzle, hose, fuel-can, and consumption settings in config.lua and data/stations.lua.

  4. 04

    For pump audio, copy the four bundled OGG files into the selected InteractSound-compatible provider and start it before testing.

  5. 05

    Start the dependency stack before ox_fuel, then test pump fueling, fuel cans, cancellation, range cleanup, insufficient funds, and full tanks.

Recommended start orderplain text
ensure oxmysql             # when required by your ox_inventory setup
ensure ox_lib
ensure your_framework      # when ox_inventory uses one
ensure ox_target           # default interaction and nozzle mode
ensure ox_inventory
ensure interact-sound      # optional, after installing the bundled OGG files
ensure ox_fuel
ensure your_fuel_bridge    # optional custom economy adapter
04 / CONFIGURATION

Configuration checkpoints

01

Meet the dependency baseline

Keep the folder named ox_fuel. The resource enforces ox_lib 3.22.0 or newer and ox_inventory 2.30.0 or newer before loading; install the database and framework stack required by your chosen ox_inventory configuration as well.

02

Understand target and nozzle coupling

config.ox_target and config.nozzle.enabled both default to true. The physical carried-nozzle module only loads when both are enabled, so ox_target is required for that workflow even though it is not declared in fxmanifest.lua. Setting config.ox_target to false restores the E-key /startfueling path without the physical nozzle.

03

Tune refill speed and pricing together

Pump duration is derived from the missing fuel, refillValue, and refillTick, while priceTick is charged once per tick. The snapshot defaults to 1 percent every 250 milliseconds and one money item per tick, so test economy changes as a complete formula rather than adjusting one value alone.

Exampleplain text
refillValue = 1.00
refillTick = 250
priceTick = 1
04

Configure blips, prompts, and stations

showBlips accepts 0 for hidden, 1 for nearest, or 2 for all. In the default target plus nearest mode, the station loop also shows Fuel Pump or GAS STATION TextUI near a pump. Pump models live in config.lua and station coordinates live in data/stations.lua.

05

Install optional pump audio manually

Copy fuelstop.ogg, pickupnozzle.ogg, putbacknozzle.ogg, and refuel.ogg from assets/sounds into the sound provider's expected directory. The provider must expose the InteractSound_SV:PlayOnSource event; merely detecting san_andreas_sound, san_sound, or interact-sound by resource name does not make an incompatible API work.

06

Pair custom economy overrides

The default client affordability check and server charge both use ox_inventory's money item. A bank or framework adapter must replace both setMoneyCheck on the client and setPaymentMethod on the server so the displayed balance, interaction checks, and final charge agree.

07

Harden the server trust boundary

Before public use, validate and calculate price, fuel delta, petrol-can state, vehicle network ID, pump or vehicle proximity, and request frequency on the server. The inherited events accept client-supplied transaction and fuel values and should not be presented as server-authoritative in this snapshot.

05 / USAGE

Validate the resource

Use the physical pump workflow

Exit the vehicle, target a supported pump to take the nozzle, carry it within the configured maximum distance, target the nearby vehicle to begin fueling while still holding the nozzle, then target the original pump to return it. The prop remains in the player's hand rather than persistently attaching to the vehicle.

Use direct or fuel-can fueling

With target mode disabled, stand near a pump or equipped petrol can and use the mapped E key. In target mode, buy or refill a petrol can at a pump, equip it through ox_inventory, then target a supported vehicle.

Commandsplain text
/startfueling

Read and write vehicle fuel

Read the native fuel level or the synchronized entity state bag. Set the state bag when another resource needs to update fuel; ox_fuel itself does not persist that value to a vehicle database.

Commandsplain text
local fuel = GetVehicleFuelLevel(vehicle)
local syncedFuel = Entity(vehicle).state.fuel
Entity(vehicle).state.fuel = fuelAmount

Test the complete economy path

Verify a partial fill, cancellation, full tank, insufficient funds, fuel-can purchase and refill, hose-range abort, death cleanup, vehicle entry cleanup, and resource restart before opening the resource to players.

06 / TROUBLESHOOTING

Common checks

The resource stops during startup

Confirm ox_lib 3.22.0+ and ox_inventory 2.30.0+ start successfully before ox_fuel. Then check the dependencies required by the configured inventory and framework bridge.

Targets or the physical nozzle are missing

Start ox_target before ox_fuel and leave both config.ox_target and config.nozzle.enabled true. The nozzle module is intentionally unavailable in the direct E-key mode.

Pump sounds do not play

The OGG files are bundled as source copies but are not played directly from ox_fuel. Install them in a running provider and confirm it implements InteractSound_SV:PlayOnSource with the configured names and volumes.

Pump TextUI is missing in target mode

The current station script runs its nearby TextUI loop with showBlips set to 1. With target mode enabled and showBlips set to 0 or 2, it returns before that loop, so use target options alone or adjust the station logic deliberately.

A fuel can cannot be refilled with 80 to 99 money

This snapshot's target option checks the 100 buy price before deciding whether the selected can should use the configured 80 refill price. Carry at least the buy price or correct that comparison before relying on the lower refill value.

Nozzle labels are not translated

The new nozzle keys are present only in en.json and the progress labels are hard-coded in English. Add equivalent keys and labels before advertising full localization of the modified workflow.

The version checker reports no newer build

The inherited manifest and version checker still reference CommunityOx, whose repository is archived. This fork has no tag or release, and active Overextended v1.5.3 changes must be reviewed manually against the custom 1.5.2-based files.

07 / REFERENCE

Source and release notes

  • Security review is required before production: the inherited pay, fuel-can, and fuel-update events trust client-supplied prices, fuel values, durability, and vehicle network IDs without authoritative proximity or transaction validation.
  • The August 15, 2026 repository snapshot has no DrSnyder tag or release; 1.5.2-based describes its manifest baseline plus local changes rather than a new semantic version.
  • The repository is a manual GPL-3.0 derivative of CommunityOx ox_fuel v1.5.2 and original Overextended work; retain the license, upstream attribution, and prominent modification notices when redistributing it.
  • The public repository contains four OGG files but no screenshots, video, or other visual previews. Their per-asset provenance is not documented, so verify redistribution rights before making broader audio-license claims.
  • The optional rope can fail to load or create and will continue with the carried nozzle only; do not promise a hose on every client or depict the nozzle as persistently attached to the vehicle.