Overview
Set up the original RON replacement pumps, Sentinel EV cabinets, matching portable packs, and universal fuel nozzle in ox_fuel Expanded. This community expansion keeps the CommunityOx 1.5.2 fuel-state contract while adding dual-handle stations, physical checkout screens, resource-local audio, and server-checked payments.
Requirements
- Required
- ox_lib 3.22.0+ and ox_inventory 2.30.0+
- Interaction
- ox_target for the complete gasoline, EV, and portable workflow
- Audio
- San Andreas Sound; the 13-file sound bank is served directly from ox_fuel
- Companion
- Matching ox_fuel_assets 1.2.6, started before ox_fuel
- Resource names
- Keep ox_fuel and ox_fuel_assets; migrate hardware with a full server/client restart
Installation
Back up configuration, custom locations, vehicle/mount profiles, payment bridges, and portable inventory data. Install the matching ox_fuel and ox_fuel_assets folders and disable competing fuel resources.
Install ox_lib 3.22.0+, ox_inventory 2.30.0+, ox_target, and San Andreas Sound.
Add the supplied portable_ev_charger item to ox_inventory and copy install/images/portable_ev_charger_compact.png into ox_inventory/web/images. Keep stack = false.
Deploy the complete 13-file assets/sounds folder with the resource. The current San Andreas Sound integration serves those clips directly from ox_fuel; no sound-file copy is required.
Review RON replacement, physical screen controls, shared handles, fuel/EV pricing, payment adapters, vehicle profiles, portable settings, and Chaos Mode.
Perform a full server/client restart for the model migration. Start dependencies, then ox_fuel_assets 1.2.6, then ox_fuel. Never hot-restart the companion with players connected.
Configuration
Install the package and dependency baseline
Copy both packaged resources into the server, keep their folders named ox_fuel and ox_fuel_assets, and disable every competing fuel resource. The runtime checks ox_lib 3.22.0+ and ox_inventory 2.30.0+; the complete feature set also requires ox_target and San Andreas Sound.
Install the portable inventory item
Copy the portable_ev_charger definition from install/ox_inventory_items.lua into ox_inventory/data/items.lua, then copy portable_ev_charger_compact.png into ox_inventory/web/images. Keep stack false so each unit retains its own charge and deployment metadata.
['portable_ev_charger'] = {
label = 'Portable EV Charger',
weight = 12000,
stack = false,
close = true,
consume = 0,
client = {
export = 'ox_fuel.portableEvCharger',
image = 'portable_ev_charger_compact.png',
},
}Deploy the current positional sound bank
Install San Andreas Sound and keep the complete current assets/sounds folder inside ox_fuel. nozzle.localResourceSounds and electric.localResourceSounds are true in the shipped configuration, so the server builds cfx-nui-ox_fuel/assets/sounds URLs. Do not copy the old seven-file bank into San Andreas Sound for this integration. Deploy the matching configuration, client scripts, and all 13 clips together. Recorded handling cues have their own license notices; see THIRD_PARTY_NOTICES.md.
drs_device_alert.ogg
drs_device_ready.ogg
drs_equipment_relay.ogg
drs_ev_lock.ogg
drs_ev_loop.ogg
drs_ev_unlock.ogg
drs_fuel_contact.ogg
drs_fuel_shutoff.ogg
drs_gas_loop.ogg
drs_holder_dock.ogg
drs_holder_release.ogg
drs_pack_loop.ogg
drs_pack_setdown.oggConfigure fuel grades and checkout
The fueling table controls grade order, price per gallon, transfer rate, blend ratio, and consumption multiplier. payments controls visible Cash and Bank choices. Cash uses ox_inventory's money item; Bank auto-detects qbx_core, qb-core, or es_extended.
fueling = {
pumpGallonsPerSecond = 0.20,
canGallonsPerSecond = 0.10,
defaultGrade = 'regular',
premiumGrade = 'premium',
gradeOrder = { 'regular', 'premium' },
grades = {
regular = { octane = 87, pricePerGallon = 5.82, premiumRatio = 0.0, consumptionMultiplier = 1.00 },
premium = { octane = 93, pricePerGallon = 7.99, premiumRatio = 1.0, consumptionMultiplier = 0.90 },
},
}
payments = {
defaultMethod = 'cash',
methodOrder = { 'cash', 'bank' },
}05Register a custom payment provider
When the built-in framework bank adapters do not fit the server, register a server provider after ox_fuel starts. getBalance receives the player ID and selected method; pay must return true only after the matching amount is removed.
exports.ox_fuel:setPaymentProvider({
getBalance = function(playerId, methodId)
-- Return the available balance for this payment method.
end,
pay = function(playerId, amount, methodId)
-- Remove the amount and return true only on success.
end,
})06Tune validation and source occupancy
serverValidation bounds vehicle distance, source-to-vehicle tolerance, accepted tick variance, and the completion grace window. pumpOccupancy now leases two independent handles per source by default, with prop_vintage_pump excluded. Both active transfers use sharedFlowMultiplier (0.65 by default); holding an idle handle does not reduce the other session's rate. The default acquisition range is four meters, with 15-second leases and five-second heartbeats. Test shared-flow transitions and hose/cable reach together.
serverValidation = {
maxVehicleDistance = 6.0,
sourceVehicleTolerance = 4.0,
tickTolerance = 2,
sessionGraceMs = 10000,
}
pumpOccupancy = {
enabled = true,
dualNozzles = true,
sharedFlowMultiplier = 0.65,
singleNozzleModels = {
[`prop_vintage_pump`] = true,
},
maxAcquireDistance = 4.0,
leaseDurationMs = 15000,
heartbeatMs = 5000,
}07Tune nozzles, hoses, and vehicle mounts
nozzle.model now defaults to the original drs_fuel_nozzle across all gas-pump brands, vintage units, custom pumps, and RON docks. Its mounting frame preserves the existing hand/vehicle offsets and hose endpoint. nozzle also controls hose reach, attachment, distance rules, fallback mount, local audio, and debug tools. Resolution still checks a model-specific profile first, then safe petrolcap or petroltank bones, then the configurable body fallback; explicit profiles may intentionally use other bones.
08Configure the original RON replacement
ronPump.enabled defaults to true. Nearby map prop_gas_pump_1a objects are hidden and replaced by drs_gas_pump_ron at the inherited base position and heading. Other brands and script-owned custom pumps are untouched. Disabling ronPump and restarting only ox_fuel restores the map pumps while the companion stays mounted. The physical front/rear registers use the player's approach side by default, regardless of the leased handle. Configure displays, docks, placement, visibility, and damageLocations here. Add unlisted MLO coordinates to damageLocations for synchronized destruction. RON uses model-native lighting; ronPump.lighting.enabled is false. The model's Diesel button is cosmetic and does not add a fuel grade.
-- Existing RON options inside config.ronPump:
enabled = true,
originalModel = `prop_gas_pump_1a`,
model = `drs_gas_pump_ron`,
damageLocations = {}, -- Add vec3 entries for unlisted MLO pumps.
-- Existing options inside ronPump.stationDisplay:
enabled = true,
hudFallback = false,
useApproachSide = true,09Configure EV stations and portable power
The original hardware defaults are electric.chargerModel = drs_ev_station, electric.connectorModel = drs_ev_connector, and portable ground/carry models drs_ev_pack and drs_ev_pack_carry. electric controls Standard/Rapid rates and prices, EV profiles, locations, docked connectors, cables, blips, local audio, and damage. Sentinel uses its physical cabinet screens by default; electric.stationDisplay.hudFallback = true optionally restores the distance/readability fallback. electric.portable retains the unique item's 12 kWh capacity, 7.2 kW display rate, purchase, placement, recharge, warnings, and damage behavior. Portable power retains its compact screen HUD.
10Configure startup update notices
versionCheck now reads the maintained Expanded manifest and download URL rather than the CommunityOx baseline. It runs once when the server starts and normally prints only if a newer package is available. Set enabled = false to disable it; notifyCurrent and verboseErrors expose additional notices. An update notice does not install files or replace local settings.
versionCheck = {
enabled = true,
manifestUrl = 'https://raw.githubusercontent.com/DrSnyder86/ox_fuel-Expanded/main/ox_fuel/fxmanifest.lua',
downloadUrl = 'https://github.com/DrSnyder86/ox_fuel-Expanded',
notifyCurrent = false,
verboseErrors = false,
delayMs = 1500,
},11Add custom pumps and fleet profiles
customGasPumpLocations accepts a pump prop, vector4 location, and optional ropeLength; every prop must also be listed in pumpModels. Use vehicleProfiles for gasoline capacity and consumption, electric.vehicles for batteries, and nozzle_offsets.lua for model-specific nozzle or connector mounts.
customGasPumpLocations = {
{
prop = 'prop_gas_pump_old3',
location = vector4(442.2, -977.17, 42.69, 270.3),
ropeLength = 14.0,
},
}12Turn on Chaos Mode
chaosMode.enabled defaults to false. Beneath the master gate are running-engine hazards, hose drive-off outcomes, vintage pump flow quirks, Rapid charger faults, and portable thermal shutdowns. Chance rolls happen on the server; major events use player cooldowns and one-event session guards, and interrupted sessions settle only delivered fuel or energy.
chaosMode = {
enabled = false,
adminLogging = true,
protections = {
playerCooldownSeconds = 900,
oneMajorEventPerSession = true,
},
}How to use and test it
Fuel a gasoline vehicle
Target an available handle, choose Regular or Premium and a payment method, take the universal nozzle to the resolved fuel-cap mount, and begin transfer. RON uses its physical register for checkout and live totals; use arrow keys to choose, Enter to confirm, and Backspace to cancel. Other gas-pump brands retain their HUDs. The server bounds volume and cost. Remove the attached nozzle and return it to the source pump when finished.
Charge an electric vehicle
Use an available Sentinel handle with a vehicle listed in electric.vehicles. The cabinet screens handle checkout and live session status by default: use arrow keys, Enter, and Backspace to choose Standard or Rapid and Cash or Bank. Take the connector to the resolved charge port and complete or interrupt the server-settled transfer. Unlisted vehicles are treated as gasoline unless you add an electric profile.
Purchase and use portable EV power
Purchase the portable unit at an EV station, use its unique ox_inventory item to deploy the original Sentinel pack, connect it to a configured EV, and recover it when the transfer ends. The compact portable-power HUD reports pack charge, vehicle charge, delivered energy, and remaining time. Remaining charge stays in item metadata; recharge the deployed unit at a normal station before recovering it.
Buy, refill, and use a petrol can
Use a target-enabled fuel pump to purchase or refill the equipped WEAPON_PETROLCAN, select the grade and payment method, then use the can near a supported vehicle's resolved fuel-cap position. Can volume and premium blend are stored in item metadata and finalized by the server.
Create a nozzle or connector profile
Set nozzle.offsetDebug.enabled to true, aim at a vehicle, and run the appropriate editor command. Press G for the compact editor, use Up/Down to choose a field and Left/Right to adjust it, Backspace to inspect, then E to print and copy the ready-to-paste profile. /ox_fuel_debugcaps toggles nearby mount markers and missing-model reporting.
/ox_fuel_nozzleoffset
/ox_fuel_chargeroffset
/ox_fuel_debugcapsRestart the package safely
Install the model-name migration and matching companion with a full server/client restart. After that, ox_fuel may restart while ox_fuel_assets stays mounted. Never hot-restart the companion with connected players. After reconnecting, verify the RON cabinet, Sentinel station, universal nozzle, docked equipment, portable metadata, both handle leases, and managed audio.
Use the direct gasoline fallback
When config.ox_target is false, the client registers /startfueling and maps it to E for gasoline pumps and petrol cans. EV and portable target workflows are not complete in this mode, so ox_target remains required for the advertised package.
/startfuelingPackage contents
The repository contains two installable resources, a portable-item definition and inventory image, and the current resource-local sound bank.
ox_fuel
Main Lua and NUI resource for gasoline fueling, EV charging, portable power, vehicle energy use, checkout, synchronization, configuration, locales, and public integration exports. Keep this folder name for existing ox_fuel integrations.
ox_fuel_assets
Version 1.2.6 companion with eleven original drs_ archetypes: Sentinel station/connector/portable hardware and docked cables, RON cabinet and idle hoses, and the universal fuel nozzle. It owns persistent streamed archetypes and must stay mounted while the main resource restarts. Legacy charging props are not included.
Manual install payloads
Copy the portable item from install/ox_inventory_items.lua and the single compact image from install/images into ox_inventory. The 13 clips under assets/sounds remain inside ox_fuel and are served directly through the current San Andreas Sound integration. Alternate audio providers require runtime review and may need a separate clip installation.
Transaction and state model
Server-managed transfer sessions
The server resolves configured grade or charge mode, payment balance, capacity, transfer per tick, maximum transferable volume, source reach, and final delivered ticks. Cancellation and fault paths settle only completed delivery.
Synchronized source occupancy
Fixed pumps and chargers use independently leased handle slots, coordinate-based source identity, acquisition distance, a 15-second default lease, five-second heartbeats, release events, and loss notifications. Most sources allow two slots; vintage pumps are single-slot. Only simultaneous active transfers trigger the shared-flow multiplier, which updates both sessions and returns to full rate when either stops.
Replicated vehicle energy state
Entity(vehicle).state.fuel remains a replicated 0–100 value for ox_fuel compatibility. Gas vehicles may also carry fuelPremiumRatio from 0–1; EV models use the same percentage state with configured battery capacity and consumption.
Differences from upstream
- Baseline
- CommunityOx ox_fuel 1.5.2
- Expanded version
- 1.5.2-expanded.3
- Energy sources
- Gas pumps, fuel cans, EV stations, and portable EV power
- Vehicle mounts
- Automatic safe bones, body fallback, and 669 adapted profiles
- Public state
- Replicated 0–100 fuel plus normalized premium blend ratio
Physical and electric interaction layer
Expanded adds original RON and Sentinel hardware, a universal fuel nozzle, attached hoses/connectors, dual-handle stations, physical cabinet checkout, custom pumps, synchronized damage, resource-local positional sound, portable energy, and branded HUDs for the remaining pump/portable workflows.
Capacity, grade, and payment model
Class and model tank sizes, EV batteries, Regular/Premium blend state, live volume pricing, Cash/Bank checkout, and Qbox, QBCore, ESX, or custom bank adapters sit above the preserved 0–100 fuel state.
Operational limitations
Community preview distribution
The public repository currently has no tag or GitHub release. Treat main as a versioned preview snapshot, pin the tested commit for production, and review the changelog before updating.
Complete mode depends on ox_target
ox_target appears in both READMEs but not the main fxmanifest dependencies. The E-key gasoline fallback exists when target is disabled, but EV and portable interactions require the target workflow.
Later EVs require newer game builds
Suzume requires build 3570 or newer; X-Treme and Vivanite2 require 3751 or newer; E-Stride needs a build containing the Kortz Center Heist assets. Remove unavailable models from electric.vehicles or raise the server build.
Startup update notices are advisory
The checker now follows the maintained Expanded package, but it runs once at server startup and does not install updates. Review the changelog, preserve local settings, and pin the exact tested revision even when the console reports a newer version.
Updating
Preserve local configuration and data
Back up config.lua, custom locations, vehicle and electric profiles, nozzle_offsets.lua, payment bridges, and portable item data. Compare those files against the new package instead of overwriting them blindly.
Update assets only during a full restart
Move from older snyder_ or CDN hardware to the original drs_ models using matching ox_fuel and ox_fuel_assets 1.2.6 files during a full server/client restart. Never hot-restart the companion with players connected. Verify RON/Sentinel cabinets, docked connectors, portable packs, universal nozzles, collision, physical screens, and cleanup after reconnecting.
Repeat the acceptance pass
Test representative gas vehicles, EVs, add-ons, both station handles, the single-handle vintage pump, active shared-flow transitions, physical cabinet controls, payment accounts, custom pumps, fuel cans, portable metadata, restarts, insufficient funds, interrupted transfers, and every enabled Chaos Mode outcome.
Licensing and provenance
GPL-3.0 community expansion
The ox_fuel software remains GPL-3.0 under ox_fuel/LICENSE. The companion manifest retains GPL-3.0 with its full text in ox_fuel_assets/COPYING. Original compiled model, archetype, collision, and texture contributions use the separate DRS Model Asset License 1.0 in ox_fuel_assets/LICENSE: unchanged FiveM use and free redistribution with the complete resource are permitted; asset sales, paid bundles, and model/texture edits require prior written permission from DrSnyder. There is no editable-texture exception. These model terms apply prospectively from November 2, 2026; valid GPL rights granted for earlier asset copies remain intact. This is an independent CommunityOx expansion; preserve the licenses, notices, attribution, and modification history.
Original hardware and audio provenance
The DRS Sentinel station, connector, portable hardware and cables, RON cabinet/hoses, and universal nozzle are original geometry covered by the separate model terms above. Those terms cover DrSnyder's original contributions only; community-provided RON artwork and trademarks retain their holders' rights. Original loops and device tones remain GPL-3.0, while recorded foley keeps its stated CC BY 4.0 or CC0 license. In particular, the holder-dock recording credits joedeshon under CC BY 4.0. Preserve the source authors, license links, and modification notices in THIRD_PARTY_NOTICES.md. Former CDN-Fuel charging models and gas/charging sound files are removed; their historical attribution remains. CDN-Fuel runtime code is not included.
LC Fuel data
The 26 default station coordinates and original EV baseline were transcribed from LC Fuel. nozzle_offsets.lua adapts 669 active GPL-3.0 vehicle entries; LC Fuel runtime scripts and media are not required or redistributed.
Troubleshooting
The resource stops during startup
Check the console for dependency failures. ox_lib 3.22.0+, ox_inventory 2.30.0+, san_andreas_sound, and ox_fuel_assets must be started before ox_fuel; start ox_target first for the complete interaction set. Confirm both package folders retain their required names.
Targets, nozzles, or EV actions are missing
Verify ox_target is started and config.ox_target, config.nozzle.enabled, and config.electric.enabled remain true. The gasoline E-key fallback does not provide the complete physical, EV, and portable target workflows.
Fueling or charging sounds do not play
Confirm San Andreas Sound starts before ox_fuel, the complete 13-file assets/sounds folder is present in ox_fuel, and both nozzle.localResourceSounds and electric.localResourceSounds are true for the shipped integration. The server then serves clips directly from the resource; the old soundBaseUrl is a fallback when localResourceSounds is false. Deploy config, client scripts, and the current bank together, then test pickup, connection, managed loops, stop, and return within their configured ranges.
EV charger or connector models are missing
Install matching ox_fuel_assets 1.2.6 before ox_fuel and perform the full server/client restart required by the drs_ model migration. Confirm the original Sentinel, RON, universal-nozzle, and cable files are deployed. Never repair this by hot-restarting the companion with players connected.
RON or Sentinel checkout has no corner HUD
This is the default cabinet-only flow for these models. Stand near the physical register, use the arrow keys to choose an option, Enter to confirm, and Backspace to cancel. RON chooses the register facing the player's approach. Review ronPump.stationDisplay or electric.stationDisplay; hudFallback is false by default and can be enabled explicitly for distance/readability needs. Other gas pumps and portable power keep their HUDs.
An electric vehicle is treated as gasoline
The model must appear in electric.vehicles. Confirm the spawn name and required game build, then add an entry with batteryCapacityKwh and consumptionRate. Reconnect or restart the main resource after changing the profile.
A nozzle or connector mounts incorrectly
Use /ox_fuel_debugcaps to inspect the resolved mount, then enable nozzle.offsetDebug and run the gasoline or EV offset editor. Add the printed profile to nozzle_offsets.lua and verify both side handling and attachment on the exact addon model.
Bank does not appear as a payment option
The server only exposes payment methods with a readable balance. Start qbx_core, qb-core, or es_extended before the transaction, or register a custom setPaymentProvider bridge that returns balances and removes funds for the selected method.
The portable item cannot be used or retains no charge
Confirm the supplied item entry is in ox_inventory, its client export is ox_fuel.portableEvCharger, stack is false, and the image filename matches. Test purchase, deploy, partial transfer, pickup, reconnect, and recharge while inspecting the item's charge metadata.
A source remains occupied
Wait for the default lease timeout, confirm the client can send its five-second heartbeat and release events, and check source/vehicle distance limits. Repeated stale leases indicate a resource, event-routing, or cleanup problem rather than a reason to disable occupancy globally.
Unexpected damage or shutdowns occur
Check chaosMode.enabled first. The master switch defaults to false; when enabled, inspect admin logs, per-feature switches, percentages, the 900-second default player cooldown, and the one-major-event session guard before changing individual outcomes.
Reference
Vehicle fuel state
The public compatibility surface remains the replicated vehicle fuel state in the 0–100 range. Read the entity state first and fall back to the native when initializing; write authoritative changes with a replicated state-bag update.
local state = Entity(vehicle).state
local fuel = state.fuel or GetVehicleFuelLevel(vehicle)
state:set('fuel', math.clamp(newFuel, 0, 100), true)Server payment provider
setPaymentProvider is the preferred custom economy API. Pass a table containing getBalance(playerId, methodId) and pay(playerId, amount, methodId), or pass those two functions separately. pay must return true on success.
exports.ox_fuel:setPaymentProvider(provider)
exports.ox_fuel:setPaymentProvider(getBalance, pay)Legacy server payment callback
setPaymentMethod accepts a legacy charge callback receiving player ID, amount, and method ID. New bridges should use setPaymentProvider so checkout can obtain the available balance before beginning a session.
exports.ox_fuel:setPaymentMethod(function(playerId, amount, methodId)
-- Charge the account and return true on success.
end)Resolved nozzle-mount export
The client getVehicleFuelNozzleMount(vehicle) export returns the cached resolved mount used by the physical interaction layer. It may come from a model profile, safe fuel bone, or configured body fallback.
local mount = exports.ox_fuel:getVehicleFuelNozzleMount(vehicle)Portable inventory callback
portableEvCharger(data, item) is the client export referenced by the supplied ox_inventory item definition. Keep that export name aligned with the installed resource folder.
client = {
export = 'ox_fuel.portableEvCharger',
}Configuration and data files
config.lua owns runtime settings, including RON replacement and physical displays. data/stations.lua holds inherited gasoline station zones; vehicle_profiles.lua resolves tank and consumption data; electric_profiles.lua resolves EVs; fuel_grades.lua handles grades and blend math; nozzle_offsets.lua contains mount profiles; pump_slots.lua and pump_flow.lua support shared station handles and transfer rates. server/version.lua performs the maintained-repository startup check.
Internal callbacks and events
The ox_fuel:* callbacks and network events used for transactions, leases, destruction, sound, portable metadata, and cleanup are internal plumbing rather than a supported third-party API. Integrate through the documented exports and vehicle state.
- Version 1.5.2-expanded.3 is reported by the maintained main-branch manifest and changelog. The repository currently has no tag or GitHub release, so pin the tested commit rather than treating a branch archive as a packaged release.
- Keep the main resource named ox_fuel and the matching companion named ox_fuel_assets (1.2.6). This model migration requires a full server/client restart; never hot-restart or unmount the companion with players connected.
- The startup version checker now follows the maintained ox_fuel-Expanded repository. It is configurable and does not install updates automatically.
- Preserve the GPL-3.0 software license, separate DRS Model Asset License 1.0, recorded-audio licenses, CommunityOx attribution, LC Fuel data provenance, historical CDN-Fuel notices, and modification notices when redistributing the package. The model terms do not revoke earlier GPL grants.
- San Andreas Sound is the supported shipped audio path. Although legacy InteractSound-compatible code remains internally, do not substitute another provider without reviewing and adapting the current runtime.
- Do not document setMoneyCheck as a working integration hook in this snapshot: the export assigns a client function, but the active checkout path does not consume it.