ax.zones¶
Get the client's zone tracking state.
Documented functions: 22 · Realm: client, server, shared
Functions¶
ax.zones:GetClientTracking()ax.zones:AtPos(pos)ax.zones:BlendFor(ent)ax.zones:GetDominant(ent)ax.zones:VisibleZones(ent)ax.zones:Add(spec)ax.zones:Clear()ax.zones:Get(identifier)ax.zones:GetAll()ax.zones:GetType(typeName)ax.zones:RegisterType(typeName, impl)ax.zones:Remove(identifier)ax.zones:Update(identifier, patch)ax.zones:ValidateSpec(spec)ax.zones:Sync()ax.zones:SyncToPlayer(client)ax.zones:Load()ax.zones:LoadStatic(zoneList)ax.zones:Save()ax.zones:GetTracking(ent)ax.zones:TrackEntity(ent)ax.zones:UntrackEntity(ent)
ax.zones:GetClientTracking()¶
Get the client's zone tracking state.
Realm: client
Returns
table: Tracking state with physical, visible, and dominant fields
Source: gamemode/modules/zones/libraries/cl_tracking.lua:50
ax.zones:AtPos(pos)¶
Get all physical zones that contain a position.
Realm: shared
Returns
table: Array of zone specs, sorted by priority (desc) then id (asc)
Source: gamemode/modules/zones/libraries/sh_evaluation.lua:20
ax.zones:BlendFor(ent)¶
Compute zone blend for an entity.
Returns physical zones, visible zones, and the dominant zone.
Realm: shared
Returns
table: Result with fields: physical (array), visible (array), dominant (zone|nil)
Source: gamemode/modules/zones/libraries/sh_evaluation.lua:95
ax.zones:GetDominant(ent)¶
Get the dominant zone for an entity (convenience method).
Realm: shared
Returns
table|nil: The dominant zone or nil
Source: gamemode/modules/zones/libraries/sh_evaluation.lua:127
ax.zones:VisibleZones(ent)¶
Get all PVS and trace zones visible to an entity.
Realm: shared
Returns
table: Array of zone specs with weight field, sorted by priority desc
Source: gamemode/modules/zones/libraries/sh_evaluation.lua:52
ax.zones:Add(spec)¶
Add a new zone to the registry.
Realm: server
Returns
number|nil: id The assigned zone ID, or nil on failurestring|nil: error Error message if addition failed
Source: gamemode/modules/zones/libraries/sh_zones.lua:82
ax.zones:Clear()¶
Clear all zones (runtime only).
Realm: server
Source: gamemode/modules/zones/libraries/sh_zones.lua:233
ax.zones:Get(identifier)¶
Get a zone by ID or name.
Realm: shared
Returns
table|nil: The zone spec or nil if not found
Source: gamemode/modules/zones/libraries/sh_zones.lua:197
ax.zones:GetAll()¶
Get all zones.
Realm: shared
Returns
table: Table of zone IDs mapped to zone specs
Source: gamemode/modules/zones/libraries/sh_zones.lua:227
ax.zones:GetType(typeName)¶
Get a registered zone type implementation.
Realm: shared
Returns
table|nil: The type implementation or nil if not found
Source: gamemode/modules/zones/libraries/sh_zones.lua:40
ax.zones:RegisterType(typeName, impl)¶
Register a zone type with validation and containment logic.
Realm: shared
Usage
ax.zones:RegisterType("box", { Validate = function(spec) ... end, Contains = function(spec, pos) ... end })
Source: gamemode/modules/zones/libraries/sh_zones.lua:26
ax.zones:Remove(identifier)¶
Remove a zone from the registry.
Realm: server
Returns
boolean: success Whether the removal succeeded
Source: gamemode/modules/zones/libraries/sh_zones.lua:172
ax.zones:Update(identifier, patch)¶
Update an existing zone.
Realm: server
Returns
boolean: success Whether the update succeeded
Source: gamemode/modules/zones/libraries/sh_zones.lua:135
ax.zones:ValidateSpec(spec)¶
Validate a zone spec against its type implementation.
Realm: shared
Returns
boolean: success Whether validation passedstring|nil: error Error message if validation failed
Source: gamemode/modules/zones/libraries/sh_zones.lua:49
ax.zones:Sync()¶
Synchronize zones to all clients.
Realm: server
Source: gamemode/modules/zones/libraries/sv_networking.lua:52
ax.zones:SyncToPlayer(client)¶
Synchronize zones to a specific player.
Realm: server
Source: gamemode/modules/zones/libraries/sv_networking.lua:62
ax.zones:Load()¶
Load zones from disk for the current map.
Realm: server
Source: gamemode/modules/zones/libraries/sv_persistence.lua:18
ax.zones:LoadStatic(zoneList)¶
Load static zones from a list (not persisted).
Realm: server
Source: gamemode/modules/zones/libraries/sv_persistence.lua:81
ax.zones:Save()¶
Save runtime zones to disk for the current map.
Realm: server
Source: gamemode/modules/zones/libraries/sv_persistence.lua:55
ax.zones:GetTracking(ent)¶
Get tracking state for an entity.
Realm: server
Returns
table|nil: Tracking state or nil
Source: gamemode/modules/zones/libraries/sv_tracking.lua:75
ax.zones:TrackEntity(ent)¶
Start tracking an entity for zone events.
Realm: server
Source: gamemode/modules/zones/libraries/sv_tracking.lua:38
ax.zones:UntrackEntity(ent)¶
Stop tracking an entity.
Realm: server
Source: gamemode/modules/zones/libraries/sv_tracking.lua:62