> 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-staff-chat/installation.md).

# Installation

Install CAS Staff Chat on your RedM server: cas\_fwlibs, the resource folder name, adding your admins by Steam hex and the first checks.

## Requirements

| Resource                                                   | Needed for                                                                                                                           |
| ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| VORP Core or RSG Core                                      | Character names and notifications, through `cas_fwlibs`.                                                                             |
| [`cas_fwlibs`](https://github.com/codeaftersex/cas_fwlibs) | Shared CAS framework functions. See [Please read first](https://code-after-sex.gitbook.io/script-documentation/scripts/please-read). |
| Steam                                                      | Admins are recognised by their Steam identifier, so Steam must be running on their PC.                                               |

## Steps

1. Put the folder in your resources folder, for example `resources/[CAS]/cas-staffchat`. Keep the folder name `cas-staffchat`, because the chat window sends its messages to that resource name.
2. Open `config.lua` and add your admins to `CAS.Admins`, using their Steam hex in lower case:

```lua
CAS.Admins = {
    ["steam:110000100000000"] = {
        canClearChatHistory = true
    },
    ["steam:110000100000001"] = {
        canClearChatHistory = false
    },
}
```

3. If you don't use a Discord bot, set `UseDiscordAvatar` and `UseDiscordName` to `false` in `server_config.lua`. To show Discord profiles, see [Discord Profiles](/script-documentation/cas-staff-chat/discord-profiles.md).
4. Add the resource to `server.cfg` after `cas_fwlibs`:

```
ensure cas_fwlibs
ensure cas-staffchat
```

5. Restart the server.

## First checks

* Join as one of the admins and type `/staffchat`. The chat window opens.
* Send a message. It appears with your avatar and name, and every other admin online receives it.
* A player who is not in `CAS.Admins` gets "You don't have enough permission for access staff chat."

{% hint style="info" %}
To find a Steam hex, look it up in your txAdmin player list, or convert the SteamID64 to hexadecimal. It looks like `steam:110000100000000`.
{% endhint %}
