> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nexdev.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Installation

> Drag-and-drop install for nex_scalemenu — single folder, correct server.cfg order, and an auto-created MySQL table.

`nex_scalemenu` installs by dragging a single folder in and ensuring it. There is no build step — the UI ships ready to use. The only hard dependency is `oxmysql`.

## Requirements

| Requirement                                   | Notes                                             |
| --------------------------------------------- | ------------------------------------------------- |
| FiveM server                                  | Any recent artifacts                              |
| [`oxmysql`](https://overextended.dev/oxmysql) | Required. Must start **before** this resource     |
| ESX / QBCore / Qbox                           | Optional. Auto-detected, falls back to standalone |

## Steps

1. Drop the `nex_scalemenu` folder into your `resources/` tree. Any subfolder works, for example `resources/[nex]/`.

2. In `server.cfg`, ensure it **after** `oxmysql` and your framework:

   ```cfg theme={null}
   ensure oxmysql
   ensure qbx_core           # or es_extended / qb-core / nothing for standalone
   ensure nex_scalemenu
   ```

3. (Optional) Open `config.lua` and adjust ranges, presets, permissions, or UI tokens. See [Configuration](/nex_scalemenu/configuration).

That's it. Start the server and the menu is ready.

<Warning>
  `oxmysql` must be started **before** `nex_scalemenu`. If it starts after, the table cannot be created and scales will not save or load. Put `ensure oxmysql` first in `server.cfg`.
</Warning>

## Database

The `nex_scalemenu` table is created automatically the first time the resource starts — there is no SQL to import. It is created with `CREATE TABLE IF NOT EXISTS`, so it is safe across restarts.

```sql theme={null}
CREATE TABLE IF NOT EXISTS `nex_scalemenu` (
    `identifier` VARCHAR(64) NOT NULL,
    `height` DECIMAL(5,3) NOT NULL DEFAULT 1.000,
    `body` DECIMAL(5,3) NOT NULL DEFAULT 1.000,
    `updated_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    PRIMARY KEY (`identifier`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
```

| Column       | Type           | Notes                                                                                    |
| ------------ | -------------- | ---------------------------------------------------------------------------------------- |
| `identifier` | `VARCHAR(64)`  | Character key — `citizenid` (Qbox/QBCore), `identifier` (ESX), or `license` (standalone) |
| `height`     | `DECIMAL(5,3)` | Stored vertical scale, default `1.000`                                                   |
| `body`       | `DECIMAL(5,3)` | Stored width/depth multiplier, default `1.000`                                           |
| `updated_at` | `TIMESTAMP`    | Auto-updated on every write                                                              |

<Info>
  A default scale (`1.0 / 1.0`) deletes the player's row rather than storing it, so the table only ever holds players who are actually scaled.
</Info>

## Verifying the install

* Start the server and run `/scale`. The menu should open with the cinematic camera.
* Adjust the sliders, confirm, then reconnect — your scale should be restored.
* If the menu does not open or scales do not persist, see [Troubleshooting](/nex_scalemenu/troubleshooting).
