ATY Scripts Logo
ATY Scripts/Docs/Zone Creator/Exports

Exports

Query zone state from your own resources. Resource name: aty_zonecreator.

Server exports

IsPlayerInZone(src, zoneId)boolean

Whether a player is currently inside a zone (server-tracked, not a client claim).

if exports['aty_zonecreator']:IsPlayerInZone(src, 'aty_tewwmg') then
    -- player is inside the lab
end

GetPlayersInZone(zoneId)table (list of server ids)

Everyone currently inside a zone.

for _, src in ipairs(exports['aty_zonecreator']:GetPlayersInZone(zoneId)) do
    TriggerClientEvent('my:effect', src)
end

GetTerritoryOwner(zoneId)string | nil

The gang that currently owns a territory zone (or nil).

local owner = exports['aty_zonecreator']:GetTerritoryOwner(zoneId)

IsRobberyZone(zoneId)boolean

Whether the zone has the Robbery economy flag enabled.

Client exports

IsInZone(zoneId)boolean

Whether the local player is inside the given zone.

if exports['aty_zonecreator']:IsInZone('aty_8x1bzq') then ... end

GetCurrentZones()table

The zones the local player is currently inside.

Restriction toggles

Drive the client-side restriction state directly (normally the zone does this for you — useful for custom integrations):

exports['aty_zonecreator']:SetPhoneRestricted(true)
exports['aty_zonecreator']:SetInventoryRestricted(true)
exports['aty_zonecreator']:SetVoiceRestricted(true)
`zoneId` is the zone's stable **Zone ID** (e.g. `aty_tewwmg`), shown in the panel's Preferences section — **not** the internal `id`.
ATY Scripts LogoATY SCRIPTS

Crafting highly optimized FiveM scripts for QBCore & ESX. Maximum performance, precision code, zero lag.

Join Community

Partner

Official partners with Tebex. Secure checkout and Cfx.re Keymaster integration.

Legal

Not affiliated with Rockstar Games, Cfx.re, FiveM, or Take-Two Interactive. Purchases bound by Tebex Terms of Service.

© 2026 ATY SCRIPTS. All rights reserved.