# 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>


---

# 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://los-santos-project.gitbook.io/project-los-santos-scripts/scripts/progress-bar.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.
