ScriptsNotify

Installation Guide

If you follow this guide completely, you will install the 88studio-notify script without any problems.

qb-core/client/functions.lua
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
        exports['88studio-notify']:SendNotify(caption, ttext, length, texttype)
    else
        texttype = texttype or 'primary'
        length = length or 5000
        caption = 'INFO'
 
        if texttype == 'error' then
            caption = 'ERROR'
        elseif texttype == 'success' then
            caption = 'SUCCESS'
        elseif texttype == 'warning' then
            caption = 'WARNING'
        end
        exports['88studio-notify']:SendNotify(caption, text, length, texttype)
    end
end