Skip to content

ax.player.meta

Source: gamemode/modules/zones/meta/sh_player.lua

Get all physical zones the player is currently in.

Documented functions: 20

Functions


ax.player.meta:CanSeeZone(identifier)

Check if the player can see a specific zone (PVS/trace).

Realm: shared

Returns

  • boolean: True if player can see the zone

Usage

if client:CanSeeZone("Tower Overlook") then

ax.player.meta:DominantZoneHasFlag(flagName, flagValue)

Check if the player's dominant zone has a specific flag.

Realm: shared

Returns

  • boolean: True if dominant zone has the flag

Usage

if client:DominantZoneHasFlag("safe", true) then

ax.player.meta:GetCurrentZoneName()

Returns the player's most highest priority zone's name.

Realm: shared

Returns

  • string|nil: Zone name or nil

Usage

local zoneName = client:GetCurrentZoneName()

ax.player.meta:GetDistanceToZone(identifier)

Get distance to a specific zone's center/origin.

Realm: shared

Returns

  • number|nil: Distance or nil if zone not found

Usage

local dist = client:GetDistanceToZone("Safe Zone")

ax.player.meta:GetDominantZone()

Get the dominant zone for the player.

Realm: shared

Returns

  • table|nil: The dominant zone spec or nil

Usage

local zone = client:GetDominantZone()

ax.player.meta:GetDominantZoneData(key)

Get a specific data value from the player's dominant zone.

Realm: shared

Returns

  • any: The data value or nil

Usage

local music = client:GetDominantZoneData("music_track")

ax.player.meta:GetHighestPriorityZone()

Get the highest priority zone the player is in. This is the first zone returned by GetZones() since they're sorted by priority.

Realm: shared

Returns

  • table|nil: The highest priority zone or nil

Usage

local topZone = client:GetHighestPriorityZone()

ax.player.meta:GetVisibleZones()

Get all visible (PVS/trace) zones for the player.

Realm: shared

Returns

  • table: Array of zone specs with weight field

Usage

local visible = client:GetVisibleZones()

ax.player.meta:GetZoneBlend()

Get the full zone blend state for the player.

Realm: shared

Returns

  • table: Blend state with physical, visible, and dominant fields

Usage

local blend = client:GetZoneBlend()

ax.player.meta:GetZoneCount()

Get the number of zones the player is currently in.

Realm: shared

Returns

  • number: Number of zones

Usage

local count = client:GetZoneCount()

ax.player.meta:GetZoneData(key)

Get a specific data value from any zone the player is in (highest priority).

Realm: shared

Returns

  • any: The data value or nil

Usage

local spawn = client:GetZoneData("spawn_point")

ax.player.meta:GetZoneNames()

Get all zone names the player is currently in.

Realm: shared

Returns

  • table: Array of zone names

Usage

local names = client:GetZoneNames()

ax.player.meta:GetZones()

Get all physical zones the player is currently in.

Realm: shared

Returns

  • table: Array of zone specs, sorted by priority

Usage

local zones = client:GetZones()

ax.player.meta:GetZonesByType(zoneType)

Get all zones of a specific type the player is in.

Realm: shared

Returns

  • table: Array of zone specs

Usage

local boxes = client:GetZonesByType("box")

ax.player.meta:GetZonesWithFlag(flagName, flagValue)

Get all zones the player is in that have a specific flag.

Realm: shared

Returns

  • table: Array of zone specs

Usage

local pvpZones = client:GetZonesWithFlag("pvp", true)

ax.player.meta:GetZoneTracking()

Get the player's zone tracking state.

Realm: shared

Returns

  • table|nil: Tracking state or nil

Usage

local state = client:GetZoneTracking()

ax.player.meta:IsInMultipleZones()

Check if the player is in multiple zones.

Realm: shared

Returns

  • boolean: True if in more than one zone

Usage

if client:IsInMultipleZones() then

ax.player.meta:IsInZone(identifier)

Check if the player is in a specific zone.

Realm: shared

Returns

  • boolean: True if player is in the zone

Usage

if client:IsInZone("Safe Zone") then

ax.player.meta:IsInZoneType(zoneType)

Check if the player is in any zone of a specific type.

Realm: shared

Returns

  • boolean: True if in a zone of that type

Usage

if client:IsInZoneType("box") then

ax.player.meta:IsInZoneWithFlag(flagName, flagValue)

Check if the player is in a zone with a specific flag.

Realm: shared

Returns

  • boolean: True if in a zone with the flag

Usage

if client:IsInZoneWithFlag("pvp", true) then