> 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/core/cuxial-cmservices.md).

# Cuxial Community Service

Staff sanctions for FiveM: community service tasks and administrative jail, with an admin panel.

Cuxial Community Service gives your staff two sanctions: a number of community service tasks, or minutes of administrative jail. The player is taken to the zone, cannot leave it, and is released automatically when the sanction is served.

## What it does

* **Community service by tasks.** The player gets one task at a time, picked at random from five categories: construction, gardening, cleaning, maintenance and repairs.
* **Guided tasks.** Each task has a map blip with a route, an outlined object, a floating marker, an interaction point and an on-screen indicator with direction and distance.
* **Closed zone.** A polygon surrounds the work area. A player who walks out is brought back. Attacks are disabled inside.
* **Administrative jail by minutes.** Random cell, no weapons, no attacks, invincible while serving, and a maximum distance from the cell.
* **Persistent sanctions.** Progress is saved after every task and every minute, and the sanction is applied again when the character loads.
* **Admin panel.** `/sanciones` lists every sanctioned character by type and removes a sanction, whether the player is online or not.
* **Notifications and announcements.** The staff member and the player are notified, and the server chat announces sanctions given and served.
* **Task mapping tool.** `/taskcoords` copies object models, coordinates or a full task entry to the clipboard, ready to paste into the config.
* **Exports for other resources**: read a sanction, add community service or remove it, also for offline characters.

## How a sanction works

{% tabs %}
{% tab title="Community service" %}

1. Staff run `/comserv` with the player id, the number of tasks and the reason.
2. The player is moved to the zone and receives the first task.
3. At the interaction point the player presses <kbd>E</kbd>. A progress bar runs with the animation of that task.
4. Each finished task lowers the counter by one and a new task appears somewhere else.
5. At zero the player is moved to the exit point and the sanction is deleted.
   {% endtab %}

{% tab title="Jail" %}

1. Staff run `/jaila` with the player id, the minutes and the reason.
2. The player is moved to a random cell.
3. Every minute spent online in jail counts as one minute served.
4. When the time is served the player is moved to the exit point and the sanction is deleted.
   {% endtab %}
   {% endtabs %}

A character holds one sanction at a time: the commands refuse a second one while the first is active.

## Requirements

| Resource        | Required | Used for                                                                                     |
| --------------- | -------- | -------------------------------------------------------------------------------------------- |
| OneSync         | Yes      | Moving players from the server                                                               |
| `ox_lib`        | Yes      | Commands, zone, progress bar, notifications                                                  |
| `oxmysql`       | Yes      | Saving sanctions                                                                             |
| `cuxial_bridge` | Yes      | Connects to your framework                                                                   |
| QBox or QBCore  | Yes      | Characters and staff permissions                                                             |
| `bl_sprites`    | Yes      | Interaction point of each task                                                               |
| `cuxial_chat`   | No       | Announces sanctions in the chat's sanctions channel. Without it they go to the standard chat |
| `wais-hudv6`    | No       | Shows the radar while the player is inside the community service zone                        |

{% hint style="warning" %}
Requires QBox or QBCore. The admin panel reads character names from the `players` table of those frameworks.
{% endhint %}

## 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, SQL, permissions and start order.</td><td><a href="/scripts/core/cuxial-cmservices/installation.md">Installation</a></td></tr><tr><td><i class="fa-sliders">:sliders:</i></td><td><strong>Configuration</strong></td><td>Zones, cells and tasks in <code>config/shared.lua</code>.</td><td><a href="/scripts/core/cuxial-cmservices/configuration.md">Configuration</a></td></tr><tr><td><i class="fa-terminal">:terminal:</i></td><td><strong>Commands &#x26; permissions</strong></td><td>Staff commands, keys and the ACE group they need.</td><td><a href="/scripts/core/cuxial-cmservices/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>Read, add and remove sanctions from your own resources.</td><td><a href="/scripts/core/cuxial-cmservices/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/core/cuxial-cmservices/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/core/cuxial-cmservices.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.
