# Ox Lib Progressbar For QBCore

Change the function QBCore.Functions.Progressbar in qb-core/client/functions.lua with:

```lua
function QBCore.Functions.Progressbar(name, label, duration, useWhileDead, canCancel, disableControls, animation, prop, propTwo, onFinish, onCancel, icon)
    if GetResourceState('progressbar') ~= 'started' then error('progressbar needs to be started in order for QBCore.Functions.Progressbar to work') end
    disable = {
        move = disableControls.disableMovement,
        car = disableControls.disableCarMovement,
        mouse = disableControls.disableMouse,
        combat = disableControls.disableCombat,
    }

    anim = {
        dict = animation.animDict,
        clip = animation.anim,
        flag = animation.flags,
    }
    props = {
        model = prop.propOne,
        bone = prop.bone,
        pos = prop.coords,
        rot = prop.rotation,
    }
    if lib.progressBar({
        duration = duration,
        label = label,
        useWhileDead = useWhileDead,
        canCancel = canCancel,
        disable = disable,
        anim = anim,
        prop = props,
    }) then
        if onFinish then
            onFinish()
        end
    else
        if onCancel then
            onCancel()
        end
    end
end
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://thomasdev.gitbook.io/ox-lib-for-qbcore/ox-lib-progressbar-for-qbcore.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
