Custom statuses
Define your own status icons in Aurora HUD and feed them from any script, by export, statebag, event, or push.
Server-defined statuses (radiation, a safe-zone marker, gang reputation) drawn with the
same icons, colours and bar styles as the built-in ones. Defined in /hud → Admin →
Custom statuses; no file is involved.
Players can recolour and hide a custom status, unless the server locks those choices at definition time.
Two kinds
Section titled “Two kinds”| Kind | Carries | Shown as |
|---|---|---|
| Static | on / off | The icon, lit or absent |
| Numbered | a value in your own range | A bar, like hunger or thirst |
A numbered status takes a min and a max; the HUD maps the incoming value onto the bar, so raw values such as 300–700 or −20–45 need no conversion.
For a static status, any truthy value lights it. false, 0 and nil turn it off.
Where the value comes from
Section titled “Where the value comes from”Each status names one source. Four types exist; the examples below all feed the same
radiation status.
Export: the HUD asks your script
Section titled “Export: the HUD asks your script”Fields in the menu: the resource name and the export name. Your script answers with the current value:
-- radiation_zones/client.luaexports('GetRadiation', function() return currentRadiation -- number, in the min–max range you declaredend)Polled while the player is in game. If the export throws, Support names the resource, the export and the status. If the resource is not running, the status reads zero and nothing is logged.
Statebag: the HUD reads a key
Section titled “Statebag: the HUD reads a key”One field: the key. The HUD reads it from the player’s own statebag:
-- ClientLocalPlayer.state:set('radiation', 42, false)
-- ServerPlayer(source).state:set('radiation', 42, true)Suited to scripts that already keep their state in statebags.
Event: your script announces changes
Section titled “Event: your script announces changes”One field: the event name. The HUD listens; the script fires it with the value whenever it changes:
-- ClientTriggerEvent('radiation:changed', 42)
-- ServerTriggerClientEvent('radiation:changed', playerId, 42)The last value received stays until the next one arrives.
Push: your script calls the HUD
Section titled “Push: your script calls the HUD”One field: the key. Nothing is polled; the value is delivered only when it changes:
-- Clientexports.aurora_hud:SetCustomStatus('radiation', 42)
-- Serverexports.aurora_hud:SetCustomStatus(playerId, 'radiation', 42)The cheapest option when values change rarely.
When it reads zero
Section titled “When it reads zero”In order of likelihood:
- The source resource is not running. Nothing is logged for this one, so compare the
name in the menu against the folder as it sits in
resources. - The key or event name does not match what your script actually uses. Case matters.
- The value is not a number or a boolean. A number written as text still works; anything the HUD cannot read as a number reads as zero.
- A numbered status is being fed values outside its min–max. They clamp to the ends, so a bar stuck at 0 or 100 usually means the range is wrong, not the feed.