Client Exports & Events
Call these from any client script.
HUD
SetHudVisible
Shows or hides the HUD for the local player.
Export
exports.fwb_hud:SetHudVisible(visible)| Parameter | Type | Description |
|---|---|---|
visible | boolean | true to show, false to hide |
Example
-- hide the HUD while a cutscene plays
exports.fwb_hud:SetHudVisible(false)
Wait(10000)
exports.fwb_hud:SetHudVisible(true)IsHudVisible
Returns whether the HUD is on screen (false while hidden, before the player has loaded, or in cinematic mode).
Export
exports.fwb_hud:IsHudVisible()Returns
boolean
Example
if exports.fwb_hud:IsHudVisible() then
print('HUD is showing')
endOpenSettings
Opens the player's own HUD menu (same as /hudsettings).
Export
exports.fwb_hud:OpenSettings()Example
-- open the HUD menu from your own phone or radial menu
RegisterNetEvent('myphone:openHud', function()
exports.fwb_hud:OpenSettings()
end)OpenAdmin
Opens the admin panel (same as /fwb_hud). The server checks the fwb_hud.admin ACE; players without it see the permission screen.
Export
exports.fwb_hud:OpenAdmin()Example
-- an entry in your admin menu
exports.fwb_hud:OpenAdmin()CloseMenu
Closes the HUD menu or admin panel if one is open.
Export
exports.fwb_hud:CloseMenu()Example
AddEventHandler('myscript:forceCloseUi', function()
exports.fwb_hud:CloseMenu()
end)IsOpen
Returns whether the HUD menu or admin panel is open.
Export
exports.fwb_hud:IsOpen()Returns
boolean
Example
if not exports.fwb_hud:IsOpen() then
-- safe to open your own UI
endGetSettings
Returns the local player's HUD settings table.
Export
exports.fwb_hud:GetSettings()Returns
table
Example
local settings = exports.fwb_hud:GetSettings()
print(json.encode(settings))Statuses
SetStatus
Sets a status value on the HUD. Works for built-in statuses with source = 'event' and for your own custom ones.
Export
exports.fwb_hud:SetStatus(id, value)| Parameter | Type | Description |
|---|---|---|
id | string | Status id (hygiene, stress, or a custom one) |
value | number | 0–100 |
Example
-- your hygiene script updated the value
exports.fwb_hud:SetStatus('hygiene', 75)GetStatus
Returns one status value.
Export
exports.fwb_hud:GetStatus(id)| Parameter | Type | Description |
|---|---|---|
id | string | Status id |
Returns
number0–100, ornilif unknown
Example
local hunger = exports.fwb_hud:GetStatus('hunger')
if hunger and hunger < 20 then
print('You are hungry')
endGetStatuses
Returns every status value.
Export
exports.fwb_hud:GetStatuses()Returns
table—{ health = 86, armor = 0, hunger = 54, ... }
Example
local statuses = exports.fwb_hud:GetStatuses()
print(statuses.health, statuses.thirst)SetStatusHidden
Hides or shows one status icon from code. It keeps its place and comes back when shown again. Not saved: a restart shows everything.
Export
exports.fwb_hud:SetStatusHidden(id, hidden)| Parameter | Type | Description |
|---|---|---|
id | string | Status id |
hidden | boolean | true to hide, false to show |
Example
-- hide armor while the player is not on duty
exports.fwb_hud:SetStatusHidden('armor', true)IsStatusHidden
Returns whether a script hid this status with SetStatusHidden.
Export
exports.fwb_hud:IsStatusHidden(id)Returns
boolean
Example
if exports.fwb_hud:IsStatusHidden('armor') then
exports.fwb_hud:SetStatusHidden('armor', false)
endIsStatusShown
Returns whether a status is on the player's HUD: enabled by the admin, not hidden by the player and not hidden by a script.
Export
exports.fwb_hud:IsStatusShown(id)Returns
boolean
Example
if exports.fwb_hud:IsStatusShown('stress') then
print('Stress is on the HUD')
endStress
AddStress
Adds stress. Scaled by the player's job % (/fwb_hud → Features → Stress → Per job). Does nothing while stress is turned off.
Export
exports.fwb_hud:AddStress(amount)| Parameter | Type | Description |
|---|---|---|
amount | number | Stress to add |
Example
-- a robbery started
exports.fwb_hud:AddStress(10)RemoveStress
Removes stress, scaled by the job %. RelieveStress does the same.
Export
exports.fwb_hud:RemoveStress(amount)| Parameter | Type | Description |
|---|---|---|
amount | number | Stress to remove |
Example
-- player smoked a joint
exports.fwb_hud:RemoveStress(15)SetStress
Sets stress to an exact value (no job %).
Export
exports.fwb_hud:SetStress(value)| Parameter | Type | Description |
|---|---|---|
value | number | 0–100 |
Example
exports.fwb_hud:SetStress(50)ResetStress
Sets stress back to 0.
Export
exports.fwb_hud:ResetStress()Example
-- after a spa visit
exports.fwb_hud:ResetStress()GetStress
Returns the player's current stress.
Export
exports.fwb_hud:GetStress()Returns
number0–100
Example
if exports.fwb_hud:GetStress() >= 80 then
print('Very stressed')
endIsStressEnabled
Returns whether stress is turned on in /fwb_hud → Features.
Export
exports.fwb_hud:IsStressEnabled()Returns
boolean
Example
if exports.fwb_hud:IsStressEnabled() then
exports.fwb_hud:AddStress(5)
endVehicle
SetSeatbelt
Sets the seatbelt state shown on the HUD.
Export
exports.fwb_hud:SetSeatbelt(on)| Parameter | Type | Description |
|---|---|---|
on | boolean | true buckled, false unbuckled |
Example
-- your own seatbelt script buckled up
exports.fwb_hud:SetSeatbelt(true)IsSeatbeltOn
Returns whether the seatbelt is on.
Export
exports.fwb_hud:IsSeatbeltOn()Returns
boolean
Example
if not exports.fwb_hud:IsSeatbeltOn() then
print('Buckle up!')
endHasHarness
Returns whether the player is strapped into a racing harness (/fwb_hud → Features → Seatbelt → Racing harness). Always false while the harness is off. Drop-in replacement for exports['qb-smallresources']:HasHarness() and exports.qbx_seatbelt:HasHarness().
Export
exports.fwb_hud:HasHarness()Returns
boolean
Example
-- radial menu: no seat switching while strapped in
if exports.fwb_hud:HasHarness() then return endProgress
Shows FWB HUD's progress bar (the same one used for fitting nitro and the harness) and waits until it ends. The bar follows the player's HUD theme and shows a countdown. The player can cancel with X.

