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

# Installation

Install Cuxial Safezones step by step: dependencies, permissions and start order.

Cuxial Safezones needs no SQL import and no inventory items. It creates its own table on first start.

{% stepper %}
{% step %}

## Check the dependencies

These resources must be installed and working first:

* `ox_lib`
* `oxmysql`
* `cuxial_bridge`, with one of the supported frameworks: QBox, QBCore or ESX. See [Cuxial Bridge](/scripts/getting-started/cuxial-bridge.md).

`ox_inventory` is optional. It is what enforces the "weapons not allowed" rule of a zone. Without it, block the attack, aim and shoot controls in the zone instead.
{% endstep %}

{% step %}

## Copy the resource

Place the `cuxial_safezones` folder inside your `resources` directory. Keep the folder name as it is.
{% endstep %}

{% step %}

## Give the permissions

Managing zones needs two ACE permissions: `admin`, checked every time a zone is saved, and `command.crearzona`, needed to run the command.

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

```cfg
add_ace group.admin admin allow
add_ace group.admin command.crearzona allow
```

{% endcode %}

{% hint style="info" %}
Replace `group.admin` with the group your staff belongs to. If you change `command.name` or `command.ace` in the config, use the new names in these lines.
{% endhint %}
{% endstep %}

{% step %}

## Set the language

Optional. `en` and `es` are included.

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

```cfg
setr ox:locale "en"
```

{% endcode %}
{% endstep %}

{% step %}

## Start the resource

Start it after its dependencies and after your framework:

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

```cfg
ensure ox_lib
ensure oxmysql
# your framework here (qbx_core, qb-core or es_extended)
ensure cuxial_bridge
# optional
ensure ox_inventory
ensure cuxial_safezones
```

{% endcode %}

No SQL to run. The resource creates the table `cuxial_safezones` when it starts and prints `[cuxial_safezones][mysql] tabla lista` in the server console.

{% hint style="info" %}
Coming from an earlier version that used the table `cuxialsz`? Its zones are copied to the new table on the first start, as long as the new table is empty. The old table is not deleted.
{% endhint %}
{% endstep %}

{% step %}

## Check that it works

1. Join the server with a staff account and type `/crearzona`. The panel opens.
2. Go to **Create**, give the zone a name of at least 4 characters and confirm.
3. Mark three or more vertices with the left mouse button and press <kbd>Enter</kbd>.
4. Walk into the zone. You become invincible and the sign shows up if you enabled it.
   {% endstep %}
   {% endstepper %}

Next: adjust the rules in [Configuration](/scripts/core/cuxial-safezones/configuration.md).


---

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