Replacing qb-core notify

This page will contain information about how to replace the qb-core notifications with orbit-dynamichud's built-in notification system.

🔁 Replacing qb-core Notify

If your server uses QBCore’s built-in notification system, you can redirect it to orbit-dynamichud so that all existing:

QBCore.Functions.Notify(...)

calls automatically use the Orbit Dynamic HUD notification system.

This ensures full compatibility without editing every script.


📂 File Location

Navigate to:

qb-core/client/functions.lua

Inside this file, locate:

function QBCore.Functions.Notify(text, texttype, length, icon)

✏️ What To Replace It With

Replace the entire function with the following:

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

🧠 What This Does

Before:

After:

All scripts using:

will now display an Orbit HUD notification instead.

No other script changes required.


✅ Fully Supported Structure

This replacement supports both standard QBCore usage styles:

Simple String Usage

Table Usage

Both formats are properly converted to the Orbit notification structure.


⚠️ Important Notes

  • It is recommended that you do this change before server start to prevent unforeseen issues.

  • Restart qb-core after making the change.

  • If you update qb-core, you will need to reapply this modification.


🎯 Result

After this change, your entire QBCore server will use:

Orbit Dynamic HUD notifications

while maintaining full compatibility with existing scripts and resources.

Last updated