Events
These events are always emitted by the resource — no zone configuration needed. Listen for them in your own scripts with AddEventHandler.
For configurable trigger events (On Enter/Exit/While-Inside/On Death/…) see Trigger & State Hooks.
Server events
aty_zonecreator:zoneEntered (src, zoneId, label)
A player entered any zone.
AddEventHandler('aty_zonecreator:zoneEntered', function(src, zoneId, label)
print(('%s entered %s'):format(GetPlayerName(src), label))
end)
aty_zonecreator:zoneExited (src, zoneId, label)
A player left any zone.
aty_zonecreator:robberyZoneEntered (src, zoneId, copsOnline)
Fires when a player enters a zone with the Robbery flag. copsOnline = number of on-duty police (from Config.PoliceJobs). It does not start a robbery — it's a signal for your robbery script.
AddEventHandler('aty_zonecreator:robberyZoneEntered', function(src, zoneId, cops)
if cops >= 2 then exports['my-robbery']:Begin(src, zoneId) end
end)
aty_zonecreator:adminBanRequested (src, targetId)
An admin pressed Ban in the panel. Wire your own permanent-ban system here (the resource itself only kicks + logs).
AddEventHandler('aty_zonecreator:adminBanRequested', function(src, targetId)
exports['my-bans']:BanPlayer(targetId, 'Zone Creator', src)
end)
Client events
aty_zonecreator:client:enteredZone (zoneId, label)
Local player entered a zone. Great for a custom HUD label.
aty_zonecreator:client:leftZone (zoneId, label)
Local player left a zone.
aty_zonecreator:client:phoneRestricted (locked)
The phone was restricted/unrestricted by a zone. (Alternatively use Config.Integrations.onPhoneLock.)
AddEventHandler('aty_zonecreator:client:phoneRestricted', function(locked)
exports['lb-phone']:SetDisabled(locked)
end)