> For the complete documentation index, see [llms.txt](https://los-santos-project.gitbook.io/project-los-santos-scripts/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://los-santos-project.gitbook.io/project-los-santos-scripts/scripts/progress-bar.md).

# Progress Bar

## Exports

### Progress Bar

```lua
exports.ls_progressbar:progressBar(data)

IMPORTANT: only fontawesome icon is supported!

params:[
    data: 'table' [
        label: 'string',
        icon: 'string',
        duration: 'number',
        
        canCancel: 'boolean',
        useWhileDead: 'boolean',
        allowRagDoll: 'boolean',
        allowSwimming: 'boolean',
        allowCuffed: 'boolean',
        allowFalling: 'boolean',
        
        disable: 'table' [
            move: 'boolean',
            car: 'boolean',
            combat: 'boolean',
            mouse: 'boolean',
            sprint: 'boolean'
        ],
        anim: 'table' [
            dict: 'string',
            clip: 'string',
            scenario: 'string',
            flag: 'number',
            blendIn: 'float',
            blendOut: 'float',
            duration: 'number',
            playbackRate: 'number'
            lockX: 'boolean',
            lockY: 'boolean',
            lockZ: 'boolean',
            playEnter: 'boolean'
        ],
        prop: 'table' [
            bone: 'number',
            rotOrder: 'number',
            pos: 'table' [
                x: 'number',
                y: 'number',
                z: 'number',
            ],
            rot: 'table' [
                x: 'number',
                y: 'number',
                z: 'number',
            ]
        ]
    ]
]

Example:
local retreval = exports.ls_progressbar:progressBar({
        label = 'Example Progress Bar',
        duration = 5000,
        canCancel = true,
        disable = {
            car = true,
        },
        anim = {
            dict = 'mp_player_intdrink',
            clip = 'loop_bottle'
        },
        prop = {
            model = `prop_ld_flow_bottle`,
            pos = vec3(0.03, 0.03, 0.02),
            rot = vec3(0.0, 0.0, -1.5)
        },
})

if retreval then
    print('success')
else
    print('failed')
end

return the ran of state (true, false)


```

### Cancel

```lua
exports.ls_progressbar:cancel()

Cancel the current progress bar
```

### Is Progress Active

<pre class="language-lua"><code class="lang-lua"><strong>local retreval = exports.ls_progressbar:isProgressActive()
</strong>
if retreval then
    print('progressbar is currently active')
else
    print('progressbar currently not active')
end

retunr the current progressbar state (true, false)
</code></pre>
