> For the complete documentation index, see [llms.txt](https://rayn-scripts.gitbook.io/rayn-scripts-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://rayn-scripts.gitbook.io/rayn-scripts-docs/rayn_jumpscare/adding-jumpscares.md).

# Adding jumpscares

Add your own pictures, videos and sounds.

1. Put your files in `html/jumpscares/`.
2. Add an entry to `Config.jumpscares` in `config.lua`.
3. Restart the resource.

```lua
Config.jumpscares = {
    { id = 'classic', label = 'Classic',          image = 'classic.gif', sound = 'classic.ogg', duration = 3000, volume = 0.6 },
    { id = 'static',  label = 'TV Static',        image = 'static.gif',  sound = 'static.ogg',  duration = 2500, volume = 0.7 },
    { id = 'eyes',    label = 'Eyes in the dark', image = 'eyes.gif',    sound = 'eyes.ogg',    duration = 2500, volume = 0.8 },
    -- a video with its own sound, played to the end
    { id = 'clown',   label = 'Clown',            image = 'clown.webm',  sound = '',            duration = 0,    volume = 0.8 },
}
```

| Field      | Description                                                         |
| ---------- | ------------------------------------------------------------------- |
| `id`       | Short name used in the command, e.g. `/jumpscare 5 clown`           |
| `label`    | Name shown in the panel                                             |
| `image`    | `.gif` `.png` `.jpg` `.webp`, or a video `.webm` / `.mp4`           |
| `sound`    | `.ogg` `.mp3` `.wav`. Leave `''` for a video that has its own sound |
| `duration` | Time on screen in ms. For a video, `0` plays the whole video        |
| `volume`   | `0.0` – `1.0`                                                       |

## Picture and sound sync

The picture and the sound are loaded during the black screen and start at the same moment. A GIF always starts from the first frame.

For a video:

* `sound = ''` – the video plays with its own sound.
* `sound = 'file.ogg'` – the video is muted and the sound file plays together with it, kept in sync.

{% hint style="warning" %}
Use `.webm` (VP8/VP9) for videos. Some `.mp4` files (H.264) do not play in the FiveM browser.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://rayn-scripts.gitbook.io/rayn-scripts-docs/rayn_jumpscare/adding-jumpscares.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
