PS-UI

Replacement for Functions.QBCore.Notify Navigate to: qb-core/client/functions.lua & Search for QBCore.Functions.Notify

Replace:

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

With the following:

function QBCore.Functions.Notify(text, texttype, length)
    exports['ps-ui']:Notify(text,texttype, length)
end

Last updated