Skip to content

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.

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.

Each status names one source. Four types exist; the examples below all feed the same radiation status.

Fields in the menu: the resource name and the export name. Your script answers with the current value:

-- radiation_zones/client.lua
exports('GetRadiation', function()
return currentRadiation -- number, in the min–max range you declared
end)

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.

One field: the key. The HUD reads it from the player’s own statebag:

-- Client
LocalPlayer.state:set('radiation', 42, false)
-- Server
Player(source).state:set('radiation', 42, true)

Suited to scripts that already keep their state in statebags.

One field: the event name. The HUD listens; the script fires it with the value whenever it changes:

-- Client
TriggerEvent('radiation:changed', 42)
-- Server
TriggerClientEvent('radiation:changed', playerId, 42)

The last value received stays until the next one arrives.

One field: the key. Nothing is polled; the value is delivered only when it changes:

-- Client
exports.aurora_hud:SetCustomStatus('radiation', 42)
-- Server
exports.aurora_hud:SetCustomStatus(playerId, 'radiation', 42)

The cheapest option when values change rarely.

In order of likelihood:

  1. 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.
  2. The key or event name does not match what your script actually uses. Case matters.
  3. 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.
  4. 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.