> For the complete documentation index, see [llms.txt](https://code-after-sex.gitbook.io/script-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://code-after-sex.gitbook.io/script-documentation/about-paid-scripts/redm-script-documentation/animation-menu.md).

# Animation Menu

## REQUIREMENTS

<https://github.com/codeaftersex/cas_fwlibs>

## Installation

1. Download the purchased file from **Keymaster**.
2. Extract the contents from the `.zip` file.
3. Move the extracted folder into your `resources` directory.
4. Add the following line to your `server.cfg`:

   ```cfg
   ensure cas-animationmenu
   ```
5. Restart your server.

You're good to go! 🎉<br>

## RADIAL MENU Integration

Add the following code at the **bottom of your radial menu's `config.lua`**:

```lua
exports("getAvailableIndex", function()
    return #Config.MenuItems
end)
```

> ✅ **Make sure your radial menu starts before the animation menu** in your `server.cfg`.

After adding the code, **restart your server** to apply the changes.

#### 🔧 Radial Menu Integration (`config.lua`)

```lua
if Config.USERADIALMENU then

    RADIALMENU = {}
    RADIALMENU.CategoryData = {
        id = "favanims", -- id
        title = "Quick Animations", -- label of radialmenu btn
        icon = "face-smile", -- radialmenu btn icon
        items = {}
    }

    RADIALMENU.AnimIcon = "person-dress"
    RADIALMENU.UseRadialEvent = {}
    RADIALMENU.YourRadialScript = "cas-radialmenu"
    RADIALMENU.CategoryId = "favanims"
    RADIALMENU.CloseAfterUsingBtn = true

    RADIALMENU.addOption = function(data, index)
        exports["cas-radialmenu"]:AddOption(data, index)
    end

    RADIALMENU.removeOption = function(id)
        exports[RADIALMENU.YourRadialScript]:RemoveOption(id)
    end
end
```

> ✅ **Don't forget to apply the same logic inside your `radialmenuConfig.lua` file as well.**

> ⚠️ If you are not using `cas-radialmenu`, replace it with the name of your own radial menu resource.

## YOU ARE READY!&#x20;


---

# 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://code-after-sex.gitbook.io/script-documentation/about-paid-scripts/redm-script-documentation/animation-menu.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.
