Skip to content

Exports ​

Client ​

client

ExportReturnsDescription
Notify(data) / Notify(title, message?, type?, duration?)toast idShow or update a toast. See Notifications
DismissNotify(id)Remove a toast
ClearNotify()Remove all toasts
ShowPrompt(prompt)Show or replace an interaction prompt
HidePrompt(id?)Hide one prompt, or all prompts
Progress(data)booleanBlocking. true = finished, false = cancelled. See Progress bars
CancelProgress()booleanCancel the running bar
IsProgressActive()boolean
SetTheme(brand?, strength?)'#4f7bff', 'accent' | 'tiles' | 'glass'. nil → neutral
SetVisible(visible)Hide or show the whole HUD (cutscenes, other UIs)
IsVisible()boolean
SetHotbar(slots, selected?, visible?){ slot, label, icon, tint?, count? }[] (max 10). visible forces show / hide
SetSeatbelt(on)Also sets LocalPlayer.state.seatbelt
GetSeatbelt()boolean
lua
local id = exports.np_hud:Notify('Saved', 'Your outfit was saved.', 'success', 3000)
exports.np_hud:SetTheme('#4f7bff', 'tiles')
exports.np_hud:SetVisible(false)
exports.np_hud:SetHotbar({ { slot = 1, label = 'Pistol', icon = 'gun' } }, 1)
exports.np_hud:SetSeatbelt(true)

Server ​

server

ExportDescription
Notify(source, data, onAction?)Toast for one player. onAction(player, action, id) runs after validation
NotifyAll(data, onAction?)Toast for everyone
Announce(data)Top-centre announce toast for everyone
lua
exports.np_hud:Notify(source, { title = 'Paycheck', message = 'You received **$450**.', type = 'success', icon = 'money-bill' })
exports.np_hud:NotifyAll({ title = 'Weather', message = 'A storm is coming.', icon = 'cloud-bolt' })
exports.np_hud:Announce({ title = 'Server restart', message = 'Restart in **15 minutes**.', tint = 'red' })

Server toast ids start with sv:, client toast ids with cl:, and generated progress ids with pg:.

np_* FiveM resources