Integrations
Point Aurora HUD at your fuel, inventory, notification, voice, phone and ambulance scripts.
config/client.lua selects which of the scripts the HUD supports are running on this
server. Once selected, they are read by name and reported back in /hud → Support. That
part is Roll Call, and it is how you find out when one of
them stops answering.
The selection block
Section titled “The selection block”The selection sits at the top of the file:
Custom.use = { fuel = 'oxfuel', -- oxfuel | lc | legacy | qb | cdn | rcore | qs inventory = 'ox', -- ox | qs | tgiann | jaksam | ak47 | ak47qb notify = 'oxlib', -- oxlib | okok | brutal | wasabi | mythic | pnotify voice = 'pma', -- pma | tokovoip | saltychat phone = '', -- lb | gks | road | qs}Each line takes one label from the list beside it. An empty line falls back to the HUD’s
own behaviour: an empty fuel reads the vehicle directly, an empty phone leaves the
phone icon unlit.
The values above are the defaults.
| 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. Server-side counts are configured separately, in config/server.lua |
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 |
Renaming a resource
Section titled “Renaming 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 in the resources directory. It is the only place the name
is written; the adapter receives it as resource.
Adding an unlisted script
Section titled “Adding an unlisted script”Most fuel scripts answer the same GetFuel(vehicle) call. An entry is a name and a reader:
Custom.fuel = { -- ... myfuel = { name = 'my_fuel_script', get = readFuelExport },}Then select it with 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 while the HUD runs |
init |
init(resource) |
fire events, run once at start-up |
Unset fields keep coming from the script selected in voice. An init that pushes through
exports.aurora_hud:SetVoice passes its resource name as a second argument: a voice script
then stays under the phone, and /hud → Support names it instead of reporting a custom
source.
Repeated notifications
Section titled “Repeated notifications”A repeat of the same id within 2 seconds is dropped before it reaches the notification
script. The id is the deduplication key: a message sent without one is always passed on.
The id is forwarded to scripts whose API accepts one:
ox_lib in the props table, wasabi_notify as
the last argument of :notify(). Adapters that ignore it still work.
Downed state
Section titled “Downed state”Ambulance scripts write the downed state to the player’s state bag, each under its own
key. Custom.downed lists the keys the HUD watches. Any one reading as down counts, on top
of the ped actually dying:
Custom.downed = { isDead = true, -- esx_ambulancejob, wasabi_ambulance -- ... ['qbx_medical:deathState'] = function(state) return (tonumber(state) or 1) >= 2 end,}true reads the key as yes or no; a function turns a number into one.
qb-ambulancejob keeps the state in
the player’s metadata instead, and on QBCore the HUD reads it from there. Support names
the key that answered.
Reserve ammo from inventory items
Section titled “Reserve ammo from inventory items”The weapon widget reads the weapon in hand and its reserve from the game.
ox_inventory also says which ammo item the
weapon uses. For other inventories, Custom.ammoItems maps the game’s ammo types to your
items:
Custom.ammoItems = { AMMO_PISTOL = { item = 'pistol_ammo', rounds = 30 }, AMMO_SMG = 'smg_ammo',}A plain item name counts one round per item; with rounds, each item is a box of that
many. It ships empty. The commented lines in the file are the items
qb-weapons uses.
Postal codes
Section titled “Postal codes”Custom.postal names the postal script and how to ask it for the code:
Custom.postal = { name = 'nearest-postal', get = function(resource) return exports[resource]:getPostal() end,}Another script with a client export that returns the code works by changing those two lines.
Functions the HUD calls when its own features change, for forwarding that state on:
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 held outside the framework
Section titled “Money held outside the framework”For cash as an item, a points system, or any balance the client can read on its own:
function Custom.GetMoney() return { cash = LocalPlayer.state.cash, bank = LocalPlayer.state.bank }endA returned table takes precedence over the framework. nil, the default, keeps the HUD
reading player.money / ESX accounts. An omitted field falls back to the framework.
Banking scripts answer on the server. See Banking.
Banking
Section titled “Banking”Only needed when the balance lives in the banking script itself rather than in the
framework’s bank account. One is recognised:
| Script | Select |
|---|---|
| tgg-banking | tgg |
ps-banking and Renewed-Banking keep the personal balance in the framework’s account, so they need nothing here.
The selection goes in the server config, because that is the side these scripts answer on:
Custom.use = { bank = 'tgg', -- tgg}The catalogue below it holds the adapters, in the same shape as the client ones:
Custom.bank = { tgg = { name = 'tgg-banking', get = function(src, resource) local account = exports[resource]:GetPersonalAccountByPlayerId(src) return account and account.balance end, },}get receives the player’s server id, the resource name and the framework identifier.
Other scripts are added as further entries in the same shape, then selected by label.
Replacing a HUD feature with your own script
Section titled “Replacing a HUD feature with your own script”Turn the matching feature off in /hud → Admin, then push its state in through the
exports.
While a HUD feature is on, the HUD is the source of truth and ignores external values. The
export returns false to report that.
The seatbelt of qbx_seatbelt and of
qb-smallresources, and the cruise
control of qbx_smallresources and of
qb-smallresources, already reach the vehicle block this way. Custom.seatbelt and
Custom.cruise in config/client.lua name the resource, qbx_seatbelt and
qbx_smallresources by default; while it runs, its lamp shows as soon as a player gets in.