> 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/cas-radial-menu-v2/integrations.md).

# Integrations

What vorp\_inventory, vorp\_stables, vorp\_police, vorp\_medic, cas-billing and cas-metabolism each need for their slices in the RedM radial menu to work.

Nothing here re-implements another script's feature, the slice hands over. Each row is what the other resource has to have for its slot to work. If a resource is not running, its slices simply do nothing when picked.

| Slice                                                                   | Resource            | What it needs                                                                                                                                                                                                                       |
| ----------------------------------------------------------------------- | ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Inventory                                                               | `vorp_inventory`    | Nothing. Fires its `vorp_inventory:OpenInv` event.                                                                                                                                                                                  |
| Call Horse / Call Wagon                                                 | `vorp_stables`      | **Two exports it does not ship, see below.**                                                                                                                                                                                        |
| Setup Campfire / Put Out Fire                                           | `vorp_crafting`     | `Config.Commands.campfire` and `.extinguish` left `true`, and the campfire item in the satchel.                                                                                                                                     |
| Send Bill / My Bills / All Bills                                        | `cas-billing`       | Its `Config.Commands` left at `createinvoice`, `mybills`, `bills`, and its `Config.SheriffJobs` naming the job in `Config.Jobs.billing`.                                                                                            |
| Call Doctor / Cancel / Doctor Menu / Finish Call                        | `vorp_medic`        | Its `AlertDoctorCommand`, `cancelalert`, `DoctorMenuCommand`, `finishalert` left at their defaults, and its `Config.DoctorJobs` naming the job in `Config.Jobs.doctor`.                                                             |
| Call the Law / Cancel / Sheriff Menu / Escort / Finish Call / Jail Time | `vorp_police`       | Its `Config.alertPolice`, `cancelpolicealert`, `PoliceMenuCommand`, `Dragcommand`, `finishpolicelert` and `jail.Commands.CheckJailTime` left at their defaults, and its `Config.PoliceJobs` naming the job in `Config.Jobs.police`. |
| All Emotes                                                              | `cas-animationmenu` | Its `OpenCommand` left at `anim`.                                                                                                                                                                                                   |
| HUD Settings / Toggle HUD / HUD While Sprinting                         | `cas-metabolism`    | Its `SettingsMenuCommand`, `HudVisibleCommand`, `ShowHUDWhileSprintCommand` left at `hudsettings`, `hudvisible`, `hudshowsprint`, or change `Config.HudSettingsCommand` here.                                                       |

Every one of these is a command or an event name in the other resource's config. If you have renamed one there, change the matching slice's `command` or `event` in `Config.Menu`.

## `vorp_stables`, required for Call Horse / Call Wagon

`vorp_stables` calls a horse through `CallRide()`, which is a **global inside the resource, not an export**, so nothing outside it can reach it. Add these two lines to the end of `vorp_stables/client/interactions.lua`:

```lua
exports('CallHorse', function() CallRide(CurrentHorse) end)
exports('CallCart',  function() CallRide(CurrentCart)  end)
```

Without them the two slices tell the player "vorp\_stables is missing the CallHorse export" instead of calling anything.

{% hint style="warning" %}
An update to `vorp_stables` will remove these lines. Put them back after updating it.
{% endhint %}

## Lining the job names up

`Config.Jobs` holds each resource's **own** name for a job, and on a stock stack they disagree, `vorp_police` says `Police`, `vorp_medic` says `doctor`, `cas-billing` says `sheriff`. That is why they are listed separately:

```lua
Config.Jobs = {
    police  = { 'Police' },
    doctor  = { 'doctor' },
    billing = { 'sheriff' },
}
```

Someone hired as `Police` will not see the billing wheel, because `cas-billing` would refuse them anyway. If you want one job to do all of it, line the three resources' own configs up rather than changing only this one.

{% hint style="info" %}
`cas-billing`'s `Config.SheriffJobs` also lists `unemployed`, which reads like a leftover from its example config. It is deliberately **not** repeated here, so the wheel does not offer billing to every player without a job.
{% endhint %}

`jail` and `unjail` are deliberately absent from the menu, they take a player id and a duration, and a wheel slice has nowhere to type them.

## Clothing on VORP and RSGCore

The clothing slices toggle a garment on and off. Neither framework exposes a "take the hat off" call, both manage whole component sets, so the wheel reads the component currently worn and puts it back:

* **VORP**, `exports.vorp_character:GetPlayerComponent(category)`
* **RSGCore**, `exports['rsg-appearance']:GetClothesComponentId(name)`
* **Neither**, reads the ped directly, so the wheel still works on a bare server.

Which one is in use is detected at runtime; there is nothing to configure.

Neither framework has a per-garment save, so a change is not persisted by default. `Framework.PersistSlot()` in `client/framework.lua` is an empty hook left for you to fill in if your server stores outfits.
