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

# 🗺️ RT PAUSE MENU

Premium pause menu for QBX and QB-Core.

> ESX is not supported. Future support is not guaranteed.

***

### 📋 Requirements

* FXServer build 17000+
* MySQL + `oxmysql`
* `ox_lib`
* `qbx_core` or `qb-core`
* `ox_inventory` Optional: `rt-coins` (coins economy + premium pass), `rt-hud`, `MugShotBase64` (avatar), `chat`, `rt-carry`.

***

### 📦 Installation

**Step 1 — Upload**

```
resources/[rt]/rt-pausemenu
```

**Step 2 — Minimum config**

Edit `config/config.lua`:

```lua
Config.Locale    = 'en',          -- en, es, fr, de, pt-BR, it
Config.Framework = 'auto',        -- auto | qbx_core | qb-core
Config.Server = {
    name       = 'Your Server Name',
    subtitle   = 'Your tagline',
    logo       = 'assets/logo.png',
    maxPlayers = 128,
}
```

QB-Core only — if the framework is not detected, force it:

```lua
Config.Framework = 'qb-core'
```

**Step 3 — server.cfg**

QBX example:

```cfg
ensure ox_lib
ensure oxmysql
ensure qbx_core
ensure ox_inventory
ensure rt-pausemenu
```

QB-Core example:

```cfg
ensure ox_lib
ensure oxmysql
ensure qb-core
ensure ox_inventory
ensure rt-pausemenu
```

> If you use `rt-coins`, start it before `rt-pausemenu`.

**Step 4 — Restart**

#### Tables `pm_missions`, `pm_wheel`, `pm_battlepass`, `pm_events` and `pm_news` are created automatically. No manual SQL required.

### ✅ Quick check

1. Join the server with a loaded character.
2. Press `ESC` — the RT pause menu opens (native GTA menu is suppressed).
3. Profile shows your name, job and money correctly. Menu doesn't open? A dependency is missing or loads after rt-pausemenu — fix the load order. UI changes not showing? Clear the NUI cache: `%localappdata%\FiveM\FiveM.app\data\cache\files\rt-pausemenu`.

***

### ⚙️ Main settings

File: `config/config.lua`

| Setting                                               | What it does                                        |
| ----------------------------------------------------- | --------------------------------------------------- |
| `Config.Locale`                                       | UI language (`en`, `es`, `fr`, `de`, `pt-BR`, `it`) |
| `Config.Framework`                                    | `auto` (default), `qbx_core` or `qb-core`           |
| `Config.Server`                                       | Name, subtitle, logo, max players                   |
| `Config.Theme`                                        | Gold/silver colors (any CSS value)                  |
| `Config.Missions`                                     | Playtime missions & rewards                         |
| `Config.DailyWheel`                                   | Daily wheel prizes & weights                        |
| `Config.BattlePass`                                   | Seasons, levels, dates, premium                     |
| `Config.PhotoMode`                                    | Photo mode poses & toggle                           |
| `Config.Businesses`                                   | Business directory (set **coordinates**)            |
| `Config.EventsSystem`                                 | Authorized jobs & approval flow                     |
| `Config.News`                                         | Seed news (first run only)                          |
| `Config.Rules`                                        | Server rules                                        |
| `Config.Integrations`                                 | Optional addons (`rt-coins`)                        |
| `Config.RewardFallback`                               | What coins/chips become without rt-coins            |
| All options have comments inside `config/config.lua`. |                                                     |

***

### 🏆 Battle Pass

Free + premium tracks. XP is earned by **playtime** (built-in tracker, no rt-coins needed).

```lua
xpSource = {
    enabled      = true,
    cycleMinutes = 15,    -- minutes of active play per award
    xpPerCycle   = 100,
    antiAfk      = true,
    afkMinutes   = 10,
}
startDate = '01/01/2026',  -- DD/MM/YYYY
endDate   = '30/04/2026',
requireCoins    = true,    -- whole pass tab requires rt-coins
premiumPrice    = 500,     -- cost in coins
premiumTierSkip = 3,       -- levels granted on purchase
```

Grant XP from other resources:

```lua
exports['rt-pausemenu']:AddBattlePassXP(source, 500)
```

Live editing — staff edit the season without a restart via `/editartemporada` or the ✎ button in the pass header. Changes save to `data/seasonconfig.json` and apply to all online players instantly.

> `data/seasonconfig.json` overrides `config.lua` on boot. Delete it to restore `config.lua` values.

***

### 📸 Photo Mode

Clean screenshot mode with native GTA poses, opened from the camera button in the dock. No extra dependencies.

