UIForge Documentation
  • Getting Started
    • What is the UIForge ?
  • Scripts
    • uiforge-casinotablet
      • Installation
      • Configuration
      • Algorithm Settings
  • uiforge-progressbar
    • Installation
    • Exports
Powered by GitBook
On this page
  • 1 - Start the resource
  • 2 - Integrate to QBCore
  1. uiforge-progressbar

Installation

1 - Start the resource

Add ensure uiforge-progressbar to your server.cfg file.

2 - Integrate to QBCore

Find QBCore.Functions.Progressbar function in qbcore/client/functions.lua. Then replace content with below

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

Last updated 4 months ago