> 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/commands.md).

# Commands & permissions

The command, keys and permissions of Cuxial Dance Class, and who can open a class.

Cuxial Dance Class has one command, open to every player. Who can teach is decided in the config, not by the command.

## Commands

| Command             | Who        | What it does                                                                             |
| ------------------- | ---------- | ---------------------------------------------------------------------------------------- |
| `/danceclass`       | Everyone   | Opens the panel: create a class, manage your class, see nearby classes and your history. |
| `/danceclass join`  | Everyone   | Joins the nearest open class. A class with a fee charges it on joining.                  |
| `/danceclass next`  | Instructor | Starts the class or launches the next dance. Same as the <kbd>F6</kbd> key.              |
| `/danceclass debug` | Everyone   | Prints your class, your role and the open classes around you to the F8 console.          |

{% hint style="info" %}
The command name comes from `instructor.command` in `shared/config.lua`.
{% endhint %}

## Keys

| Key                                                            | Who        | What it does                                                                    |
| -------------------------------------------------------------- | ---------- | ------------------------------------------------------------------------------- |
| <kbd>F6</kbd>                                                  | Instructor | Starts the class or launches the next dance. Default from `instructor.nextKey`. |
| Not set                                                        | Everyone   | Opens the panel. Set a default in `instructor.keybind`.                         |
| <kbd>E</kbd>                                                   | Student    | Accepts the fee of a class when the prompt appears. From `joinKey`.             |
| <kbd>W</kbd> <kbd>A</kbd> <kbd>S</kbd> <kbd>D</kbd> and arrows | Student    | Notes of the minigame. The keys in use depend on the difficulty.                |
| <kbd>Esc</kbd>                                                 | Everyone   | Closes the panel.                                                               |

The first two are FiveM key bindings: each player can change them in the GTA key settings. While a dance is playing, movement, jumping, attacks and vehicle entry are disabled.

### Drawing the zone

The zone creator belongs to Cuxial Bridge and shows its controls on screen.

| Key                  | What it does                    |
| -------------------- | ------------------------------- |
| Left click           | Places a point.                 |
| Right click          | Removes the last point.         |
| Arrows or scroll     | Changes the height of the zone. |
| <kbd>Enter</kbd>     | Saves the zone.                 |
| <kbd>Backspace</kbd> | Cancels.                        |

## How a class runs

* **Instructor.** Opens the panel, draws the zone, fills in the class and opens it. Each dance is launched with <kbd>F6</kbd> or from the panel, where a specific dance can be picked. The panel also kicks students and ends the class.
* **Student.** Walks into the zone to join. Leaving the zone, pressing the leave button in the panel or dying takes them out.
* **End.** The class ends when the instructor ends it, dies or disconnects. If at least one dance was played, everyone sees the final podium and the history is saved.

## Permissions

There are no staff commands. The only permission is who can open a class, set in `instructor.mode`:

| `instructor.mode` | Who can teach                                        |
| ----------------- | ---------------------------------------------------- |
| `'everyone'`      | Any player. Default.                                 |
| `'job'`           | Players whose job is in `instructor.jobs`.           |
| `'ace'`           | Players with the ACE permission in `instructor.ace`. |

With `'ace'`, grant the permission in your server configuration:

{% code title="server.cfg" %}

```cfg
add_ace group.dancer danceclass.instructor allow
```

{% endcode %}

Players who cannot teach still open the panel. They see their history and the classes nearby.


---

# 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/commands.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.
