Before You Begin#
Before installing Safezone Creator, make sure your server meets the minimum requirements. Two libraries, OneSync and a framework are mandatory; everything else is optional and detected on its own.
Requirement | Status | Notes |
|---|---|---|
| Required | Database access for the zones table. |
| Required | The zones themselves, callbacks and shared helpers. |
OneSync | Required | Declared as a dependency. On by default on txAdmin servers. |
Framework | Required |
|
Inventory | Recommended | Supplies the weapon list for bypass weapons. Without one, that list is empty and the console warns about it. |
| Optional | Gangs on ESX. QBCore and Qbox use their own gangs with nothing to install. |
| Optional | Its HUD is hidden while the creator is open. |
Everything framework- or inventory-specific sits behind a small bridge file, and the resource picks the right one by looking at what is already running:
Layer | Detected from |
|---|---|
Framework |
|
Inventory |
|
Gangs | The framework's own on QBCore and Qbox · |
Run only one framework and one inventory. Detection takes whichever resource of the list it finds started, so with two running there is no guaranteed winner. Integrations has the details and how to pin one by hand.
github.comReleases · overextended/oxmysqlMySQL resource for FXServer.github.comReleases · overextended/ox_libA FiveM resource and script library for Lua and JS.Downloading Safezone Creator#
After purchasing Safezone Creator, the resource is automatically linked to your CFX Portal account.
Sign in to the CFX Portal using the same account used during checkout, open Granted Assets, and download Safezone Creator.
After extracting the download, you should have the following folder:
qs-safezone-creator/
├── config/ -- main.lua, what you may edit
├── custom/ -- framework bridges and notifications (editable)
├── client/custom/ -- client-side bridges (editable)
├── server/custom/ -- inventory bridges (editable)
├── server/webhooks.lua -- Discord logs
├── database/ -- database.sql
├── locales/ -- nineteen languages
└── web/ -- the interface, ready to useKeep the folder name
qs-safezone-creator. The update check looks the resource up by its folder name, so a renamed copy can no longer tell you when a new version is out.
Installing the Resource#
Move the qs-safezone-creator folder into your server's resources directory. It can live anywhere inside it, including a category folder:
resources/
└── [qs]/
└── qs-safezone-creator/Once copied, open your server.cfg and make sure every dependency — and everything it should detect — starts before Safezone Creator:
ensure oxmysql
ensure ox_lib
# Framework
ensure es_extended
# ensure qb-core
# ensure qbx_core
# Inventory, gangs, HUD
ensure qs-inventory
# ensure qs-gangs
# ensure qs-interface
ensure qs-safezone-creatorThe loading order matters. Detection only sees resources that are already started, so a framework or inventory that starts after Safezone Creator is not found.
The Database#
Safezone Creator keeps every zone in a single table, qs_safezones. Import database/database.sql into your server's database before starting the resource, with HeidiSQL, phpMyAdmin or any MySQL / MariaDB client.
database.sql
DROP TABLE IF EXISTS `qs_safezones`;
CREATE TABLE IF NOT EXISTS `qs_safezones` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`creator` varchar(50) NOT NULL,
`label` varchar(255) NOT NULL,
`zone` longtext NOT NULL,
`blip` longtext NOT NULL,
`job` longtext DEFAULT NULL,
`job_grades` longtext DEFAULT NULL,
`gang` varchar(50) DEFAULT NULL,
`gang_grades` longtext DEFAULT NULL,
`bypass_items` longtext DEFAULT NULL,
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `creator` (`creator`),
KEY `label` (`label`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;Column | Holds |
|---|---|
| The zone's number — shown in the creator as Zone #id — and its name. |
| The identifier of the admin who last saved it. |
| The corners, the height and the zone's settings — healing, outline, notifications, speed limit. |
| Whether it has a blip, and its name, sprite, colour, scale and position. |
| Who keeps their weapons inside: jobs and grades, and one gang with its grades. |
| The weapons anybody may use inside. |
Zones are read once when the resource starts and kept in memory. Creating, editing or deleting from the creator updates the table and every connected player at the same time — but a row changed by hand in the database is only picked up after the resource restarts.
Granting Creator Access#
The creator is where zones are drawn and changed, so /safezonecreator is checked on the server every time it is typed. Either route below lets a player in; anybody else is told You do not have permission to do this.
Automatic, nothing to configure. On ESX, players in the admin or superadmin group. On QBCore and Qbox, players with the admin or god permission, or allowed the command ace — which is how txAdmin admins are usually set up:
add_ace group.admin command allow
add_principal identifier.license:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx group.adminRestart the server after adding the lines.
Hand the creator to a job — or to some of its grades — in config/main.lua. grade = false lets every grade in; a list lets only those grade numbers in.
Config.CreatorJobs = {
{
job = 'police',
grade = { 1, 2, 3 } -- only these grades
},
{
job = 'ambulance',
grade = false -- every grade
}
}Grades are your framework's grade numbers — 0 is usually the lowest rank.
Configuring the Resource#
Every zone is configured in game. The files hold only what applies to the whole server:
File | Contents |
|---|---|
| The language, detection, who may open the creator, the healing switch, the creator's camera and keys, debug. |
| The Discord webhook for the creator's logs, and whether IPs appear in them. |
| How notifications are shown, and which HUD is hidden while the creator is open. |
| The framework bridges: jobs, grades, gangs and the admin check. |
| One bridge per inventory: where item names, labels and pictures come from. |
| The nineteen translations. |
The values worth reviewing first:
Config.Locale = 'en' -- ar, bg, da, de, en, es, fa, fr, hi, hu, it, ja, ko, nl, pt, ro, ru, tr, zh-CN
Config.Regeneration = {
health = true, -- master switch for "Heal on Enter" on every zone
}
Config.MinPointLength = 70.0 -- perimeter (metres) at which a drawn zone turns green
Config.Debug = true -- verbose console output; set to false in production
Config.Debugships switched on. Leave it on while you set up your zones — the console explains every change, entry and exit — and switch it off before the server goes live.
Verifying the Installation#
After completing the installation, restart your server and read the console. These lines say the resource found its framework and checked for updates:
[INFO] Successfully loaded the framework. esx
You are using the latest version of qs-safezone-creator!If the resource stops instead, with an error that mentions custom.none, no framework was found — move it above ensure qs-safezone-creator. A repeating Using standalone inventory warning means the same for your inventory.
Then join your server and work through the first loop:
Open the creator
Type
/safezonecreatoras an admin. The creator opens with the list of zones on the left — empty on a fresh install.Draw a zone
Press +, type a name, press Zone Points and left-click four or more corners around you with the free camera. Press
ENTERto come back to the form.Save and walk in
Give the blip a name and a position inside the zone, press Create Zone, and walk in with a weapon in your hands: you are told you entered the zone and the weapon is put away. Usage covers every option of the form.
Nothing needs a restart from here on. Every zone is created, changed and deleted in game, and reaches every player at once.



