Skip to main content

BenzyFuel — Integrations

How BenzyFuel charges for fuel (through BenzyBridge), and how HUDs read its fuel.

Contents


Charging for fuel

BenzyFuel charges through BenzyBridge — whatever money system the bridge resolves is what pays. There is nothing to wire up in BenzyFuel: set whether to charge and which balance to use.

Config.ChargeForFuel = true
Config.Account = 'bank' -- or 'cash'

To send fuel revenue into a business/society account instead of it just leaving the player, set Config.PayTo to that account's key. The player still pays from Config.Account; that same amount is credited to the account:

Config.PayTo = 'pdm' -- an account key your money system understands

Load order in server.cfg: your SQL connectorframework (if any) → BenzyBridgemoney/notification providersBenzyFuel.

Standalone (no money system). Charging leans on a money system. If BenzyBridge resolves none — a standalone server — a charge can't be taken, so BenzyFuel fails open and dispenses the fuel free. That is expected, not an error. Add a money system (or set Config.ChargeForFuel = false) if you want fuel to cost.


JG HUD

Tells jg-hud to read a vehicle's fuel from BenzyFuel.

1 — Set the fuel system (jg-hud config/config.lua)

Config.FuelSystem = "BenzyFuel"

2 — Add the fuel reader (jg-hud framework/cl-functions.lua)

Find function Framework.Client.VehicleGetFuel(vehicle). Add this branch to its if / elseif chain — BenzyFuel's client GetFuel returns the 0–100 level jg-hud expects:

elseif Config.FuelSystem == "BenzyFuel" then
return exports.BenzyFuel:GetFuel(vehicle)

Done

Restart jg-hud. The fuel gauge now reads from BenzyFuel. ensure BenzyFuel before jg-hud in your server.cfg.


HUDs and other fuel-aware resources

Fuel is a 0–100 percentage, mirrored to the game's fuel level. Read it with the exports below (the standard fuel-export names most HUDs already expect), so most HUDs work unchanged:

-- Client
local fuel = exports.BenzyFuel:GetFuel(GetVehiclePedIsIn(PlayerPedId(), false)) -- 0..100

See EXPORTS.md for the full list and EVENTS.md for the purchase/refuel events.