F5 StudioF5 Studio
Skip to main content

Zone Types

F5 Safezones supports two zone types: Circle and Polygon. Both types share common protection features but differ in how their boundaries are defined.

Circle Zones

Circle zones are defined by a center point and a radius. They are simpler to set up and slightly more performant than polygon zones.

Example

config.lua
{
name = "Legion Square",
type = "circle",
coords = vector3(195.17, -933.77, 29.7),
radius = 50.0,
minZ = -50,
maxZ = 150,
showBlip = true,
showMarker = true,
blipName = "Safe Zone - Legion Square",
enableInvincibility = true,
enableGhosting = true,
preventVehicleDamage = true,
disableVehicleWeapons = true,
collisionDisabled = false,
renderDistance = 50.0
}

Circle-Specific Fields

FieldTypeDefaultDescription
coordsvector3requiredCenter point of the circle zone
radiusnumber50.0Radius in game units (meters)

Polygon Zones

Polygon zones are defined by a set of 2D points forming an arbitrary shape. They support 3 or more points and can create complex boundaries.

Example

data/zones.json
{
"name": "Custom Area",
"type": "polygon",
"points": [
{"x": 236.45, "y": -1064.96},
{"x": 204.24, "y": -1049.54},
{"x": 213.88, "y": -1023.30},
{"x": 241.63, "y": -1033.44}
],
"minZ": 26.1,
"maxZ": 30.3,
"showBlip": true,
"showMarker": true,
"showZoneOutline": true,
"enableInvincibility": true,
"enableGhosting": true
}

Polygon-Specific Fields

FieldTypeDefaultDescription
pointsarrayrequiredArray of {x, y} coordinates forming the polygon (minimum 3 points)
showZoneOutlinebooleantrueDraw the polygon outline on the ground
outlineStrokeEnabledbooleantrueEnable stroke effect on outline
outlineSpacingnumber6Spacing between outline segments
outlineAlphanumber160Outline opacity (0-255)
outlineColorstring"#F5A623"Outline color in CSS hex
outlineRadiusnumber1.2Outline thickness
strokeColorstring"#FFFFFF"Stroke color in CSS hex
strokeAlphanumber220Stroke opacity (0-255)
strokeRadiusnumber1.5Stroke line thickness
addRoofbooleanfalseAdd a solid roof to the polygon zone
circleCoverageTypestring"full"Coverage type for circle blip approximation

Common Fields

These fields apply to both circle and polygon zones.

Zone Identity

FieldTypeDefaultDescription
namestringrequiredUnique zone name (3-50 characters)
typestringrequired"circle" or "polygon"

Height Bounds

FieldTypeDefaultDescription
minZnumbersee belowMinimum Z coordinate (height floor)
maxZnumbersee belowMaximum Z coordinate (height ceiling)
infiniteHeightbooleanfalseIgnore height bounds — zone extends infinitely vertically

Default values for minZ and maxZ depend on the zone type:

Zone TypeminZ DefaultmaxZ Default
Circlecoords.z - 50 (relative to center)coords.z + 150 (relative to center)
Polygon-200.0 (absolute)800.0 (absolute)
tip

For underground or multi-level safezones, adjust minZ and maxZ carefully. Use infiniteHeight = true if the zone should cover all vertical space.

Protection Options

FieldTypeDefaultDescription
enableInvincibilitybooleantrueMake players invincible inside the zone (legacy alias: enableImmortality)
enableGhostingbooleantrueEnable player/vehicle ghosting (no-clip through entities)
preventVehicleDamagebooleantruePrevent vehicle damage to players
disableVehicleWeaponsbooleantrueDisable vehicle-mounted weapons
collisionDisabledbooleanfalseEnable full ghost mode — player passes through all entities in range
caution

When collisionDisabled = true, the player passes through all nearby entities — vehicles, NPCs, and world objects within range. This is the most aggressive ghosting mode. Players still have weapon restrictions and invincibility (if enabled). See Collision System — Full Ghost Mode for details.

Marker & Rendering

FieldTypeDefaultDescription
showMarkerbooleanfalseDisplay the zone marker (must be explicitly set to true)
renderDistancenumber150.0Distance from zone center to start rendering the marker
markerPresetstringnilApply a named marker preset from Config.MarkerPresets (e.g., "safe", "danger", "special", "vip")
markerConfigtablenilPer-zone marker configuration (overrides defaults and preset)

You can use markerPreset to quickly apply a predefined style, or use markerConfig for full control. If both are set, the preset is applied first and then markerConfig values override it.

Using a preset
{
name = "Hospital",
type = "circle",
coords = vector3(300.0, -600.0, 43.0),
radius = 30.0,
markerPreset = "safe" -- Applies Config.MarkerPresets.safe
}

The markerConfig table accepts the same fields as Config.DefaultMarker:

Using custom config
markerConfig = {
type = 1,
color = {r = 0, g = 255, b = 0, a = 100},
pulsing = true,
pulseSpeed = 1.5,
height = 25.0
}

Blip Options

FieldTypeDefaultDescription
showBlipbooleanfalseShow a blip on the minimap/map (must be explicitly set to true)
showCenterBlipbooleantrueShow blip at zone center (polygon zones)
blipCoordsvector3autoCustom blip position for polygon zones. If not set, calculated from polygon centroid
blipNamestring"Safe Zone - {name}"Blip label on map
blipSpritenumber84GTA blip sprite ID
blipColorstring"0xF5A623FF"Blip color in hex RGBA
blipScalenumber0.8Blip size on map
blipAlphanumber180Blip opacity (0-255)
blipShortRangebooleanfalseOnly show blip when nearby
blipHighDetailbooleantrueShow high-detail blip
blipHiddenOnLegendbooleanfalseHide from map legend

Metadata (Custom Zones Only)

These fields are set automatically for zones created or edited through the admin panel:

FieldTypeDescription
createdBystringAdmin who created the zone
createdAtnumberUnix timestamp of creation
updatedBystringAdmin who last edited the zone (set on update)
updatedAtnumberUnix timestamp of last edit (set on update)
isCustombooleantrue for zones saved in data/zones.json
idnumberAuto-assigned unique zone ID

Zone Activation States

Each zone has an activation state that persists across server restarts. Activation states are stored in data/zone_states.json.

  • Active — Zone is fully functional with all protections enabled
  • Inactive — Zone exists but provides no protections; players pass through normally

Toggle zone activation through the Admin Panel or via server events.

See Also