Skip to content

Configuration

config/main.lua — setup, notifications, performance, visuals, and per-zone rules.

All server-side settings live in config/main.lua. Per-zone behaviour (weapons, vehicles, blips, job whitelist) is set in the admin UI and stored in data/zones.json.

Open the file in an editor and change only what you need — this page is the short version.


Setup#

lua
setup = {
    debug = 1,           -- 1 = errors only; higher = more console output
    checkVersion = true,
    notify = 'auto',     -- or ox_lib, lt-ui, esx_notify, qb-notify, etc.
},
OptionWhat it does
debugConsole noise. Use 1 on a live server unless you are troubleshooting.
checkVersionWarns if a newer release exists on startup.
notifyNotify backend when customNotifications = false. See values below.

Supported setup.notify values: auto, ox_lib, lt-ui, esx_notify, okokNotify, pNotify, mythic_notify, brutal_notify, wasabi_notify, origen_notify, lation_ui, qb-notify. With auto, the first running compatible resource is used.


General#

OptionDefaultNotes
locale'en'Also: tr, de, fr, es, pt-br, pl, ru, it — files in locales/
command'safezonecreator'Chat command for the admin menu
ace'command.safezone'ACE permission for zone management (see Installation)

Notifications#

lua
notifications = {
    enabled = true,
    customNotifications = true,
},
OptionWhat it does
enabledMaster switch for enter/leave feedback
customNotificationstrue = on-screen NUI banner while inside a zone; false = standard notify toasts via LT.Notify

Per-zone Notification in the editor still controls whether that zone triggers enter/leave messages at all.

With customNotifications = true, players see the zone name in the UI overlay. With false, they get classic notify popups when notification is enabled on the zone.


Safezone performance#

These values tune how often the client scans entities near zones. Lower milliseconds = more responsive, slightly heavier.

lua
safezone = {
    healIntervalMs = 5000,
    zoneScanMargin = 80.0,
    vehicleScanMs = 1000,
    pedCollisionMs = 50,
    vehicleCollisionMs = 50,
},
OptionWhat it does
healIntervalMsTick interval for Heal Over Time
zoneScanMarginExtra meters around the zone box before vehicle/ped scans
vehicleScanMsHow often vehicles inside/near the zone get rule checks
pedCollisionMsPed collision disable loop interval
vehicleCollisionMsVehicle-vs-player collision disable interval

If you run many large zones and notice client load, raise the *Ms values slightly instead of lowering them.


Ghost mode#

OptionDefaultNotes
ghostedEntityAlpha100.0Transparency for ghost mode (SetGhostedEntityAlpha)

UI — safezone warning#

When notifications.customNotifications = true, players see this NUI banner while inside a zone (zone name on screen).

lua
ui = {
    safezoneWarning = {
        position = 'bottom',       -- 'bottom' or 'top'
        shadowsAndGlows = true,
        shadow = 'rgba(87,166,255,0.5)',
        accent = '#57A6FF',
        logoGradient = { '#57A6FF', '#4c94e7' },
        logoBorder = '0.75px solid #57A6FF',
        textColor = 'rgba(255,255,255,0.85)',
    },
},
OptionWhat it does
positionBanner at top or bottom of the screen
shadowsAndGlowsGlow and shadow effects on logo and title
shadow, accent, logoGradient, logoBorder, textColorColours (hex, rgb, or rgba)

Preview & zone borders#

Freecam editor preview and in-game Show Zone Borders drawing use preview in config:

lua
preview = {
    validColour = vec3(0, 255, 0),
    invalidColour = vec3(255, 0, 0),
    wallAlphaPreview = 50,
    lineAlphaPreview = 50,
    wallWidth = 0.3,
    maxDistance = 350.0,
    wallAlphaInGame = 15,
    lineAlphaInGame = 15,
},
OptionDefaultWhat it does
validColour / invalidColourgreen / redPolygon preview when points are valid vs crossing
wallAlphaPreview / lineAlphaPreview50Alpha while placing points in freecam
wallWidth0.3Wall thickness inward (meters)
maxDistance125.0Max distance (meters) to draw borders when Show Zone Borders is on
wallAlphaInGame / lineAlphaInGame15Alpha for borders drawn in the world

Borders only show when the zone has Show Zone Borders enabled and you are within preview.maxDistance.


Disarming players#

When Disable Firearms is on, the script calls disarmPlayer from config:

lua
disarmPlayer = function()
    local inventory = LT.Inventory.GetResource()
    if inventory == 'ox_inventory' then
        TriggerEvent('ox_inventory:disarm', PlayerId())
    else
        SetCurrentPedWeapon(cache.ped, `WEAPON_UNARMED`, true)
    end
end,

Extend this if you use another inventory — match the pattern in config/main.lua comments.


Freecam (editor)#

lua
freecam = {
    speed = 1.15,
    fov = 50.0,
    lookSens = 5.0,
    raycastDist = 500.0,
    thicknessStep = 1.0,
    thicknessMin = 1.0,
    thicknessMax = 100.0,
    baseZStep = 0.5,
},

Controls how the point-placement camera feels. Most servers can leave defaults; see Editor for in-game keys.


Per-zone settings (admin UI)#

Each zone stores its own rules. Whitelisted jobs (see below) skip restrictions for that zone.

Combat & weapons#

SettingEffect
Disable ShootingBlocks firing
Disable MeleeBlocks melee
Disable FirearmsDisarms via disarmPlayer
Disable Drive-ByNo drive-by shooting

Movement#

SettingEffect
Disable JumpingJump control disabled
Disable RunningWalk only

Player#

SettingEffect
Invincible PlayersPed cannot take damage
Ghost ModeLocal ghost, no collision with others
Heal On EnterFull health once on entry
Heal Over TimeFull health on interval (healIntervalMs)
Disable RagdollNo ragdoll
Disable Ped CollisionNo collision with other peds/vehicles nearby
Disable Idle CamIdle camera off
Quiet FootstepsReduced footstep volume
NotificationEnter/leave messages for this zone

Vehicles#

SettingEffect
Speed Limit (km/h)Caps vehicle speed in zone
Invincible VehiclesVehicles cannot be damaged
Lock Vehicle DoorsDoors locked while inside
Disable Vehicle CollisionVehicle-to-vehicle collision off

Whitelisted players driving their own vehicle are exempt from vehicle limits.

Map#

SettingEffect
Show Zone BordersPolygon outline in the world (within preview.maxDistance)
BlipOptional map blip (sprite, colour, scale, short range)

Job whitelist#

Enable Job Whitelist, add jobs with a minimum grade. Matching players are treated as whitelisted inside that zone — combat, movement, and vehicle rules do not apply to them (their own vehicle is also exempt from vehicle limits).

Job names must match your framework (police, ambulance, etc.).


Locales#

Set locale = 'en' (or another code). Edit strings in locales/*.json. UI labels for zone settings live under ui.settings in those files.