> 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-advanced-loading-screen/installation.md).

# Installation

Install Advanced Loading Screen on a RedM server, remove other loading screens and check the first connection.

1. Put the `cas-loadscreen` folder in your `resources` folder. Keep the folder name: the client export is called through it.
2. Add it to `server.cfg`:

   ```
   ensure cas-loadscreen
   ```
3. **Remove or stop every other loading screen resource** (the default `loadingscreen`, older CAS loading screens, framework loading screens). Two resources with a `loadscreen` entry fight over the same frame and players can get stuck on it.

   ```
   # stop loadingscreen
   # stop cas-loadscreenv2
   ```
4. Open `config/config.lua` and set your server name (`Config.Server`). Then fill `config/content.lua` (news, rules, keys, tips, music) and `config/server.lua` (staff).
5. Decide who closes the screen: see [Closing the screen](/script-documentation/cas-advanced-loading-screen/closing-the-screen.md). The default is `"external"`, for servers whose character creator or spawn script calls `ShutdownLoadingScreenNui()`. If nothing on your server does, set `Config.Shutdown.mode = "auto"`.
6. Restart the server and connect.

{% hint style="info" %}
The loading screen is downloaded by players before it can show, so keep big files (long music tracks, large images) reasonable. The included pack is about 8 MB.
{% endhint %}

## Steam pictures

The player's picture on the WANTED poster and your staff pictures come from Steam. The script uses the `steam_webApiKey` convar most servers already set in `server.cfg`:

```
set steam_webApiKey "your-key"
```

You can also put a key in `ServerConfig.SteamApiKey` (`config/server.lua`). Without a key, or for players without a Steam identifier, the poster shows the default portrait.

## Check it works

* The server console shows `Started resource cas-loadscreen` without errors.
* While you connect, the screen shows your server name, the riders online and your own picture.
* Press **F1** (or the STYLE button) to open the Print Shop.
