> For the complete documentation index, see [llms.txt](https://docs.cuxial.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cuxial.com/scripts/leisure/cuxial-pvp.md).

# Cuxial PvP

PvP arenas for FiveM: team duels, Gun Game, live spectating, bets and a leaderboard.

Cuxial PvP adds instanced PvP matches to your server. Players open a menu, create or join a lobby, and fight in an arena that the rest of the server neither sees nor disturbs.

## What it does

* **Duels by teams**, from 1v1 up to 30v30, by rounds or by time, with the weapon, map, time of day, armour and headshot rules chosen by the host.
* **Gun Game**, free for all inside a drawn zone: every few kills you move up a weapon ladder, and the last rung is a melee finisher.
* **Lobbies** with optional password, team assignment by the host and a player cap.
* **Isolated matches.** Each match runs in its own routing bucket, with no ambient population.
* **Live matches list** with score, players and betting pool.
* **Spectator mode** with a camera that switches between players.
* **Bets in cash** on duels, paid out in proportion to what each winner staked.
* **Leaderboard per game mode**: wins, losses, kills and deaths.
* **In-game zone tool** to draw Gun Game zones with a free camera, restricted by an ACE permission.
* **Discord avatars** in lobbies, HUD and scoreboard.
* **Clean exit.** Armour, time of day and position are restored when the match ends, and bets are refunded if a match is cancelled.

## Requirements

| Resource                         | Required | Used for                                                               |
| -------------------------------- | -------- | ---------------------------------------------------------------------- |
| OneSync                          | Yes      | Routing buckets and player state                                       |
| `ox_lib`                         | Yes      | Callbacks, keybinds, notifications, locales                            |
| `cuxial_bridge`                  | Yes      | Connects to your framework (QBox, QBCore or ESX) and to your inventory |
| `ox_inventory` or `qb-inventory` | Yes      | The inventory `cuxial_bridge` works with                               |
| `av_weather` or `cd_easytime`    | No       | Freezes the time of day during a match                                 |
| Discord bot token                | No       | Shows each player's real Discord picture instead of the default avatar |

Cuxial PvP needs no database and no inventory items.

## Pages

<table data-view="cards"><thead><tr><th></th><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><i class="fa-download">:download:</i></td><td><strong>Installation</strong></td><td>Dependencies, arenas, permissions and start order.</td><td><a href="/scripts/leisure/cuxial-pvp/installation.md">Installation</a></td></tr><tr><td><i class="fa-gamepad">:gamepad:</i></td><td><strong>Features guide</strong></td><td>How lobbies, duels, Gun Game, spectating and bets work in game.</td><td><a href="/scripts/leisure/cuxial-pvp/features.md">Features guide</a></td></tr><tr><td><i class="fa-sliders">:sliders:</i></td><td><strong>Configuration</strong></td><td>Every option in the <code>data</code> folder: rules, maps, weapons and zones.</td><td><a href="/scripts/leisure/cuxial-pvp/configuration.md">Configuration</a></td></tr><tr><td><i class="fa-terminal">:terminal:</i></td><td><strong>Commands &#x26; permissions</strong></td><td>Commands, keys and the zone tool permission.</td><td><a href="/scripts/leisure/cuxial-pvp/commands.md">Commands &amp; permissions</a></td></tr><tr><td><i class="fa-code">:code:</i></td><td><strong>Exports &#x26; events</strong></td><td>Open the menu and read the match state from your own resources.</td><td><a href="/scripts/leisure/cuxial-pvp/developers.md">Exports &amp; events</a></td></tr><tr><td><i class="fa-wrench">:wrench:</i></td><td><strong>Troubleshooting</strong></td><td>Common problems and how to fix them.</td><td><a href="/scripts/leisure/cuxial-pvp/troubleshooting.md">Troubleshooting</a></td></tr></tbody></table>


---

# 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://docs.cuxial.com/scripts/leisure/cuxial-pvp.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.
