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

# Installation

Install CAS Chat V2 (rsm\_rpchat) on your RedM server — replace the default chat, detect your framework, set your server name and grant yourself staff. No database.

## 1. Add the resource

Copy the `rsm_rpchat` folder into your `resources` directory.

## 2. Start it

Add this line to `server.cfg`:

```
ensure rsm_rpchat
```

If the folder sits inside a bracketed folder such as `[CAS]`, a `start [CAS]` line already covers it and you do not need to add anything.

## 3. Remove the default chat

Find this line in `server.cfg` and delete it or comment it out:

```
ensure chat
```

`rsm_rpchat` declares `provide 'chat'`, so it takes the place of the default chat resource and any resource that depends on `chat` is satisfied by it.

## 4. Restart

```
refresh
restart rsm_rpchat
```

On startup the server console prints which framework was detected:

```
[rsm_rpchat] framework: vorp
```

If that line says `standalone` while you are running VORP or RSG, see Troubleshooting.

## 5. Set your server name

Open `config.lua` and change the name shown in the chat header:

```lua
Config.ServerName = 'My Roleplay Server'
```

## 6. Give yourself staff

See [Staff permissions](/script-documentation/cas-chat-v2/permissions.md). The short version: join the server, type `/rpchat_id`, copy one of the identifiers it shows you into `Config.Staff`, then `restart rsm_rpchat`.

## Opening the chat

Players press **T** by default. `/rpchat` also opens it and works from the F8 console. Both are configurable:

```lua
Config.OpenKey = 0x9720FCEE  -- INPUT_MP_TEXT_CHAT_ALL, the T key
Config.OpenCommand = 'rpchat'
```

## What gets stored

Nothing is written to a database. Mutes, block lists, the moderation log and the OOC tools are kept in the server's own key value store, keyed by license, so they survive a reconnect and a server restart.

Player display settings are saved in the player's browser storage on their own machine and never reach the server.
