Configuration
Check the instructions below.
Zone Settings
Define multiple safe zones with unique properties under the Zones
table.
Zone Example:
coords
Center coordinates of the safe zone.
vector3(x, y, z)
radius
Radius of the zone in meters.
70.0
blipOptions.active
Enable or disable map blip for the zone.
true
or false
blipOptions.color
Color of the map blip.
2
blipOptions.scale
Scale of the map blip.
1.0
blipOptions.name
Name displayed on the map blip.
"Safezone"
options.mergePlayers
Enable player merging to avoid collisions.
true
options.mergeVehicles
Enable vehicle merging.
true
options.disableShooting
Disable shooting in the zone.
true
options.disableMelee
Disable melee attacks in the zone.
true
Localization
Edit the Locales
table to customize messages displayed when entering or leaving a safe zone.
entered_zone
"~g~Entraste na Safezone."
Message shown when entering a safe zone.
left_zone
"~r~Saiste da Safezone."
Message shown when leaving a safe zone.
API Reference
The script provides several client and server-side exports for easy integration into other scripts.
Client-Side Exports
GetClosestZone()
Returns the closest safe zone to the player (useful for respawn systems).
Zone key (string)
GetCurrentZone()
Returns the key of the zone the player is currently in. Returns false
if not in a zone.
Zone key (string) or false
InSafeZone()
Checks if the player is in a safe zone.
true
or false
Server-Side Exports
GetPlayersInZone(zoneKey)
Returns an array of player resources currently in the specified zone.
[player1, player2, ...]
GetPlayerZone(source)
Returns the current zone of a player. Returns nil
if the player is not in a zone.
Zone key (string) or nil
InSafeZone(source)
Checks if a specific player is in a safe zone.
true
or false
Last updated