Help - For Any Errors

A lot of our Scripts Use a V2 RSG, However we use some Functions that have been removed from RSG for some reason
Download the Progress Bar Script and follow the Instructions in the Read me File.

Fix

1, Add Progessbars Script

2,  Go to rsg-core  / client / functions.lua 


Check if you have the Functions Below, If not add them as new ones around line 40

---------------added below by Mack----------------------------

RegisterNUICallback('getNotifyConfig', function(_, cb)

    cb(RSGCore.Config.Notify)

end)


function RSGCore.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


function RSGCore.Functions.Progressbar(name, label, duration, useWhileDead, canCancel, disableControls, animation, prop, propTwo, onFinish, onCancel)

    if GetResourceState('progressbar') ~= 'started' then error('progressbar needs to be started in order for RSGCore.Functions.Progressbar to work') end

    exports['progressbar']: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


---------------added above by Mack----------------------------

3, Go to rsg-core / server/ functions.lua

---------------added below by Mack----------------------------

function RSGCore.Functions.Notify(source, text, type, length)

    TriggerClientEvent('RSGCore:Notify', source, text, type, length)

end

---------------added above by Mack----------------------------