Skip to content

Integrations and Events

How to connect your own fuel, voice, minimap, music, exports, and HUD events

If you want to adapt the HUD to your own server setup, these are the most important files:

  • Framework bridge: modules/bridge/*
  • Fuel helper: modules/utils/client.lua
  • Voice integration: modules/voice/client.lua
  • Music integration: modules/music/client.lua
  • Seatbelt logic and exports: modules/seatbelt/client.lua
  • Vehicle control helpers: modules/car_control/client.lua

Framework Integration#

Files:

  • modules/bridge/client.lua
  • modules/bridge/server.lua
  • modules/bridge/esx/*
  • modules/bridge/qb/*
  • modules/bridge/qbx/*

These files handle player loaded events, hunger/thirst/stress updates, and death status updates for supported frameworks.

If your framework is customized, this is the first place to adjust.

Fuel Integration#

File: modules/utils/client.lua

The HUD can read fuel from:

  • ox_fuel
  • LegacyFuel
  • cdn-fuel
  • ps-fuel

If you use another fuel script, update Utils.GetVehicleFuelLevel(vehicle).

Voice Integration#

File: modules/voice/client.lua

Supported by default:

  • pma-voice
  • SaltyChat

This file controls:

  • Radio channel display
  • Talking range display

If your voice script is different, update this file.

Music Integration#

File: modules/music/client.lua

The built-in music widget uses xsound.

If you do not want music support, disable Config.DefaultHudSettings.music_info.active.

If you want different music behavior, this is the file to edit.

Manual Gear and Minimap Editing#

These optional integrations are used directly by the HUD:

  • hrsgears
  • edit_mini_map

Manual gear is controlled through modules/car_control/client.lua.

Live minimap placement is triggered from client.lua through:

lua
exports['edit_mini_map']:usePlacer(...)

Exports#

The actual current exports are:

lua
exports['0r-hud-v3']:ToggleVisible(state)
exports['0r-hud-v3']:SetSeatBeltState(state)
exports['0r-hud-v3']:GetCurrentSeatBeltState()

Common usage:

lua
exports['0r-hud-v3']:ToggleVisible(false)

Events#

Useful client events supported by the HUD:

lua
TriggerEvent('0r-hud-v3:client:setVehicleNitroValue', nitroValue)
TriggerEvent('hud:client:UpdateNitrous', hasNitro, level, state)
TriggerEvent('seatbelt:client:ToggleSeatbelt')

There is also support for:

  • pma-voice:setTalkingMode
  • SaltyChat_RadioChannelChanged
  • SaltyChat_VoiceRangeChanged
  • 0r-hud:Client:SetManualGear

UI Customization#

If you want to edit the UI itself, the source is under:

lua
ui/dev

Build it after editing:

bash
npm install
npm run build