Skip to content

SafeZone ​

Description ​

SafeZone protects players and vehicles in configured areas and restricts actions such as firing, melee attacks and restraining players. Protection can continue for a set time after a player leaves the zone. Servers can show the zones through Map.

Configuration ​

Default configuration ​

SafeZone.json
json
{
    "m_Enable": 0,
    "m_Logging": 1,
    "m_ShowOnMap": 1,
    "m_TimeDelay": 10,
    "m_Zones": [
        {
            "m_Name": "Safe Zone",
            "m_Icon": "shield",
            "m_Color": {
                "m_A": 255,
                "m_R": 0,
                "m_G": 255,
                "m_B": 0
            },
            "m_Positions": [
                {
                    "m_X": 8228.21,
                    "m_Y": 519.3,
                    "m_Z": 9033.19,
                    "m_R": 300.0
                },
                {
                    "m_X": 8093.45,
                    "m_Y": 508.8,
                    "m_Z": 9330.63,
                    "m_R": 300.0
                }
            ],
            "m_IsActive": 1,
            "m_3DMarker": 1
        }
    ],
    "m_Messages": {
        "m_Enter": "You just entered a safe zone.",
        "m_Time": "You are leaving the zone in %TimeSeconds% seconds.",
        "m_Exit": "You just left a safe zone."
    },
    "m_NotificationTime": 10,
    "m_NotificationInChat": 0,
    "m_DisableExitCountdownNotifications": 0
}

Options ​

OptionTypeDescription
m_EnableboolWith 1, enables the module. With 0, disables it.
m_LoggingboolWith 1, logs player entries and exits. With 0, skips those records.
m_NotificationInChatboolWith 1, sends zone messages through Chat. With 0, shows notifications.
m_NotificationTimeintDisplay time in seconds for zone notifications.
m_TimeDelayintSeconds of protection after leaving. With 0, protection ends immediately.
m_DisableExitCountdownNotificationsboolWith 1, hides countdown updates while keeping protection. With 0, shows them.
m_ShowOnMapboolWith 1, sends zones to Map. With 0, omits them.
m_MessagesobjectZone messages.
m_Zonesarray<object>Configured zones.

m_Messages ​

OptionTypeDescription
m_EnterstringMessage on entry.
m_ExitstringMessage when protection ends.
m_TimestringCountdown message supporting %TimeSeconds%.

m_Zones[] ​

OptionTypeDescription
m_NamestringName used on the map.
m_IsActiveboolWith 1, enables protection for this zone. With 0, excludes it from protection checks.
m_IconstringMap icon name.
m_3DMarkerboolWith 1, requests a 3D map marker. With 0, omits the 3D marker.
m_ColorobjectMap marker color.
m_Positionsarray<object>Centers and radii covered by the zone.

m_Zones[].m_Color ​

OptionTypeDescription
m_AintOpacity channel, from 0 to 255.
m_RintRed channel, from 0 to 255.
m_GintGreen channel, from 0 to 255.
m_BintBlue channel, from 0 to 255.

m_Zones[].m_Positions[] ​

OptionTypeDescription
m_XfloatWorld X coordinate in metres.
m_YfloatElevation in metres.
m_ZfloatWorld Z coordinate in metres.
m_RfloatRadius in metres.

Released under the MIT License.