Framework, display and notifications
Everything below lives in refuelingnozzlesv2/config.lua.
Framework
UseESX— enable for ESXUseNewESX— enable in addition toUseESXon newer ESX versionsUseQBCORE— enable for QBCoreUseTarget— use qb-target or ox_target instead of key promptsUseOXTarget— use ox_target rather than qb-target (UseTargetmust also be true)UseOXInventory— hand the jerry can out as theWEAPON_PETROLCANitem in ox_inventoryUseJerryCanAsItem— hand the jerry can out as an ESX / QBCore inventory item instead of a weaponFuelDecor— 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 kWhCurrency— the money symbol on every screen, prompt and messageTheme— 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 dayHudTheme— the HUD, prompts and cards:"light","dark"or"auto"PromptHeight— how high the pump prompt sits above the pump's base, in metresPromptOut— 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 stepInteractionKey2— 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
HoverTextFontfont - 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 stationShowAllGasStations— a blip on every station inGasStations. 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~…) removedkind—"error","success","warning"or"info", from the message's colourduration— 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
endFor 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 byCustomNotify: the pump and jerry can prompts (useDisplayStyle = "EVENT"for those), the fuel HUD, and the hose cards (the tanker's full stretch warning and Hose snapped).
