disableAlerts
π¨ Disable Alerts
Description
Temporarily disables or re-enables dispatch alerts for the player. Useful when entering specific zones (e.g., police stations, garages, safe zones) where dispatch notifications should not be triggered.
β
Usage
-- Disable alerts
disableAlerts(true)
-- Enable alerts again
disableAlerts(false)
π Parameters
Parameter
Type
Description
disable
boolean
true
= Disable dispatch alerts (entering a no-dispatch zone). false
= Enable alerts again (leaving the zone).
π‘ Example
Disable alerts while inside a no-dispatch zone:
AddEventHandler("onPlayerEnterZone", function(zoneName)
if zoneName == "police_station" then
disableAlerts(true)
end
end)
AddEventHandler("onPlayerExitZone", function(zoneName)
if zoneName == "police_station" then
disableAlerts(false)
end
end)
Last updated