> 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-danceclass.md).

# Cuxial Dance Class

Group dance classes for FiveM: an instructor, a drawn zone, students and a rhythm minigame.

Cuxial Dance Class lets a player open a dance class anywhere on the map. Whoever steps into the class zone joins as a student and follows each dance with a rhythm minigame.

## What it does

* **Classes drawn on the spot.** The instructor draws the class zone as a polygon, then sets the name, difficulty, fee, capacity and dances.
* **Join by walking in.** Stepping into the zone joins the class; leaving it takes you out. Classes with a fee ask for confirmation before charging.
* **Rhythm minigame.** Students press the right key as each note reaches the line. Three misses in a row and the character falls, gets up and picks the dance back up.
* **Three difficulties.** Each one has its own speed, timing windows and set of keys.
* **Entry fee.** Paid by the student to the instructor, refunded when the class closes without a single dance.
* **Live view for the instructor.** Hits, misses and streak of every student during the dance, then a results table and a final podium.
* **History and ranks.** Classes taken, classes taught, dances, points and best accuracy are saved per character.
* **Cuxial Gym points (optional).** A well-followed dance raises a gym skill for the students and the instructor.

## Requirements

| Resource        | Required | Used for                                                                        |
| --------------- | -------- | ------------------------------------------------------------------------------- |
| `ox_lib`        | Yes      | Zones, key bindings, locales                                                    |
| `oxmysql`       | Yes      | Class history                                                                   |
| `cuxial_bridge` | Yes      | Connects to your framework (QBox, QBCore or ESX) and provides the zone creator  |
| `cuxial_emotes` | Yes      | Source of every dance. See [Cuxial Emotes](/scripts/interface/cuxial-emotes.md) |
| `cuxial_gym`    | No       | Turns dance points into a gym skill                                             |

The common base for every script is in [Requirements](/scripts/getting-started/requirements.md).

{% hint style="info" %}
Without Cuxial Gym, classes, results, history and ranks work the same. Points are still counted for the history; they just do not raise any skill.
{% endhint %}

## Pages

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Installation</strong></td><td>Dependencies, start order and a first test class.</td><td><a href="/scripts/leisure/cuxial-danceclass/installation.md">Installation</a></td></tr><tr><td><strong>Configuration</strong></td><td>Every option in <code>shared/config.lua</code>.</td><td><a href="/scripts/leisure/cuxial-danceclass/configuration.md">Configuration</a></td></tr><tr><td><strong>Commands &#x26; permissions</strong></td><td>The class command, keys and who can teach.</td><td><a href="/scripts/leisure/cuxial-danceclass/commands.md">Commands &amp; permissions</a></td></tr><tr><td><strong>Exports &#x26; events</strong></td><td>Read classes and react to them from your own resources.</td><td><a href="/scripts/leisure/cuxial-danceclass/developers.md">Exports &amp; events</a></td></tr><tr><td><strong>Troubleshooting</strong></td><td>Common problems and how to fix them.</td><td><a href="/scripts/leisure/cuxial-danceclass/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-danceclass.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.