| Key                                                                                                                           | Action                            |
| ----------------------------------------------------------------------------------------------------------------------------- | --------------------------------- |
| `Mouse`                                                                                                                       | Orbit camera (native game camera) |
| `E`                                                                                                                           | Hide / show the UI                |
| `Backspace`                                                                                                                   | Back to poses                     |
| Capture with your own screenshot key after hiding the UI. On foot only (v1). Disable with `Config.PhotoMode.enabled = false`. |                                   |

***

### 📅 Live Events

Authorized jobs propose events; admins approve and publish; approved events auto-expire.

```lua
Config.EventsSystem = {
    enabled             = true,
    requireApproval     = true,
    authorizedJobs      = { 'police', 'realestate' },
    maxPendingPerPlayer = 2,
    autoDeleteHours     = 2,
}
```

> Job names must match `job.name` in your framework.

***

### 📰 News & Missions & Wheel

* **News** — staff publish announcements from the News tab. `Config.News` seeds the table on first run only.
* **Missions** — playtime milestones in `Config.Missions` (reward types: `money`, `item`, `chips`, `mixed`).
* **Daily Wheel** — server-sided weighted spin in `Config.DailyWheel` (types: `money`, `item`, `coins`, `chips`, `boost`, `special`).

***

### 🏪 Business Directory

Each business shows open/closed based on on-duty employees, with a waypoint button.

```lua
{
    id     = 'lscustoms',
    job    = 'lscustoms',          -- string or table of jobs
    name   = 'Los Santos Customs',
    icon   = 'fa-spray-can-sparkles',
    color  = '#ff6b35',
    coords = vector3(-370.47, -129.54, 38.68),
}
```

> Set `coords` to your own locations — defaults are GTA map points.

***

### 🔌 RT Coins (optional)

Adds a coins balance widget, real coin/chip rewards and the premium pass purchase.

```lua
Config.Integrations = {
    coins = { enabled = false, resource = 'rt-coins' },
}
Config.RewardFallback = {
    coins = { type = 'money', amountPerCoin = 100 },
    chips = { type = 'money', amountPerChip = 50 },
}
```

> Without rt-coins the menu is fully functional; coin rewards become cash via the fallback.

***

### 🧩 Exports

```lua
-- Client
exports['rt-pausemenu']:OpenPauseMenu()
exports['rt-pausemenu']:ClosePauseMenu()
exports['rt-pausemenu']:IsMenuOpen()
exports['rt-pausemenu']:BlockPauseMenu('my_resource')
exports['rt-pausemenu']:UnblockPauseMenu('my_resource')
exports['rt-pausemenu']:CanOpenPauseMenu()
-- Server
exports['rt-pausemenu']:AddBattlePassXP(source, 500)
```

> Use `BlockPauseMenu` / `UnblockPauseMenu` around custom NUIs so `ESC` doesn't open the pause menu over them.

***

### 👮 Admin

Requires admin permission (framework group or ACE — `group.admin`/`god` and `qbcore.admin`/`qbcore.god` are recognized).

```
/editartemporada            → open the live season editor
/bpgive xp <amount> [id]    → give Battle Pass XP
/bpgive level <n> [id]      → set level
/bpgive premium [id]        → enable premium
/bpgive reset [id]          → reset the pass
```

> Without `[id]` the command targets you. From console (id 0), `[id]` is required.

***

### 📁 Config files

| File                     | Purpose                           |
| ------------------------ | --------------------------------- |
| `config/config.lua`      | All settings                      |
| `bridge/framework.lua`   | Framework bridge (qbx/qbcore)     |
| `locales/*.json`         | UI translations                   |
| `locales/*.content.json` | Server content translations       |
| `data/seasonconfig.json` | Live season data (auto-generated) |

***

## 🛠️ Troubleshooting

| Symptom                            | Fix                                                |
| ---------------------------------- | -------------------------------------------------- |
| Menu won't open with ESC           | Check deps load before rt-pausemenu                |
| `attempt to index nil` (framework) | Start qbx\_core/qb-core, or set `Config.Framework` |
| `pm_*` table errors                | Configure oxmysql connection                       |
| UI changes not showing             | Clear NUI cache                                    |
| Battle pass tab missing            | Install rt-coins or set `requireCoins = false`     |
| Photo mode won't open              | Player is in a vehicle (on foot only)              |

***

### ❤️ Support

Developed by RT Dev. Support through your Tebex purchase channel. © RealTime Dev — all rights reserved.


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://realtime-dev.gitbook.io/realtime-dev-docs/realtime-scripts/rt-pause-menu.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
