โš™๏ธSetting for Core

QB Notify example edit

Open qb-core/client/functions.lua, find the QBCore.Functions.Progressbar function and replace it with the following

function QBCore.Functions.Notify(text, texttype, length)
    length = length or 5000
    texttype = texttype or 'info'

    if texttype == "primary" then 
        texttype = "info"
    end

    TriggerEvent('pa-lib:notify', text , length, texttype)
end

QB Progressbar edit

Open qb-core/client/functions.lua, find the QBCore.Functions.Progressbar function and replace it with the following

function QBCore.Functions.Progressbar(name, label, duration, useWhileDead, canCancel, disableControls, animation, prop, propTwo, onFinish, onCancel)
    if GetResourceState('pa-uipack') ~= 'started' then error('progressbar needs to be started in order for QBCore.Functions.Progressbar to work') end
    exports['pa-uipack']:Progress({
        name = name:lower(),
        duration = duration,
        label = label,
        useWhileDead = useWhileDead,
        canCancel = canCancel,
        controlDisables = disableControls,
        animation = animation,
        prop = prop,
        propTwo = propTwo,
    }, function(cancelled)
        if not cancelled then
            if onFinish then
                onFinish()
            end
        else
            if onCancel then
                onCancel()
            end
        end
    end)
end

Last updated

Was this helpful?