F.A.Q

3 min readUpdated 2 weeks ago

Setup

QBCore, QBox, ESX and Standalone through ml_bridge. The framework is detected automatically.

Any inventory ml_bridge supports that stores item metadata. Jerry cans and power cells keep their fuel in metadata, so ox_inventory and other metadata inventories all work. The shipped item definitions target ox_inventory as the reference; adapt the item names to your inventory.

Nowhere, there is no pay-at-pump flow. Fuel enters the economy through items: scavenging abandoned gas stations, searching wrecks, siphoning vehicles, and whatever your shops or loot tables hand out as fuel items.

Scale everything at once with one value:

shared/config.lua
1Config.Consumption.globalMultiplier = 4.0 -- 1.0 = realistic, higher = faster

Add it to Config.FuelTypes (or uncomment one of the shipped extras), list it in the acceptsFuel of at least one jerry can, and assign it to vehicles via Config.VehicleCategories or Config.VehicleOverrides.

Stations & Refueling

The map has 27 configured station locations. On each rotation a random subset (10-18 by default) becomes active with 2-5 scavenge charges each. Every successful scavenge burns one charge; a station at zero charges is depleted until the next rotation (every 15-30 minutes by default). All values live in Config.PumpScavenging.availability.

They do not, finding active pumps is part of the loop. Admins can run /showpumps to see temporary blips on active stations.

One of Config.PumpScavenging.fuel.availableFuelTypes, picked at random per scavenge. The player sees the type in the Transfer UI and the can must accept it.

Yes. Set onFail.alertDispatch = true in the minigame block of that feature. The alert goes through Bridge.AlertDispatch to the configured jobs with a code and a blip.

Electric models are detected natively on build 3258+ (or from Config.ElectricVehicles on older builds). They charge at charging stations or from power cell items. Charging stations have no default locations, add coordinates to Config.ChargingStations.locations to enable them.

Yes. A conversion kit switches the vehicle to its targetFuel. The conversion is stored per plate in the database and reapplied on every spawn. Electric vehicles cannot be converted.

Jerry Cans

Three sources: siphoning a vehicle (needs the siphon hose), scavenging an active gas station pump (needs the electric pump), and searching vehicle wrecks. All three pour into the can metadata through the hold-to-pour Transfer UI.

No. A can holding diesel refuses gasoline until it is emptied. The Transfer UI offers an explicit "empty can" action that discards the contents.

The fuel type in the can must match the fuel type of the vehicle. A diesel van does not take a can of gasoline. Check the type on the item tooltip.

No. The container is permanent; only the fuel inside it (the fuelAmount metadata) moves. Define the item with consume = 0 and stack = false.

Yes. The fuel state is plain item metadata (fuelType, fuelAmount, maxCapacity). ml_recycler and hrs_base_building generators already consume it. The contract and a ready-made example are on the Developer page.

Updates

  1. Download the latest version from the CFX Portal
  2. Back up shared/config.lua, shared/config_server.lua, open/ and locales/
  3. Replace all files, restore your backups
  4. Restart the resource

The ml_fuel_conversions table is preserved, no migration needed.