> For the complete documentation index, see [llms.txt](https://ak-scripts.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ak-scripts.gitbook.io/docs/yi-lai/markdown/ti-huan-kuang-jia-mo-ren-zhi/qbcore/jin-du-tiao-progress.md).

# 进度条（Progress）

## ⚙️ 如何更改 QBCore 的默认进度条

> 本节将教你如何将 `QBCore` **默认进度条** 替换为 `ak-lib` **进度条**。
>
> 由于 `QBCore` 不同版本在函数结构上略有差异，本次示例基于 `QBCore` `1.3.0` 进行讲解。

***

### 🧭 步骤一：导航到函数文件

前往以下路径：

```
qb-core/client/functions.lua
```

***

### 🧩 步骤二：替换 QBcore 整进度条函数内容

```lua
function QBCore.Functions.Progressbar(name, label, duration, useWhileDead, canCancel, disableControls, animation, prop, propTwo, onFinish, onCancel)
    if GetResourceState('ak-lib') ~= 'started' then
        error('ak-lib needs to be started in order for QBCore.Functions.Progressbar to work')
    end

    local ak = exports['ak-lib']:Progress({
        label = label,
        duration = duration,
        canCancel = canCancel,
        useWhileDead = useWhileDead,
        anim = animation,
        prop = prop or propTwo,
        disable = {
            move   = disableControls and disableControls.move   or false,
            car    = disableControls and disableControls.car    or false,
            mouse  = disableControls and disableControls.mouse  or false,
            combat = disableControls and disableControls.combat or true
        }
    })

    if ak then
        if onFinish then onFinish() end
    else
        if onCancel then onCancel() end
    end
end
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://ak-scripts.gitbook.io/docs/yi-lai/markdown/ti-huan-kuang-jia-mo-ren-zhi/qbcore/jin-du-tiao-progress.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.
