For the complete documentation index, see llms.txt. This page is also available as Markdown.

Exports/Events

Client exports, net events, and state bags for integrations.

All exports are client-side.


Client exports

IsInSafezone

Returns whether the local player is inside any active safezone session.

local inside = exports['0r-safezonecreator']:IsInSafezone()

Returns

Type
Description

boolean

true if inside a zone


GetCurrentZoneId

Returns the id of the zone the player is currently in.

local zoneId = exports['0r-safezonecreator']:GetCurrentZoneId()
-- nil when not in a zone

Returns

Type
Description

string | nil

Zone id (e.g. safezone_hospital)


IsWhitelistedInCurrentZone

Returns whether the local player is job-whitelisted in the zone they are standing in.

Returns

Type
Description

boolean

true if whitelisted for the current zone


Client events

Register these on the client when you need hooks (menus, logging, custom UI):

Event
Arguments
When

0r-safezonecreator:client:zoneEntered

zoneId, zoneData

Player enters a zone

0r-safezonecreator:client:zoneLeft

zoneId, zoneData

Player leaves a zone

Example:

zoneData is the full zone table from data/zones.json (points, general settings, blip, job whitelist, etc.).


State bag

The script sets a player state bag while inside a zone:

Bag
Values

currentSafezone

Zone id string while inside; cleared on exit

Other resources can read LocalPlayer.state.currentSafezone on the client.

Last updated