Orbit StudiosOrbit Studios
Orbit Studios Resourcesorbit-dynamichud

Interface

DynamicHUD interface integrations for notifications, TextUI, skill checks, and progress bars.

Interface

Interface integrations are UI features exposed through DynamicHUD or planned for DynamicHUD-style integration.

DynamicHUD notifications use the client event orbit-dynamichud:notify.

resources/[custom]/client/notifications.lua
TriggerEvent('orbit-dynamichud:notify', {
    description = 'Vehicle locked',
    type = 'success',
    duration = 3000
})

Server scripts should send the notification to a specific player with TriggerClientEvent.

resources/[custom]/server/main.lua
TriggerClientEvent('orbit-dynamichud:notify', source, {
    description = 'Welcome back',
    type = 'info',
    duration = 3000
})

When using orbit-lib, set Config.Notify = 'orbit-dynamichud' if you want supported Orbit resources to send notifications through DynamicHUD.

resources/[orbit]/orbit-lib/config.lua
Config.Notify = 'orbit-dynamichud'

Replace lib.notify if you want every existing lib.notify({...}) call to use DynamicHUD notifications without editing every resource.

Open ox_lib/resource/interface/client/notify.lua, find the client-side lib.notify function, and replace the function body with the DynamicHUD event.

resources/[standalone]/ox_lib/resource/interface/client/notify.lua
---`client`
---@param data NotifyProps
---@diagnostic disable-next-line: duplicate-set-field
function lib.notify(data)
    TriggerEvent('orbit-dynamichud:notify', data)
end

After this, calls like lib.notify({ description = 'Saved', type = 'success' }) are displayed through Orbit DynamicHUD.

Replace QBCore's notify helper if you want existing QBCore.Functions.Notify(...) calls to use DynamicHUD.

Open qb-core/client/functions.lua, find QBCore.Functions.Notify, and replace the whole function.

resources/[qb]/qb-core/client/functions.lua
function QBCore.Functions.Notify(text, texttype, length, icon)
    local data = {}

    if type(text) == "table" then
        local ttext = text.text or "Placeholder"
        local caption = text.caption or nil
        local ttype = texttype or "primary"
        local duration = length or 5000

        data = {
            title = caption,
            description = ttext,
            duration = duration,
            type = ttype,
            icon = icon
        }
    else
        local ttype = texttype or "primary"
        local duration = length or 5000

        data = {
            title = nil,
            description = text,
            duration = duration,
            type = ttype,
            icon = icon
        }
    end

    TriggerEvent('orbit-dynamichud:notify', data)
end

This preserves both common QBCore notify styles: string messages and table messages with text and caption.

Replace ESX.ShowNotification if you want existing ESX scripts to use DynamicHUD notifications.

Open es_extended/client/functions.lua, find ESX.ShowNotification, and replace the whole function.

resources/[esx]/es_extended/client/functions.lua
---@param message string The message to show
---@param notifyType? string The type of notification to show
---@param length? number The length of the notification
---@param title? string The title of the notification
---@param position? string The position of the notification
---@return nil
function ESX.ShowNotification(message, notifyType, length, title, position)
    local data = {
        title = title or nil,
        description = message,
        duration = length or 5000,
        type = notifyType or "info"
    }

    TriggerEvent('orbit-dynamichud:notify', data)
end

The position argument is kept in the function signature for compatibility, but DynamicHUD handles notification placement itself.

On this page