> 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-spawn-system/cas-spawn-system.md).

# CAS Spawn System

`cas-spawn` is a spawn selector for **RedM** servers on **VORP**. Players choose their spawn location from a list of custom or predefined spots — towns, camps or remote locations — through a smooth, user-friendly interface.

## Highlights

* Choose spawn from custom or predefined points
* Fully customizable spawn points (by role, faction or preference)
* Smooth, user-friendly interface
* Optimized for fast loading

## At a glance

|               |                                  |
| ------------- | -------------------------------- |
| Framework     | VORP                             |
| Resource name | `cas-spawn`                      |
| Install       | Drag & drop + one VORP core edit |

## Installation

1. Drag & drop the `cas-spawn` folder into `resources` and add `ensure cas-spawn`.
2. Apply the VORP Core integration below.

### VORP Core integration

In `vorp_core/client/spawnplayer.lua`, find the `vorp:initCharacter` handler and add this line **at the very end** of the function:

```lua
TriggerEvent("vorp:initCharCustom", coords, heading, isdead)
```

Do **not** replace the existing logic — only append this trigger so your custom initialization runs after the player has fully loaded.

## Configuration

Everything is set in the config file — define your spawn points, labels and coordinates.

## Support

Join the [CAS Discord](https://discord.gg/X8bTK9Stwk) or use the support channel on your product page.
