Integrations
Connect RB HUD to voice, seatbelt, nitrous, stress, and player lifecycle systems.
RB HUD handles framework status data internally and exposes a small event layer for other client resources. Use Exports for visibility, editor, minimap, compass, and oxygen control.
Consumed events
| Event | Scope | Parameters | Purpose |
|---|---|---|---|
seatbelt:client:ToggleSeatbelt | Client-local | state: boolean | Updates the seatbelt indicator. |
rb_hud:UpdateNitrous | Client-local | hasNos: boolean, nosLevel: number, pressure?: number | Pushes live nitrous and pressure values into the vehicle HUD. |
rb_props:MicrophoneState | Client-local | state: boolean | Optional RB Props integration for the extended-range microphone indicator. |
rb_hud:ReceiveStress | Client-to-server | amount: number | Adds positive stress through the selected framework. Values are floored and capped at 100 per event. |
Send normalized HUD values in the 0–100 range for nitrous level and pressure.
If no rb_hud:UpdateNitrous event arrives for 500 ms, the vehicle HUD falls
back to the vehicle state-bag values nosLevel and nosPurgeLevel.
Event examples
TriggerEvent('seatbelt:client:ToggleSeatbelt', true)
TriggerEvent('rb_hud:UpdateNitrous', true, 75, 20)
TriggerServerEvent('rb_hud:ReceiveStress', 2)emit("seatbelt:client:ToggleSeatbelt", true);
emit("rb_hud:UpdateNitrous", true, 75, 20);
emitNet("rb_hud:ReceiveStress", 2);These calls belong inside a class derived from BaseScript.
TriggerEvent("seatbelt:client:ToggleSeatbelt", true);
TriggerEvent("rb_hud:UpdateNitrous", true, 75, 20);
TriggerServerEvent("rb_hud:ReceiveStress", 2);Emitted client events
| Event | Payload | When it fires |
|---|---|---|
rb_hud:PlayerLoaded | None | The selected framework reports that the local player is loaded. |
rb_hud:PlayerLoggedOut | None | The selected framework reports a logout/unload. |
rb_hud:StatusUpdated | { hunger, thirst, stress } | One or more normalized status values change. Each value is clamped to 0–100. |
These are local client events, not network events. They are useful when another client resource needs to follow the same framework lifecycle as RB HUD.
AddEventHandler('rb_hud:StatusUpdated', function(status)
print(('hunger=%s thirst=%s stress=%s'):format(
status.hunger,
status.thirst,
status.stress
))
end)Voice integration
pma-voice is required. RB HUD reads its shared voice-mode configuration,
tracks the local proximity state bag, and listens for
pma-voice:radioActive. The HUD then displays proximity, normal talking, and
radio activity without extra setup.
The rb_props:MicrophoneState event is optional. RB HUD works without RB Props;
only the extended microphone indicator is omitted.
Framework behavior
| Framework | Status source | Stress write path |
|---|---|---|
| Qbox | Player metadata events | Player.Functions.SetMetaData('stress', value) |
| QB-Core | Player metadata events | Player.Functions.SetMetaData('stress', value) |
| ESX | esx_status ticks | esx_status:add |
| Ox Core | ox:statusTick | player.addStatus('stress', value) |
| Standalone | Disabled | Disabled |
Qbox and QB-Core use fullness values directly. ESX status values are normalized
from 0–1,000,000 to percentages. Ox Core hunger and thirst represent consumed
status, so RB HUD inverts them into fullness values.
In standalone mode, rb_hud:ReceiveStress, rb_hud:StatusUpdated, and the
framework-state callback are not registered. rb_hud:PlayerLoaded still fires
locally when RB HUD starts so framework-independent features initialize normally.
Internal contracts
The rb_hud:GetFrameworkState ox_lib callback and all NUI callbacks are
implementation details. Do not call them from other resources; they can change
without being treated as public API.