Replace core notifications
Replacing core notification with vms_notify
Replace ESX Notifications
Open @es_extended/client/functions.lua.
Search for
function ESX.ShowNotification.Replace the function with this one below.
function ESX.ShowNotification(message, type, length, custom_icon)
    local message = message
    local colors = type and type == "main" and "#19a3ff" or type == "success" and "#2bff72" or type == "error" and "#ff2b2b" or "#YOUR_DEFAULT_COLOR"
    local icon = custom_icon or "YOUR_DEFAULT_FONT_AWESOME"
    exports['vms_notify']:Notification("YOUR_DEFAULT_TITLE", message, length or 4500, colors, icon)
endReplace QB-Core Notifications
Open @qb-core/client/functions.lua.
Search for
function QBCore.Functions.Notify.Replace the function with this one below
function QBCore.Functions.Notify(text, textype, length, custom_icon)
    if type(text) == "table" then
        local message = text.text
        local length = length or 5000
        local color = texttype == 'primary' and '#1c75d2' or texttype == 'success' and '#20bb44' or texttype == 'error' and '#c10114' or '#YOUR_DEFAULT_COLOR'
        local icon = custom_icon or 'YOUR_DEFAULT_FONT_AWESOME'
        exports["vms_notify"]:Notification('YOUR_DEFAULT_TITLE', message, length, color, icon)
    else
        local color = texttype == 'primary' and '#1c75d2' or texttype == 'success' and '#20bb44' or texttype == 'error' and '#c10114' or '#YOUR_DEFAULT_COLOR'
        local icon = custom_icon or 'YOUR_DEFAULT_FONT_AWESOME'
        local length = length or 5000
        exports["vms_notify"]:Notification('YOUR_DEFAULT_TITLE', text, length, color, icon)
    end
end Last updated
Was this helpful?