Skip to content

Replace Notifications

This guide shows you how to replace your framework’s default notification system with ARS Hud V3 notifications. After making this change, every script on your server that uses the framework’s standard notify function (banking, MDT, inventory, garage, etc.) will automatically display notifications through the HUD.


  1. How It Works
  2. QBCore Replacement
  3. QBX (Qbox) Replacement
  4. ESX Replacement
  5. Server-Side Notes
  6. Type Mapping
  7. Verification
  8. Troubleshooting

Most FiveM scripts call a single framework function to show notifications:

  • QBCoreQBCore.Functions.Notify(text, type, duration) on the client, which also gets triggered by the QBCore:Notify event from the server
  • QBX (Qbox)exports.qbx_core:Notify(text, type, duration) on the client, which delegates to ox_lib’s lib.notify(). Also backwards-compatible with QBCore.Functions.Notify via a bridge
  • ESXESX.ShowNotification(message, type, duration, title) on the client, which also gets triggered by the esx:showNotification event from the server

By replacing this single function inside your framework, every script that calls it will route notifications through ARS Hud V3 instead. No per-script changes are needed.

Important: This modifies your framework’s source files. Back up the files before making changes. After updating your framework, you will need to re-apply these changes.


Open qb-core/client/functions.lua in your qb-core resource.

Search for function QBCore.Functions.Notify. The default implementation looks like this:

function QBCore.Functions.Notify(text, texttype, length, icon)
local message = {
action = 'notify',
type = texttype or 'primary',
length = length or 5000,
}
if type(text) == 'table' then
message.text = text.text or 'Placeholder'
message.caption = text.caption or 'Placeholder'
else
message.text = text
end
if icon then message.icon = icon end
SendNUIMessage(message)
end

Replace the entire function with the following:

function QBCore.Functions.Notify(text, texttype, length, icon)
local title = ''
local message = ''
if type(text) == 'table' then
title = text.caption or ''
message = text.text or ''
else
message = tostring(text)
end
local notifyType = 'default'
if texttype == 'primary' then
notifyType = 'default'
elseif texttype == 'error' then
notifyType = 'error'
elseif texttype == 'success' then
notifyType = 'success'
elseif texttype == 'inform' or texttype == 'police' or texttype == 'ambulance' then
notifyType = 'inform'
elseif texttype == 'warning' then
notifyType = 'warning'
end
exports['ars_hud']:Notify(title, message, notifyType, length or 5000)
end

Save the file, then restart qb-core and ars_hud in your server console:

restart qb-core
restart ars_hud

Tip: If your qb-core resource name is different (for example qb-core-custom), adjust the folder path accordingly.


QBX uses ox_lib’s lib.notify() for all notifications. The Notify function is exported from qbx_core and handles parsing the title and description before passing them to lib.notify. Replacing this single function routes all QBX notifications through ARS Hud.

Note: QBX includes a QBCore backwards-compatibility bridge — QBCore.Functions.Notify(...) calls exports.qbx_core:Notify(...) internally. Replacing the QBX Notify function also catches scripts still using the QBCore syntax.

Open qbx_core/client/functions.lua in your qbx_core resource.

