Integrations
config/client.lua answers one question: which of the scripts the HUD knows about does
your server actually run.
The block you edit
Section titled “The block you edit”Everything you normally need is at the top of the file:
Custom.use = { fuel = 'oxfuel', -- oxfuel | lc | legacy | qb | cdn | rcore | qs inventory = 'ox', -- ox notify = 'oxlib', -- oxlib | okok | brutal | wasabi | mythic | pnotify voice = 'pma', -- pma | tokovoip | saltychat phone = '', -- lb | gks | road | qs}Pick one label per line from the list beside it. Leave a line empty and the HUD uses its
own behaviour — an empty fuel makes it read the vehicle directly, an empty phone
means no phone icon.
The values above are the defaults, chosen because they are the most common.
| Line | What the HUD needs it for | If left empty |
|---|---|---|
fuel |
The fuel gauge, 0–100 | Reads the vehicle’s own fuel level |
inventory |
Reserve ammo and consumable counts | Falls back to your framework’s inventory |
notify |
Its own messages, like cruise control feedback | ox_lib, which is a hard dependency anyway |
voice |
Proximity, radio and talking state | pma-voice |
phone |
Lighting the phone icon during a call | No phone icon |
Renamed a resource?
Section titled “Renamed a resource?”The catalogue below the block holds the actual resource names:
lc = { name = 'lc_fuel', get = function(vehicle, resource) ... end }-- ^ the real folder namename must match the folder as it sits in your resources directory. If you renamed
lc_fuel to something else, change name — that is the only place the name is written,
and the adapter receives it as resource, so nothing else needs touching.
Adding a script that is not listed
Section titled “Adding a script that is not listed”Most fuel scripts answer the same GetFuel(vehicle) call, so adding one is a name and
nothing else:
Custom.fuel = { -- ... myfuel = { name = 'my_fuel_script', get = readFuelExport },}Then select it: fuel = 'myfuel'.
For voice and phone, an entry can use either shape, or both:
| Shape | Signature | For scripts that |
|---|---|---|
read |
read(state, resource) |
answer questions — polled four times a second |
init |
init(resource) |
fire events — run once at start-up |
Any field you do not set keeps coming from pma-voice.
Hooks that are yours to fill in
Section titled “Hooks that are yours to fill in”Further down the file are functions the HUD calls when its own features change. Pass the state on to your other scripts here:
function Custom.OnSeatbeltChanged(on) LocalPlayer.state:set('seatbelt', on, false)end
function Custom.OnSignalChanged(mode) -- 0 off, 1 left, 2 right, 3 hazardsend
function Custom.OnCruiseChanged(active, speedKmh)endMoney that does not live in your framework
Section titled “Money that does not live in your framework”A standalone banking resource, cash as an item, a points system:
function Custom.GetMoney() return { cash = LocalPlayer.state.cash, bank = LocalPlayer.state.bank }endReturn a table and those numbers win over the framework. Return nil — the default — and
the HUD keeps reading player.money / ESX accounts. Either field may be omitted; the
framework fills in the one you leave out.
Running your own seatbelt, voice or phone script?
Section titled “Running your own seatbelt, voice or phone script?”Turn the matching feature off in /hud → Admin, then push its state to the HUD from
your script. See Exports.
While a HUD feature is on, the HUD is the source of truth and ignores external values — the
export returns false to tell you so.