Framework, display and notifications

Everything below lives in refuelingnozzlesv2/config.lua.

Framework

  • UseESX — enable for ESX
  • UseNewESX — enable in addition to UseESX on newer ESX versions
  • UseQBCORE — enable for QBCore
  • UseTarget — use qb-target or ox_target instead of key prompts
  • UseOXTarget — use ox_target rather than qb-target (UseTarget must also be true)
  • UseOXInventory — hand the jerry can out as the WEAPON_PETROLCAN item in ox_inventory
  • UseJerryCanAsItem — hand the jerry can out as an ESX / QBCore inventory item instead of a weapon
  • FuelDecor — the fuel level decor shared with LegacyFuel and every script that reads it. Leave it as "_FUEL_LEVEL"
  • FuelMixDecor — the prefix of the per-fuel mix decors a garage can save. See Garages: saving fuel level and mix

Leave all three framework flags false for standalone: pumps are free and skip the payment step, and the tanker job pays nothing.

Display

  • Unit — what every screen shows: "L" (litres) or "GAL" (US gallons). Chargers always show kWh
  • Currency — the money symbol on every screen, prompt and message
  • Theme — the pump and charger screens: "light", "dark" or "auto"
  • AutoLightFrom / AutoLightTo — for "auto": light between these in-game hours (7 to 19), dark the rest of the day
  • HudTheme — the HUD, prompts and cards: "light", "dark" or "auto"
  • PromptHeight — how high the pump prompt sits above the pump's base, in metres
  • PromptOut — how far out toward the player it sits. A pump model can set its own, see Pumps, chargers and stations

Keys (Config.Settings)

  • InteractionKey — 38 (E): use a pump, take, insert and return the nozzle, pour a jerry can into a vehicle or away at a pump, every tanker job step
  • InteractionKey2 — 47 (G): buy or fill a jerry can at a pump, siphon at a filler, take a freeroam tanker in "both" mode

Prompts

DisplayStyle (in Config.Settings) controls how every "press E" prompt is drawn:

  • NUI (default) — the script's own world-anchored panels with key chips
  • 3D — classic floating text, in the HoverTextFont font
  • EVENT — nothing is drawn: the text is sent to your own UI. See Exports and events

The old NOTIFI, NOTIFI2 and SUBTITLE styles now show as NUI. Every text lives in locale.lua — see Translating the script.

Gas station blips

  • ShowNearestGasStationOnly — one blip, on the nearest gas station
  • ShowAllGasStations — a blip on every station in GasStations. Wins over the one above

Using your own notifications

Every message the script shows — payments, tank full, jerry can empty, hose break fees, the tanker job, server messages — goes through Config.CustomNotify first. Show the message in your own system and return true, and the script's own toast stays hidden. Return false (the default) to keep the script's toasts.

  • text — the message, already translated (locale.lua), with the GTA colour codes (~r~, ~g~…) removed
  • kind — "error", "success", "warning" or "info", from the message's colour
  • duration — milliseconds (4000 when the script does not set one)

It runs on the client. If it errors, the error is printed in F8 and the script's toast is shown instead.

--ox_lib (ox_lib uses "inform" for info)
Config.CustomNotify = function(text, kind, duration)
    lib.notify({ description = text, type = kind == "info" and "inform" or kind, duration = duration })
    return true
end

--ESX
Config.CustomNotify = function(text, kind, duration)
    ESX.ShowNotification(text, kind, duration)
    return true
end

--QBCore (QBCore uses "primary" for info)
Config.CustomNotify = function(text, kind, duration)
    QBCore.Functions.Notify(text, kind == "info" and "primary" or kind, duration)
    return true
end

For ox_lib, add '@ox_lib/init.lua' to the resource's shared_scripts in fxmanifest.lua. The ESX and QBCore objects are the ones the script already loads when UseESX / UseQBCORE is on.

Not covered by CustomNotify: the pump and jerry can prompts (use DisplayStyle = "EVENT" for those), the fuel HUD, and the hose cards (the tanker's full stretch warning and Hose snapped).
Get the scriptGet Refueling NozzlesFiveM Fuel Script →
Can't find what you need? Ask on Discord — response in under 5 hours.