Search for function Notify(. The default implementation looks like this:

function Notify(text, notifyType, duration, subTitle, notifyPosition, notifyStyle, notifyIcon, notifyIconColor)
local title, description
if type(text) == 'table' then
title = text.text or 'Placeholder'
description = text.caption or nil
elseif subTitle then
title = text
description = subTitle
else
description = text
end
local position = notifyPosition or positionConfig
lib.notify({
id = title,
title = title,
description = description,
duration = duration,
type = notifyType,
position = position,
style = notifyStyle,
icon = notifyIcon,
iconColor = notifyIconColor
})
end
exports('Notify', Notify)

Replace the function (keep the exports line at the bottom) with:

function Notify(text, notifyType, duration, subTitle, notifyPosition, notifyStyle, notifyIcon, notifyIconColor)
local title = ''
local description = ''
if type(text) == 'table' then
title = text.text or ''
description = text.caption or ''
elseif subTitle then
title = tostring(text)
description = tostring(subTitle)
else
description = tostring(text)
end
local arsType = 'default'
if notifyType == 'inform' then
arsType = 'inform'
elseif notifyType == 'error' then
arsType = 'error'
elseif notifyType == 'success' then
arsType = 'success'
elseif notifyType == 'warning' then
arsType = 'warning'
end
exports['ars_hud']:Notify(title, description, arsType, duration or 5000)
end
exports('Notify', Notify)

Save the file, then restart qbx_core and ars_hud in your server console:

restart qbx_core
restart ars_hud

Tip: If you also have the QBCore bridge enabled in QBX (qbx_core/bridge/qb/), you do not need to edit it separately. The bridge calls exports.qbx_core:Notify(...) which routes through your replaced function.


The steps differ slightly between modern ESX (which uses esx_notify) and legacy ESX (which uses GTA native help text).

Open esx_notify/client/main.lua in your esx_notify resource.

Search for the Notify function that handles displaying notifications. The default implementation uses its own NUI system.

Replace the Notify export function body with:

function Notify(type, length, message, title, position)
local notifyType = 'default'
if type == 'info' then
notifyType = 'inform'
elseif type == 'error' then
notifyType = 'error'
elseif type == 'success' then
notifyType = 'success'
elseif type == 'warning' then
notifyType = 'warning'
end
exports['ars_hud']:Notify(title or '', message or '', notifyType, length or 5000)
end
restart es_extended
restart esx_notify
restart ars_hud

Open es_extended/client/functions.lua in your es_extended resource.

Search for function ESX.ShowNotification. The default implementation uses GTA native help text:

ESX.ShowNotification = function(msg, flash, saveToBrief, hudColorIndex)
if saveToBrief == nil then saveToBrief = true end
AddTextEntry('esxNotification', msg)
BeginTextCommandThefeedPost('esxNotification')
if hudColorIndex then ThefeedNextPostBackgroundColor(hudColorIndex) end
EndTextCommandThefeedPostTicker(flash or false, saveToBrief)
end

Replace the function with:

ESX.ShowNotification = function(msg, flash, saveToBrief, hudColorIndex)
exports['ars_hud']:Notify('', tostring(msg), 'default', 5000)
end
restart es_extended
restart ars_hud

You do not need to change server-side code. Here is why:

Server scripts call QBCore.Functions.Notify(source, text, type, length), which triggers TriggerClientEvent('QBCore:Notify', source, text, type, length). On the client, this event calls QBCore.Functions.Notify(text, type, length). Since you replaced the client-side function, server-triggered notifications are caught automatically.

Server scripts call exports.qbx_core:Notify(source, text, type, duration, ...) which triggers TriggerClientEvent('ox_lib:notify', source, ...). Since you replaced the client-side Notify function (which is what receives the forwarded notification), both direct client calls and server-triggered calls route through ARS Hud. Alternatively, you can also edit qbx_core/server/functions.lua to replace the server-side Notify function if you want to change the routing on the server side as well.

Server scripts call xPlayer.showNotification(message) or TriggerClientEvent('esx:showNotification', source, message). Both end up calling ESX.ShowNotification on the client. Since you replaced that function, server-triggered notifications are caught automatically.


QBCore Type ARS Hud Type Description
'primary' 'default' Default informational notification
'error' 'error' Error or failure notification
'success' 'success' Success notification
'inform' 'inform' Informational notification
'police' 'inform' Police notification
'ambulance' 'inform' EMS notification
'warning' 'warning' Warning notification
QBX / ox_lib Type ARS Hud Type Description
'inform' 'inform' Informational notification
'error' 'error' Error notification
'success' 'success' Success notification
'warning' 'warning' Warning notification
ESX Type ARS Hud Type Description
'info' 'inform' Informational notification
'error' 'error' Error notification
'success' 'success' Success notification
'warning' 'warning' Warning notification

After making the changes and restarting your server:

  1. Join with a character and verify the HUD loads normally
  2. Trigger a notification from any script that uses the framework’s notify system (for example, use an ATM, open your inventory, or receive a salary payment)
  3. Confirm the notification appears in the ARS Hud notification style instead of the default GTA-style notification or old framework style
  4. Test different notification types by running a script that sends error, success, and inform types

You can test directly from your server console or chat:

QBCore test (run in client console or add to a temporary script):

QBCore.Functions.Notify('Test default', 'primary', 5000)
QBCore.Functions.Notify('Test success', 'success', 5000)
QBCore.Functions.Notify('Test error', 'error', 5000)

QBX test (run in client console or add to a temporary script):

exports.qbx_core:Notify('Test inform', 'inform', 5000)
exports.qbx_core:Notify('Test success', 'success', 5000)
exports.qbx_core:Notify('Test error', 'error', 5000)

ESX test (run in client console or add to a temporary script):

ESX.ShowNotification('Test notification from ESX')

  • Verify you saved the file after editing
  • Restart both the framework resource and ars_hud in your server console
  • Check that ars_hud is running before you test — run status in the server console and look for it in the resource list
  • Make sure no other notification replacement script (such as okokNotify, cd_notifications, or esx_notify in some setups) is overriding the function after your change
  • Confirm ars_hud is started and the HUD is visible on screen
  • Check the client console (F8) for errors related to ars_hud or the framework
  • Verify the Notify export works by calling it directly: exports['ars_hud']:Notify('Test', 'Direct export test', 'success', 5000)
  • Make sure you replaced the function body only, not the function signature — the function name and parameters must stay the same
  • Check for Lua syntax errors (missing end, unbalanced parentheses, etc.)
  • Restore the backup file if needed and try again
  • Framework updates overwrite your changes. Keep a backup of your modified file
  • Re-apply the changes after every framework update
  • Some frameworks support custom code injection via modules or plugins — check your framework’s documentation for a less intrusive approach

Note: This guide is written by a third party. If you find any incorrect or outdated information, please contact us on Discord so we can update it for you.