RX Scripts Logo
Hazard Zones

Events

All client- & serversided events included within this script. Events serve as listeners that capture and respond to actions executed by this script.
If additional events are required for your implementation, please submit a formal request through our ticketing system on the official Discord server.

Server Events

hazardzones:onZoneEnter

Triggered when a player enters a hazard zone.

RegisterNetEvent('hazardzones:onZoneEnter', function(playerId, zoneName, zoneType) end)
playerId
number

Server ID of the player who entered the zone.

zoneName
string

Name of the hazard zone entered.

zoneType
string

Type of the hazard zone (e.g., 'radiation').

hazardzones:onZoneExit

Triggered when a player exits a hazard zone.

RegisterNetEvent('hazardzones:onZoneExit', function(playerId, zoneName, zoneType, currentExposure) end)
playerId
number

Server ID of the player who exited the zone.

zoneName
string

Name of the hazard zone exited.

zoneType
string

Type of the hazard zone (e.g., 'radiation').

currentExposure
number

The player's exposure level when exiting the zone.

hazardzones:onBlockerItemUsed

Triggered when a player uses a blocker item (e.g., radiation pills).

RegisterNetEvent('hazardzones:onBlockerItemUsed', function(playerId, item, blocker) end)
playerId
number

Server ID of the player who used the blocker item.

item
string

Item name of the blocker used.

blocker
table

Blocker configuration data containing type, duration, exposure, and damage properties.

hazardzones:onZoneToggled

Triggered when an admin toggles a zone on/off via command or export.

RegisterNetEvent('hazardzones:onZoneToggled', function(playerId, zoneName, active) end)
playerId
number

Server ID of the player who toggled the zone.

zoneName
string

Name of the hazard zone toggled.

active
boolean

true if the zone was enabled, false if disabled.

hazardzones:onOutfitItemUsed

Triggered when a player uses an outfit item (e.g., hazmat suit).

RegisterNetEvent('hazardzones:onOutfitItemUsed', function(playerId, itemName) end)
playerId
number

Server ID of the player who used the outfit item.

itemName
string

Item name used to equip/unequip the outfit (e.g., 'hazmat_suit').

Client Events

hazardzones:onZoneEnter

Triggered when the local player enters a hazard zone.

AddEventHandler('hazardzones:onZoneEnter', function(zoneName, zoneType) end)
zoneName
string

Name of the hazard zone entered.

zoneType
string

Type of the hazard zone (e.g., 'radiation').

hazardzones:onZoneExit

Triggered when the local player exits a hazard zone.

AddEventHandler('hazardzones:onZoneExit', function(zoneName, zoneType, currentExposure) end)
zoneName
string

Name of the hazard zone exited.

zoneType
string

Type of the hazard zone (e.g., 'radiation').

currentExposure
number

The player's exposure level when exiting the zone.