❀️Frameworks


triangle-exclamation

ATENTION!


QB-Core

  1. Locate the file: qb-core/client/functions.lua

  2. Replace the QBCore.Functions.Notify function with:

function QBCore.Functions.Notify(text, texttype, length)
    local convert = {
        ["primary"] = 'info',
        ["police"] = 'lspd',
        ["ambulance"] = 'ems'
    }
    
    texttype = texttype or 'info'
    texttype = convert[texttype] or texttype

    if type(text) == "table" then
        TriggerEvent('mg-notify:notify', 
            text.text or 'Placeholder', 
            texttype, 
            text.caption or 'Placeholder', 
            length or 5000
        )
    else
        TriggerEvent('mg-notify:notify', text, texttype, nil, length or 5000)
    end
end

Key Features

πŸ”Ή Backwards Compatibility - Existing scripts using QBCore.Functions.Notify work unchanged


ESX

  1. Locate the file: qb-core/client/functions.lua

  2. Replace the QBCore.Functions.Notify function with:

Key Features

πŸ”ΉBackwards Compatibility - Existing scripts using ESX.ShowNotification() work unchanged


Last updated