> 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_playerped/peds-and-thumbnails.md).

# Peds and thumbnails

Add your addon peds and make thumbnails in game.

## Ped list

All peds are in `shared/peds.lua`.

* `Config.VanillaPeds` – GTA peds by category. Remove a line to hide a ped from the panel.
* `Config.CustomPeds` – your addon peds:

```lua
Config.CustomPeds = {
    { model = 'k9doberman', label = 'K9 Doberman', category = 'animals', image = '' },
    { model = 'santaclaus', label = 'Santa', category = 'addon', image = 'santa.png' },
}
```

| Field      | Description                                                |
| ---------- | ---------------------------------------------------------- |
| `model`    | Spawn name of the ped (the name of its `.yft` file)        |
| `label`    | Name in the panel. Empty = made from the model name        |
| `category` | One of `Config.Categories`, default `addon`                |
| `image`    | Link (`https://...`) or a file in `html/thumbs/`. Optional |

{% hint style="warning" %}
Every addon ped needs a unique spawn name. Two resources that stream a model with the same name (or a vanilla name such as `a_c_capybara`) overwrite each other.
{% endhint %}

## Where thumbnails come from

1. **Database** – made in game or a link set in the panel
2. **`image`** from `Config.CustomPeds`
3. **Vanilla peds** – downloaded automatically from the FiveM docs
4. **Placeholder** with the first letters of the name

## Making thumbnails in game

Needs **screenshot-basic**. In the admin panel click **⋯ → Generate in game** on a card, or **Generate missing** for all peds without a picture.

The script places the ped in an empty spot in the sky in front of a green background, takes a photo, removes the background and saves a transparent 256 px image in the database. Every player sees it, nothing has to be restarted.

If a thumbnail fails, the panel shows the reason:

| Reason                                  | What to do                                                  |
| --------------------------------------- | ----------------------------------------------------------- |
| The game does not have this model       | Check the spawn name and that the addon resource is started |
| The model took too long to load         | Try again, the model is loaded the second time              |
| screenshot-basic did not return a photo | Check that screenshot-basic is started                      |
| The photo could not be processed        | Send a screenshot to support                                |

Settings in `config.lua` → `Config.thumbnails.generator`:

| Option        | Default               | Description                                                 |
| ------------- | --------------------- | ----------------------------------------------------------- |
| `enabled`     | `true`                | Turns the generator on / off                                |
| `size`        | `256`                 | Thumbnail size in px                                        |
| `quality`     | `0.85`                | WebP quality                                                |
| `greenScreen` | `true`                | Remove the background (transparent thumbnail)               |
| `coords`      | sky above the airport | Empty spot used as the photo studio                         |
| `timeHour`    | `12`                  | Time of day while taking photos                             |
| `offsetZ`     | `0.0`                 | Moves the camera up (+) or down (-) if peds are not centred |


---

# 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_playerped/peds-and-thumbnails.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.