Export
exports.fwb_hud:Progress(options)Options
| Key | Type | Default | Description |
|---|---|---|---|
duration | number | — | Time in ms |
label | string | '' | Text on the bar |
icon | string | hourglass | HUD icon name or fa:<font awesome name> |
canCancel | boolean | true | X cancels |
disable | table | {} | move, car, combat = true blocks those controls while it runs |
anim | table | — | { dict, clip, flag } played while it runs |
scenario | string | — | Ped scenario played instead of anim |
Returns
boolean:truewhen it finished,falsewhen cancelled, the player died, or another bar was already running
Example
local ok = exports.fwb_hud:Progress({
duration = 4000,
label = 'Repairing engine',
icon = 'fa:wrench',
disable = { move = true, combat = true },
anim = { dict = 'mini@repair', clip = 'fixing_a_ped', flag = 49 },
})
if ok then print('repaired') endIsProgressActive
Returns whether an FWB HUD progress bar is running.
Export
exports.fwb_hud:IsProgressActive()Returns
boolean
SetCruise
Sets the cruise control state shown on the HUD.
Export
exports.fwb_hud:SetCruise(on)| Parameter | Type | Description |
|---|---|---|
on | boolean | true on, false off |
Example
exports.fwb_hud:SetCruise(false)IsCruiseOn
Returns whether cruise control is on.
Export
exports.fwb_hud:IsCruiseOn()Returns
boolean
Example
if exports.fwb_hud:IsCruiseOn() then
print('Cruise control active')
endClient Events
| Event | Arguments | What it does |
|---|---|---|
fwb_hud:status:<id> | value | Feed a status 0–100. |
fwb_hud:client:addStress | amount | Add stress (can be sent from the server). |
fwb_hud:client:relieveStress | amount | Remove stress (can be sent from the server). |
TriggerEvent('fwb_hud:status:hygiene', 60)Framework HUD events (hud:client:UpdateStress, hud:client:UpdateNeeds, seatbelt:client:ToggleSeatbelt, hud:client:ShowAccounts…) keep working — see Integrations.
