Safezone Enter / Exit Events

This section documents the Safezone enter and exit events, allowing developers to detect when a player enters or leaves a safezone. These events can be used to trigger custom logic such as enabling or disabling combat, restricting interactions, applying effects, or integrating safezones with other scripts in a clean and flexible way.


chevron-rightsafezone:enteredZonehashtag

The safezone:enteredZone event is triggered when a player enters a safezone. It allows other scripts to react instantly to the player entering a protected area.


How to Use

AddEventHandler('safezone:enteredZone', function(zone)
    print('[SAFEZONE] Entered zone:', zone)
end)

This provides the zone data so you can apply custom logic such as disabling combat, weapons, or specific actions.

chevron-rightsafezone:leftZonehashtag

The safezone:leftZone event is triggered when a player leaves a safezone. It is useful for restoring normal gameplay behavior once the player exits the protected area.


How to Use

AddEventHandler('safezone:leftZone', function(zone)
    print('[SAFEZONE] Left zone:', zone)
end)

This provides the zone data so you can re-enable combat, weapons, or any mechanics previously restricted inside the safezone.