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

# Prompt Arcade

Playable arcade cabinets — screen games, physical machines, leaderboards & rewards

Turn the arcade cabinets in your map into **real, playable games**. Walk up to a cabinet, press interact, and play — shooters, racers, a claw machine, a fortune teller, and a two-player love tester. Every game is self-contained (no external assets to chase), keeps a **high-score leaderboard**, and exposes clean **reward hooks** so you decide what a win is worth.

{% hint style="info" %}
The games render **on the cabinet screen** using the cabinet's own props — no full-screen NUI takeover. Two-player games (Badlands + the racers) run split-screen on one cabinet, and the Love Tester pairs two players on one machine.
{% endhint %}

***

### Requirements

* FiveM server (recent artifact recommended)
* An **arcade map/MLO** where the cabinets are placed (see [Props & Placement](https://prompt-studio.gitbook.io/prompt-studio/scripts/arcade-games/configuration.md#props-and-placement))

That's it — **no dependencies**. *Since v0.5.0* the script needs neither `ox_lib` nor a targeting resource.

Optional, auto-detected if present:

* [`ox_target`](https://github.com/overextended/ox_target) **or** `qb-target` — used for the interact prompt. Without either, the built-in [Text UI](https://prompt-studio.gitbook.io/prompt-studio/scripts/arcade-games/configuration.md#text-ui-no-ox_lib-no-target-script) `[E]` prompt takes over.
* **Framework** (QBCore / ESX) — only used to grant rewards and show character names on leaderboards. Without one the games still play; rewards simply don't fire and names fall back to the Steam/license name.

***

### Installation

{% stepper %}
{% step %}

#### Copy the resource

Drop `prompt_arcade_games` into your `resources` folder.
{% endstep %}

{% step %}

#### Add to server.cfg

```
ensure prompt_arcade_games
```

If you use a targeting resource, start it **before** the arcade:

```
ensure ox_target        # or: ensure qb-target
ensure prompt_arcade_games
```

`ox_lib`, `prompt_audio` / other resources are **not** required.
{% endstep %}

{% step %}

#### Place the cabinets

Place the stock arcade cabinet props in your arcade MLO (the game binds to them by model). The custom "screen" props the games draw onto ship **inside this resource** — you don't install them separately. See [Props & Placement](https://prompt-studio.gitbook.io/prompt-studio/scripts/arcade-games/configuration.md#props-and-placement).
{% endstep %}

{% step %}

#### Configure & reward

Open `config.lua` to enable/disable games, rebind controls, or set the default volume. Hook the reward events in your own resource to pay out wins — see [For Developers](https://prompt-studio.gitbook.io/prompt-studio/scripts/arcade-games/developers.md).
{% endstep %}
{% endstepper %}

***

### First-boot checklist

| Check                   | What to look for                                                                        |
| ----------------------- | --------------------------------------------------------------------------------------- |
| Targeting detected      | Console prints `boot: N framework cabinet(s) wired (target=ox_target)` (or `qb-target`) |
| Framework detected      | Console prints `[arc:framework] detected: qb` / `esx` / `standalone`                    |
| Interact prompt appears | Walk to a placed cabinet — you get a "Play …" target option                             |
| Screen lights up        | On play, the game renders on the cabinet's screen                                       |

{% hint style="warning" %}
If a cabinet has **no interact prompt**, you don't have `ox_target` or `qb-target` started. If the **screen stays black**, the cabinet isn't a map-placed prop (the Love Tester in particular needs a map-placed cabinet). See [Troubleshooting](https://prompt-studio.gitbook.io/prompt-studio/scripts/arcade-games/troubleshooting.md).
{% endhint %}

***

### What's inside

<table data-view="cards"><thead><tr><th>Section</th><th></th><th data-card-target data-type="content-ref">Link</th></tr></thead><tbody><tr><td><strong>The Games</strong></td><td>The full roster and how each plays</td><td><a href="https://prompt-studio.gitbook.io/prompt-studio/scripts/arcade-games/games.md">The Games</a></td></tr><tr><td><strong>Configuration</strong></td><td>config.lua reference — games, controls, volume, security</td><td><a href="https://prompt-studio.gitbook.io/prompt-studio/scripts/arcade-games/configuration.md">Configuration</a></td></tr><tr><td><strong>For Developers</strong></td><td>Reward hooks, exports, leaderboards, anti-cheat</td><td><a href="https://prompt-studio.gitbook.io/prompt-studio/scripts/arcade-games/developers.md">For Developers</a></td></tr><tr><td><strong>Troubleshooting</strong></td><td>No prompt, black screen, no rewards…</td><td><a href="https://prompt-studio.gitbook.io/prompt-studio/scripts/arcade-games/troubleshooting.md">Troubleshooting</a></td></tr></tbody></table>
