RB
RB Studios

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

EventScopeParametersPurpose
seatbelt:client:ToggleSeatbeltClient-localstate: booleanUpdates the seatbelt indicator.
rb_hud:UpdateNitrousClient-localhasNos: boolean, nosLevel: number, pressure?: numberPushes live nitrous and pressure values into the vehicle HUD.
rb_props:MicrophoneStateClient-localstate: booleanOptional RB Props integration for the extended-range microphone indicator.
rb_hud:ReceiveStressClient-to-serveramount: numberAdds 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

EventPayloadWhen it fires
rb_hud:PlayerLoadedNoneThe selected framework reports that the local player is loaded.
rb_hud:PlayerLoggedOutNoneThe 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

FrameworkStatus sourceStress write path
QboxPlayer metadata eventsPlayer.Functions.SetMetaData('stress', value)
QB-CorePlayer metadata eventsPlayer.Functions.SetMetaData('stress', value)
ESXesx_status ticksesx_status:add
Ox Coreox:statusTickplayer.addStatus('stress', value)
StandaloneDisabledDisabled

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.

On this page