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

# Cuxial Safezones

Safe zones for FiveM drawn in game, with their own rules, on-screen sign and exceptions per zone.

Cuxial Safezones lets your staff draw safe zones directly in the world and decide what applies inside each one. Zones are stored in the database and reach every player the moment they are saved, with no restart.

## What it does

* **In-game editor.** A free camera to mark the vertices of a polygon and set its floor and ceiling.
* **Invincibility** for every player inside a zone.
* **Rules per zone**: vehicle speed limit, weapons, drive-by and a list of blocked controls.
* **On-screen sign** per zone, with its own text, colours, position, font, finish, size and icon.
* **Exceptions** per zone: a job (from a given grade, optionally only on duty) or a permission group can skip the rules you choose.
* **Enter and exit sound**, optional per zone.
* **Turn a zone off** without deleting it, and draw its volume in the world to check it.
* **Live sync.** Creating, editing, turning off or deleting a zone updates all players at once.
* **Exports** so other resources can ask whether a player is inside a safe zone.

## Requirements

| Resource        | Required | Used for                                                                      |
| --------------- | -------- | ----------------------------------------------------------------------------- |
| `ox_lib`        | Yes      | Zones, command, notifications, locales                                        |
| `oxmysql`       | Yes      | Stores the zones                                                              |
| `cuxial_bridge` | Yes      | Connects to your framework (QBox, QBCore or ESX) and provides the zone editor |
| `ox_inventory`  | No       | Enforces the "weapons not allowed" rule                                       |

{% hint style="info" %}
The weapons rule is enforced through `ox_inventory`. Without it, use the blocked controls of the zone (attack, aim, shoot).
{% 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, permissions and start order.</td><td><a href="/scripts/core/cuxial-safezones/installation.md">Installation</a></td></tr><tr><td><strong>Configuration</strong></td><td>Every option in <code>shared/config.lua</code> and the settings of each zone.</td><td><a href="/scripts/core/cuxial-safezones/configuration.md">Configuration</a></td></tr><tr><td><strong>Commands &#x26; permissions</strong></td><td>The panel command, the editor keys and who can use them.</td><td><a href="/scripts/core/cuxial-safezones/commands.md">Commands &amp; permissions</a></td></tr><tr><td><strong>Exports &#x26; events</strong></td><td>Read the zones from your own resources.</td><td><a href="/scripts/core/cuxial-safezones/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/core/cuxial-safezones/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-safezones.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.
