> For the complete documentation index, see [llms.txt](https://docs.0resmon.org/0resmon/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.0resmon.org/0resmon/0r-resources/0r-safezonecreator/installation.md).

# Installation

{% stepper %}
{% step %}

## Check dependencies

Make sure these are installed and starting **before** `0r-safezonecreator`:

* **ox\_lib**
* A framework: `es_extended`, `qb-core`, or `qbx_core` (auto-detected by LTBridge)
  {% endstep %}

{% step %}

## Add the resource

Drop the folder into your server as `0r-safezonecreator`. Keep that name — exports and events use it as a prefix.
{% endstep %}

{% step %}

## Update server.cfg

```cfg
ensure ox_lib

# your framework
ensure es_extended      # or qb-core / qbx_core

ensure 0r-safezonecreator
```

{% endstep %}

{% step %}

## Set up permissions

The admin command defaults to `/safezonecreator` (`config/main.lua` → `command`).

Who can open the editor and save zones:

1. **Framework admin** — detected automatically, or
2. **ACE** — default permission is `command.safezone` (`config/main.lua` → `ace`)

Example for a staff group:

```cfg
add_ace group.admin command.safezone allow
add_principal identifier.license:YOUR_LICENSE_HERE group.admin
```

Change `ace` in config if you use a different permission string, then match it in `server.cfg`.
{% endstep %}

{% step %}

## Test in-game

1. Join as someone with admin or ACE access.
2. Run `/safezonecreator` (or your configured command).
3. Create a test zone, save it, and confirm `data/zones.json` updates on the server.
4. Walk into the polygon — restrictions and notifications should apply.

If the menu does not open, set `setup.debug = 1` in `config/main.lua`, restart the resource, and check the server console.
{% endstep %}

{% step %}

## Back up zone data

All zones are stored in **`data/zones.json`**. The file starts as `{}` and grows as you create zones. Back it up before major edits or server migrations — see [FAQ](/0resmon/0r-resources/0r-safezonecreator/faq.md) if saves fail.
{% endstep %}
{% endstepper %}
