> For the complete documentation index, see [llms.txt](https://ayccoes-assets.gitbook.io/ayccoes-assets/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ayccoes-assets.gitbook.io/ayccoes-assets/ayc-progressbar/usage.md). Agents can also search and read this documentation through its [MCP server](https://ayccoes-assets.gitbook.io/ayccoes-assets/~gitbook/mcp).

# Usage

The resource name is **`ayc-progressbar`**. All calls below assume you're using `exports['ayc-progressbar']`.

#### Config table reference

This is the full options table accepted by `Show` on both client and server.

```lua
{
    id = 'my_custom_id',       -- string|number, optional (auto-generated if omitted)
    label = 'Doing something...', -- string, optional (random default label used if omitted)
    time = 5000,                -- number, duration in ms
    variant = 'LINEAR_LINE',    -- string, see Variants table below
    shape = 'rounded',          -- 'rounded' | 'sharp', default 'rounded'
    color = '#cde6ff',          -- string (hex), overrides the global theme color for this bar only
    canCancel = true,           -- boolean, allow player to press the cancel key, default true
    showPreview = false,        -- boolean, render this bar as a preview while queued behind another active bar

    -- Player state conditions (all default to false = interrupts the bar)
    useWhileDead = false,
    allowRagdoll = false,
    allowCuffed = false,
    allowFalling = false,
    allowSwimming = false,

    -- Controls to disable while the bar is active
    disable = {
        move = false,
        sprint = false,
        car = false,
        combat = false,
        mouse = false
    },

    -- Play an animation for the duration of the bar
    anim = {
        dict = 'anim@amb@business@cfm@cfm_ig3_xd@',
        clip = 'cfm_ig3_xd_loop_sit_a',
        blendIn = 3.0,
        blendOut = 1.0,
        duration = -1,
        flag = 49,
        playbackRate = 0.0,
        lockX = false,
        lockY = false,
        lockZ = false
        -- Or, use a scenario instead of dict/clip:
        -- scenario = 'WORLD_HUMAN_STAND_MOBILE',
        -- playEnter = true
    },

    -- Attach one or more props to the ped while the bar is active
    prop = {
        model = `prop_tool_box03`,
        bone = 60309,
        pos = vector3(0.0, 0.0, 0.0),
        rot = vector3(0.0, 0.0, 0.0),
        rotOrder = 0
    }
    -- Or pass an array of prop tables to attach multiple props:
    -- prop = { { model = `prop1`, ... }, { model = `prop2`, ... } }
}
```

{% hint style="info" %}
`id` is optional everywhere. If you don't provide one, a unique ID is generated for you and returned so you can call `Update`, `Hide`, `Cancel`, or `Fail` on the same bar later.
{% endhint %}

#### Variants

| Variant            | Preview - Sharp                                                                                                                                                                                                                                               | Preview - Rounded                                                                                                                                                                                                                                           |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `LINEAR_LINE`      | <img src="https://2118294136-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK3n6uHN9cTijiM2iemtD%2Fuploads%2FykbKnMH66Bdlge9XsqY2%2FLine.png?alt=media&amp;token=e7645ad0-5570-42fa-a683-0eafa1f53cef" alt="" data-size="original">      | <img src="https://2118294136-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK3n6uHN9cTijiM2iemtD%2Fuploads%2FfzRBVaql4UU4eaFIg3Vg%2FLine.png?alt=media&amp;token=967bca33-bece-41d9-a7ce-a7122e0e3893" alt="" data-size="original">    |
| `LINEAR_BLOCKS`    | <img src="https://2118294136-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK3n6uHN9cTijiM2iemtD%2Fuploads%2FqkSLkeogDMoGOBne2Sew%2FBlocks.png?alt=media&amp;token=92e84bfb-3d15-413c-8688-3b322d7580c3" alt="" data-size="original">    | <img src="https://2118294136-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK3n6uHN9cTijiM2iemtD%2Fuploads%2FXE5eJgz0EuhlZTCocOjT%2FBlocks.png?alt=media&amp;token=c4c6a292-8908-4a84-8809-96200507346a" alt="" data-size="original">  |
| `LINEAR_DASHED`    | <img src="https://2118294136-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK3n6uHN9cTijiM2iemtD%2Fuploads%2F1Ol691jqLqgtXLih6mhU%2FDashed.png?alt=media&amp;token=2ef3e92c-c834-48f7-8daf-807034857b15" alt="" data-size="original">    | <img src="https://2118294136-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK3n6uHN9cTijiM2iemtD%2Fuploads%2FUBdrl325OnBu9dgxInyi%2FDashed.png?alt=media&amp;token=378626de-943c-4fbf-b0e3-7dc562ccae29" alt="" data-size="original">  |
| `LINEAR_SLASHES`   | <img src="https://2118294136-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK3n6uHN9cTijiM2iemtD%2Fuploads%2F2YG8J1495nWxC2jnJiCz%2FSlashes.png?alt=media&amp;token=c3543a42-e22e-4f0a-9cc8-06ab3f9e0066" alt="" data-size="original">   | <img src="https://2118294136-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK3n6uHN9cTijiM2iemtD%2Fuploads%2FT2Fboq6OyPwvHVx7LNKs%2FSlashes.png?alt=media&amp;token=8e1ee013-3852-4e82-b6d4-79872c669b27" alt="" data-size="original"> |
| `LINEAR_STRIPES`   | <img src="https://2118294136-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK3n6uHN9cTijiM2iemtD%2Fuploads%2FieHQwhXNYpgGQE8CM0Gg%2FStripes.png?alt=media&amp;token=9deecfb1-57b1-452c-b27c-3fec30954172" alt="" data-size="original">   | <img src="https://2118294136-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK3n6uHN9cTijiM2iemtD%2Fuploads%2FREdEy5Q5Ico8vPnA5rDz%2FStripes.png?alt=media&amp;token=7145d9c7-f122-4e4b-ad51-85b8cd3e1d1c" alt="" data-size="original"> |
| `LINEAR_CIRCLES`   | <img src="https://2118294136-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK3n6uHN9cTijiM2iemtD%2Fuploads%2FAy5gZzb2ktbYuxDfNG3i%2FCircles.png?alt=media&amp;token=f9a6e089-f3e3-4024-baa5-2c88a5dc1953" alt="" data-size="original">   | -                                                                                                                                                                                                                                                           |
| `LINEAR_ARROWS`    | <img src="https://2118294136-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK3n6uHN9cTijiM2iemtD%2Fuploads%2F10SbeduYVdwXDXekonsu%2FArrows.png?alt=media&amp;token=c70839e0-6c19-4235-b923-df779cc732c2" alt="" data-size="original">    | -                                                                                                                                                                                                                                                           |
| `LINEAR_TRIANGLES` | <img src="https://2118294136-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK3n6uHN9cTijiM2iemtD%2Fuploads%2FvmBcuJZyUzQgFmRUBmPi%2FTriangles.png?alt=media&amp;token=bbbab9c6-8028-406f-bfe3-3033e5f2d495" alt="" data-size="original"> | -                                                                                                                                                                                                                                                           |
| `LINEAR_PARA`      | <img src="https://2118294136-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK3n6uHN9cTijiM2iemtD%2Fuploads%2FPtGw1h0zDVcnoP5NZfYw%2FPara.png?alt=media&amp;token=b4070483-1c29-4b85-9ad4-d45d23fdade6" alt="" data-size="original">      | <img src="https://2118294136-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK3n6uHN9cTijiM2iemtD%2Fuploads%2FXfIgr0Ppy1XXARfwBo5U%2FPara.png?alt=media&amp;token=e520e4d8-d817-4335-b4e0-d3284915c902" alt="" data-size="original">    |
| `RING_RING`        | <img src="https://2118294136-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK3n6uHN9cTijiM2iemtD%2Fuploads%2FDBVkoTXMPDpjIzv9srTV%2FRing.png?alt=media&amp;token=a8c10a26-beed-4879-9df7-ff7ab0102ba1" alt="" data-size="original">      | <img src="https://2118294136-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK3n6uHN9cTijiM2iemtD%2Fuploads%2FRitNtEOZ4zegGq7up56h%2FRing.png?alt=media&amp;token=debd0cde-846d-4906-bbc7-24c3e49b8359" alt="" data-size="original">    |
| `RING_BLOCKS`      | <img src="https://2118294136-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK3n6uHN9cTijiM2iemtD%2Fuploads%2FehClVoAmgjpo8EBZREF0%2FBlocks.png?alt=media&amp;token=6ac932f7-0fc3-42b5-a2d7-a34f7525a716" alt="" data-size="original">    | <img src="https://2118294136-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK3n6uHN9cTijiM2iemtD%2Fuploads%2FeaYA1ieEOpsO7Ia0IwBl%2FBlocks.png?alt=media&amp;token=ae24e8a1-39c2-4afe-9e48-219f9df87d40" alt="" data-size="original">  |
| `RING_STRIPES`     | <img src="https://2118294136-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK3n6uHN9cTijiM2iemtD%2Fuploads%2FdlvJKDojIABEel241d5t%2FStripes.png?alt=media&amp;token=9e576f12-e841-4aff-ba5e-5a90da5b86eb" alt="" data-size="original">   | <img src="https://2118294136-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK3n6uHN9cTijiM2iemtD%2Fuploads%2FhLq8VSvUEcltaUefcrqR%2FStripes.png?alt=media&amp;token=b780fcb6-e590-4e08-90df-b3cb8ac62a7c" alt="" data-size="original"> |
| `RING_DASHED`      | <img src="https://2118294136-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK3n6uHN9cTijiM2iemtD%2Fuploads%2FSbL5eHZxrSda29Vs56CY%2FDashed.png?alt=media&amp;token=b2ac01e4-1179-4366-9eab-cacc7648c39c" alt="" data-size="original">    | <img src="https://2118294136-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK3n6uHN9cTijiM2iemtD%2Fuploads%2FXRmo3wMxIB3JpHeNtBLZ%2FDashed.png?alt=media&amp;token=e2d88785-2515-4ec2-836d-f4c6b8754afb" alt="" data-size="original">  |
| `RING_ARROWS`      | <img src="https://2118294136-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK3n6uHN9cTijiM2iemtD%2Fuploads%2Fz9aO2eu9sJDIgmzLGANA%2FArrows.png?alt=media&amp;token=f633dcab-e90c-4675-8f0b-055e7549af44" alt="" data-size="original">    | -                                                                                                                                                                                                                                                           |
| `RING_CHAIN`       | <img src="https://2118294136-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK3n6uHN9cTijiM2iemtD%2Fuploads%2F6bxRdU4QGNxrRGx1mlgR%2FChain.png?alt=media&amp;token=958edc5c-fd93-4252-873b-83be3b75f6c2" alt="" data-size="original">     | -                                                                                                                                                                                                                                                           |
| `RING_CIRCLES`     | <img src="https://2118294136-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK3n6uHN9cTijiM2iemtD%2Fuploads%2Fs3VdYQmeAwDBmG2jyLJ0%2FCircles.png?alt=media&amp;token=a6870ac2-5c50-4bf1-994c-ad5d44a70a2c" alt="" data-size="original">   | -                                                                                                                                                                                                                                                           |

You can also reference these safely via the `GetTypes` export instead of hardcoding strings:

```lua
local Types = exports['ayc-progressbar']:GetTypes()

exports['ayc-progressbar']:Show({
    label = 'Doing Sync Work...',
    time = 5000,
    variant = Types.Variant.RING_STRIPES,
    color = '#cde6ff'
})
```
