> For the complete documentation index, see [llms.txt](https://docs.rainmad.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rainmad.com/resources/scale-peds-props-and-horses-fivem-and-redm/installation.md).

# Installation

The steps are the same on both games; only the resource name and a few details change. Pick your game in the tabs.

## 1. Requirements

{% tabs %}
{% tab title="FiveM" %}

| Required         | Notes                                                 |
| ---------------- | ----------------------------------------------------- |
| `ox_lib` 3.30.0+ | Hard dependency                                       |
| FXServer, recent | The scaler core runs on Node 22 (`node_version '22'`) |
| Framework        | Qbox, QBCore or ESX, for the admin check. Optional    |
| OneSync          | Only for `/setscale` (state bags)                     |
| {% endtab %}     |                                                       |

{% tab title="RedM" %}

| Required            | Notes                                                     |
| ------------------- | --------------------------------------------------------- |
| `ox_lib` 3.30.0+    | Hard dependency                                           |
| RedM server, recent | The scaler core runs on Node 22 (`node_version '22'`)     |
| Framework           | VORP or RSG, for the admin check. Optional (standalone)   |
| OneSync             | Only for `/setscale` (state bags)                         |
| Outbound HTTPS      | To download base-game ped data from fivemad when you save |
| {% endtab %}        |                                                           |
| {% endtabs %}       |                                                           |

No database, no items.

***

## 2. Drop in the resource

{% tabs %}
{% tab title="FiveM" %}
Put `rm_scaler` in your resources folder and add it to `server.cfg`:

```cfg
ensure ox_lib
ensure rm_scaler
```

`rm_scaler_output` does not exist yet. It is created next to `rm_scaler` on the first save and started by `rm_scaler` on every boot, so you do not add it to `server.cfg`.
{% endtab %}

{% tab title="RedM" %}
Put `rm_scaler_redm` in your resources folder and add it to `server.cfg`:

```cfg
ensure ox_lib
ensure rm_scaler_redm
```

`rm_scaler_redm_output` does not exist yet. It is created next to `rm_scaler_redm` on the first save and started by `rm_scaler_redm` on every boot, so you do not add it to `server.cfg`.
{% endtab %}
{% endtabs %}

{% hint style="info" %}
Moving the copies to another server? Copy the output resource over and `ensure` it. It is a plain stream resource and does not need the scaler to run.
{% endhint %}

***

## 3. Permissions

Who can open the editor and use `/setscale`. The ace is the same on both games:

```cfg
add_ace group.admin rm_scaler.use allow
```

Framework admins get access as well, unless you set `cfg.access.frameworkAdmin = false`:

| Game  | Who counts as an admin                                            |
| ----- | ----------------------------------------------------------------- |
| FiveM | Qbox / QBCore / ESX admins                                        |
| RedM  | VORP `admin` / `superadmin` group, RSG `admin` / `god` permission |

***

## 4. Let it restart the output

After a save, the scaler refreshes and restarts its output resource so the new model streams immediately. That needs aces of its own:

{% tabs %}
{% tab title="FiveM" %}

```cfg
add_ace resource.rm_scaler command.refresh allow
add_ace resource.rm_scaler command.ensure allow
```

{% endtab %}

{% tab title="RedM" %}

```cfg
add_ace resource.rm_scaler_redm command.refresh allow
```

{% endtab %}
{% endtabs %}

{% hint style="warning" %}
Without them the files are still written, but players only get the new model after you restart the output resource yourself. The console reminds you on startup.
{% endhint %}

The restart removes any copy spawned from the old files, and players see a short notice. Turn it off with `cfg.output.autoEnsure = false` if you would rather restart at a quiet time.

***

## 5. Base-game models

{% tabs %}
{% tab title="FiveM" %}
Addon peds and props are read straight from the `stream/` folder of the resource that streams them. Base-game models are inside the game's archives, which the server cannot read, so their files go into `rm_scaler/source/` first. See [Source Files](https://docs.rainmad.com/resources/scale-peds-props-and-horses-fivem-and-redm/source-files.md).
{% endtab %}

{% tab title="RedM" %}
Base-game peds and horses need nothing: their data comes from fivemad when you save. Addon peds are read straight from the resource that streams them. A ped fivemad has no data for goes into `rm_scaler_redm/source/`. See [Source Files](https://docs.rainmad.com/resources/scale-peds-props-and-horses-fivem-and-redm/source-files.md).
{% endtab %}
{% endtabs %}

***

## 6. Discord logging (optional)

Every save and delete can post an embed. Set the webhook in `server/discord_log.lua` (not `cfg.lua`, which reaches clients):

```lua
defaultWebhook = 'https://discord.com/api/webhooks/...',
```

Leave it as `WEBHOOK_HERE` to keep logging off.

***

## 7. Production check

```lua
cfg.dev = false
```

`cfg.dev = true` turns **off every permission check** and adds test commands. Never run it on a live server; the console warns while it is on.
