Skip to content

Configuration

Every option of Cuxial Safezones explained: the config file and the settings of each zone.

Server-wide options live in shared/config.lua. Everything that belongs to a single zone is set in the panel and stored in the database. Restart the resource after changing the config file.

Command · command ​

OptionTypeDefaultWhat it does
namestring'crearzona'Command that opens the panel, without the slash.
acestring'admin'ACE permission needed to create, edit, turn off or delete zones. The server checks it on every change.

Interface ​

OptionTypeDefaultWhat it does
accentstring (hex)configurableAccent colour of the panel.

Effects · features ​

Server-wide switches. Turning one off disables that effect in every zone, and the panel shows it as off instead of offering it.

OptionTypeDefaultWhat it does
maxSpeedbooleantruetrue applies the speed limit of each zone. false never limits speed.
textUIbooleantruetrue shows the sign of each zone. false hides all signs.
driveBybooleantruetrue lets zones block drive-by. false never blocks it.
weaponsbooleantruetrue lets zones block weapons. false never blocks them.
debugbooleantruetrue lets staff draw the volume of a zone in the world. false never draws it.

Invincibility has no switch. It applies in every active zone, except to players covered by an exception. On leaving, the zone only removes the invincibility it gave: a player who was already invincible on entering, for example with the god mode of an administration menu, keeps it.

Speed ​

OptionTypeDefaultWhat it does
speedDivisornumber3.6Converts the speed typed in the panel to the game unit. 3.6 = the panel works in km/h.
speedIntervalnumber1000Milliseconds between speed limit refreshes while a vehicle is inside a zone.

Blockable controls · blockControls ​

List of controls the panel lets staff block in a zone. Each entry has a value (GTA control number) and a label (text shown in the panel). The labels in the file are examples to rename.

Default valueControl
140Melee attack
24Attack
25Aim
257Shoot

This list is also the allow-list. A control that is not in it cannot be blocked by any zone, and removing one takes it out of the zones that used it the next time the resource starts.

Exception groups · bypassGroups ​

OptionTypeDefaultWhat it does
bypassGroupsstring[]{ 'admin', 'mod' }Permission groups that can be used in zone exceptions, written without the group. prefix. The panel offers them as suggestions.

A group gives nothing by being in this list: each zone decides who skips what. A player belongs to a group when they hold that permission in your framework (admin, mod…), checked through cuxial_bridge. Groups typed by hand in a zone are checked the same way.

Limits · limits ​

OptionTypeDefaultWhat it does
writesnumber12Changes a staff member can save within one window.
windownumber10000Length of that window, in milliseconds.
maxPointsnumber64Maximum vertices per zone.
maxBypassRulesnumber12Maximum exceptions per zone.

Editor · creator ​

OptionTypeDefaultWhat it does
startHeightnumber5Metres between your position and the ceiling of the zone when the editor opens.

Settings of each zone ​

Set in the panel when creating or editing a zone.

SettingValuesWhat it does
Name4 to 20 characters, uniqueIdentifies the zone. The characters < > " ' & are removed.
Maximum speed0 to 300Limit for the vehicle a player is in. 0 = no limit. The vehicle recovers its normal top speed on leaving.
Allow weaponsOn or offOff blocks weapons inside the zone. Needs ox_inventory.
Allow drive-byOn or offOff blocks shooting from a vehicle.
SoundOn or offPlays a sound when entering and leaving.
Draw the volumeOn or offDraws the zone in the world for every player, to check its shape.
Blocked controlsFrom blockControlsControls disabled inside the zone.
ExceptionsUp to maxBypassRulesWho skips which rules. See below.
SignOn or offShows a sign while inside: text up to 40 characters or up to 8 coloured segments, position, font, finish, size and optional icon with its colour.

Exceptions ​

An exception targets a job or a group, and lists what it skips: invincibility, weapons, drive-by, speed or blocked controls.

  • Job: optionally from a minimum grade upwards, and optionally only on duty.
  • Group: one of the groups in bypassGroups, or any other framework permission typed by hand.
  • One exception per job or group. An exception that skips nothing is not saved.
  • Changing job, grade or duty status applies at once, without leaving the zone.

Common changes ​

Rename the command

shared/config.lua
lua
command = {
    name = 'safezones',
    ace = 'admin',
},

Work in mph instead of km/h

shared/config.lua
lua
speedDivisor = 2.236936,

Change the unit in the speed_limited text of locales/en.json to match.

Let zones block jumping

shared/config.lua
lua
blockControls = {
    { value = 140, label = 'Melee (R)' },
    { value = 24,  label = 'Attack (left click)' },
    { value = 25,  label = 'Aim (right click)' },
    { value = 257, label = 'Shoot' },
    { value = 22,  label = 'Jump' },
},

© Cuxial