Skip to content

Air Raid Sirens

The air raid sirens provides you the ability to alert the nation with the press of a button. Configure multiple siren(s) (areas) and browse through the list before powering the sirens.

Air Raid Sirens is an emergency alert system that allows server administrators to trigger air raid sirens across specific areas or the entire map. Perfect for emergency situations, roleplay scenarios, or creating atmospheric events on your FiveM server.

  • ✅ Multi-source 3D spatial audio system - Realistic directional sound
  • ✅ Modern keybinding system - Customizable controls
  • ✅ Smooth fade-in/fade-out transitions - Professional audio experience
  • ✅ Real-time 3D audio with head-tracking - Immersive sound positioning
  • ✅ Per-area sound configuration - Individual area audio settings
  • ✅ Area-Based Control - Target specific areas or zones with additive activation
  • ✅ In-Game Siren Editor - Place, move, rename and delete sirens and areas from the control panel
  • ✅ Sirens Stored in sirens.json - The server reads and writes the file itself
  • ✅ Volume & Sound Configuration - Customize audio settings
  • ✅ Range Settings - Configure siren coverage area
  • ✅ Multiple Siren Sounds - Support for various siren sound files
  • ✅ Custom UI - User-friendly interface design
  • ✅ OneSync Compatible - Works with Legacy and Infinity
  • ✅ 3D Siren Objects - Custom air raid siren 3D models
  • ✅ Editable CSS - Customize the visual appearance
  • ✅ Multi-Framework Support - ESX/QBCore/Discord API permissions
  • ✅ Multi-Language Support - International server support
  • ✅ Advanced Export System - Comprehensive API for other resources
  • ✅ Escrow Protection - Secure resource protection
  • 📊 Performance: 0.00-0.02ms - Optimized for minimal impact

Follow our step-by-step installation guide:

Installation Tutorial

  • OneSync Legacy: Fully tested and compatible
  • OneSync Infinity: Fully tested and compatible
  • ESX: Full compatibility with ESX framework
  • QBCore: Full compatibility with QBCore framework
  • Discord API: Compatible with Discord API integration
  • Standalone: Works without any framework
  1. Access CFX Portal
    • Go to CFX Portal Assets
    • Find “Air Raid Sirens” in your granted assets
    • Download the ZIP package
  1. Extract the ZIP file

    • Unpack the downloaded ZIP package to a local folder
    • Ensure all files are properly extracted
  2. Transfer to Server

    • Set your FTP client to binary transfer mode
    • Upload the night_air_raid_sirens folder to your server’s resources directory
    • Maintain the original folder structure

Add the following line to your server.cfg file:

ensure night_air_raid_sirens
  1. Navigate to Config File

    • Open night_air_raid_sirens/config/config.lua
    • Review all configuration options
  2. Configure Settings

    • Set up volume and sound settings
    • Configure range and coverage areas
    • Adjust permissions and access controls
  • Area-Based Control: Target specific areas or zones for siren activation
  • Multiple Sirens: Configure various siren sound files
  • Range Control: Set coverage area for siren alerts
  • Volume Management: Adjust audio levels for different situations
  • 3D Objects: Custom air raid siren models in the world
  • Selective Activation: Choose which areas to activate or deactivate
  • Area Selection: Choose specific areas to activate sirens
  • Siren Selection: Browse through available siren sounds
  • Easy Activation: Simple button press to trigger sirens
  • Status Display: Visual indicators for active sirens and areas
  • Custom Styling: Editable CSS for UI customization
  • Instant Activation: Trigger sirens immediately when needed
  • Targeted Coverage: Alert specific areas or entire server population
  • Roleplay Integration: Perfect for emergency scenarios
  • Atmospheric Events: Create immersive server experiences
  • Selective Control: Activate or deactivate specific areas as needed
Command What it does Who can use it
/arsmenu Opens the control panel Players with permission
/togglears Mutes or unmutes the sirens for yourself, without affecting others Everyone
/drawcoverage Draws the sound reach of every placed siren, to test your coverage Players with permission
/arsreload Reads sirens.json again after you edited it by hand Players with editor permission

The command names are set under Controls in config/config.lua. No key is bound by default. Players bind their own keys in game under Settings → Key Bindings → FiveM, or you set a default with keyMapping:

Controls = {
ToggleSirens = {
command = "togglears",
keyMapping = '', -- Empty = no default key
input = 'keyboard'
},
OpenARSMenu = {
command = "arsmenu",
keyMapping = '',
input = 'keyboard'
},
},

These settings decide who may open the control panel and trigger sirens:

EveryoneHasPermission = true,
Enable_Night_DiscordApi_Permissions = false,
Enable_Ace_Permissions = false,
Enable_ESX_Permissions = false,
Enable_QBCore_Permissions = {
Check_By_Job = false,
Check_By_Permissions = false,
},
PermissionRoles = {
"Admin",
"police",
"Administrator",
},

Set EveryoneHasPermission to false, turn on the systems you use, and write your Discord role names, ESX jobs, ACE names or QBCore jobs and groups in PermissionRoles. A player needs one of them.

See ACE Permissions and Discord API for the setup of those two systems.

Players with editor permission see two tabs in the control panel: Control and Editor. In the Editor you manage areas and sirens in game. Every change is saved to sirens.json and reaches all players at once.

  • Create an area by typing its name, and delete an area.
  • Set an area’s name, sound, range, volume and whether it is enabled, then press Save area.
  • Place siren adds a siren where you aim. At my position adds one where you stand.
  • Per siren you can set a name and a sound of its own, move it to another area, move it to a new spot, teleport to it or delete it. The name is used for the siren’s map blip. A siren without a sound of its own plays the area’s sound.
  • A siren’s sound is saved when you pick it, and its name when you press Enter or leave the field.
  • Deleting asks for a second click.

Placing closes the panel and shows a see-through siren where you aim, up to 75 metres away. A small window shows the controls, the area and the heading. The panel opens again afterwards.

Control Action
Left mouse button Place
Mouse wheel Rotate
Shift + mouse wheel Rotate in steps of 1 degree
Right mouse button or Esc Cancel

Aim at the ground to place. Weapons and the pause menu are blocked while you place.

The editor has its own roles, so not everyone who may trigger sirens can change them. It uses the permission systems you turned on under Permissions.

Editor = {
EveryoneHasPermission = false,
PermissionRoles = {
"Manager",
"Admin",
"Administrator",
},
MaxNameLength = 50, -- Max characters for area and siren names
MaxSoundReach = 5000.0, -- Max sound reach (meters) that can be set in-game
MaxSoundVolume = 0.5, -- Max volume that can be set in-game
},

Areas and sirens are stored in sirens.json in the resource folder. The server reads and writes this file itself, so the resource folder must be writable by the server.

  • First start: when sirens.json does not exist, it is created from SirenObjectLocations in config/config.lua.
  • After that: sirens.json is the only source. Changes to SirenObjectLocations have no effect.
  • Start over: delete sirens.json to create it from SirenObjectLocations again. This discards the changes made in game.
{
"version": 1,
"areas": {
"Area Name": {
"soundFile": "air-raid-siren",
"soundReach": 1250.0,
"soundVolume": 0.1,
"enabled": true,
"poles": [
{ "name": "Town Hall", "soundFile": "luchtsirene", "x": 100.0, "y": 200.0, "z": 30.0, "heading": 0.0 },
{ "x": 150.0, "y": 250.0, "z": 30.0, "heading": 90.0 }
]
}
}
}

name and soundFile on a siren are optional.

  1. Put your .ogg file in NUI/sounds/.
  2. Add it to SirenSoundFileList in config/config.lua:
SirenSoundFileList = {
[1] = {SoundFile = "air-raid-siren", DisplayName = "Default Air Raid Sirens"},
[2] = {SoundFile = "luchtsirene", DisplayName = "Dutch Air Raid Sirens"},
[3] = {SoundFile = "your-sound", DisplayName = "Your Custom Siren"},
},

SoundFile is the file name without .ogg.

Setting What it does
SirenSoundVolume The siren volume, 0.10 by default. Above 0.5 is not recommended
AudioListener.Orientation "camera": left and right follow where you look. "character": they follow where your character faces
AudioListener.Position "character": distance is measured from your character. "camera": from the camera
OutOfRangeInterval How often, in seconds, the script checks whether you are in range of a siren

These exports maintain compatibility with older scripts and documentation:

-- Toggle sirens automatically (on when off, off when on)
exports['night_air_raid_sirens']:TriggerAirRaidSirens(soundFile, targetAreas, targetSirens)
-- Example usage
exports['night_air_raid_sirens']:TriggerAirRaidSirens("air-raid-siren")
-- Force sirens on or off
exports['night_air_raid_sirens']:ToggleAirRaidSirens(soundFile, onOrOff, targetAreas, targetSirens)
-- Example usage
exports['night_air_raid_sirens']:ToggleAirRaidSirens("air-raid-siren", true) -- Turn on
exports['night_air_raid_sirens']:ToggleAirRaidSirens("air-raid-siren", false) -- Turn off

Modern area-based control with better functionality:

-- Activate specific areas (additive - adds to existing active areas)
-- soundFile: a sound file name, or nil to let every area play its own sound
-- areaNames: the area names as they are in sirens.json
exports['night_air_raid_sirens']:TriggerAirRaidSirensByAreaExport(soundFile, areaNames)
-- Example usage
exports['night_air_raid_sirens']:TriggerAirRaidSirensByAreaExport("air-raid-siren", {"Fort Zancudo", "Grapeseed"})
-- Deactivate specific areas (subtractive - removes only specified areas)
exports['night_air_raid_sirens']:DeactivateAirRaidSirensByAreaExport(areaNames)
-- Example usage
exports['night_air_raid_sirens']:DeactivateAirRaidSirensByAreaExport({"Fort Zancudo"})
-- Turn off all sirens completely
exports['night_air_raid_sirens']:DeactivateAllAirRaidSirensExport()
-- Example usage
exports['night_air_raid_sirens']:DeactivateAllAirRaidSirensExport()
-- Returns array of all configured areas with their settings
local areas = exports['night_air_raid_sirens']:GetAvailableAreas()
-- Returns: table with {name, poleCount, soundFile, soundReach, soundVolume, enabled}
-- Returns configuration data for a specific area
local areaData = exports['night_air_raid_sirens']:GetSirensInArea(areaName)
-- Example usage
local areaData = exports['night_air_raid_sirens']:GetSirensInArea("Fort Zancudo")
-- Returns: table with {soundFile, soundReach, soundVolume, enabled, poleCount, poles, poleDetails}

Resolves which siren zone(s) cover a given world position. Designed for lightweight server-side polling from external resources, such as triggering zone-specific sirens based on a tornado or disaster location.

-- Returns the closest zone and all zones whose coverage radius includes the given position
local closestZone, zonesInRange, closestDistance = exports['night_air_raid_sirens']:GetZoneForCoords(x, y, z, maxDistance)
-- Parameters:
-- x, y, z (number) : world position to test
-- maxDistance (number) : optional cap on detection radius (defaults to each area's soundReach)
-- Returns:
-- closestZone (string) : area name with the nearest pole, regardless of distance
-- zonesInRange (table) : all area names where the position falls within coverage radius
-- closestDistance (number) : distance in metres to the nearest pole

Basic example — activate sirens for the zone a tornado is in:

-- Server-side, called from your storm/tornado resource
local tornadoCoords = GetTornadoPosition() -- your own function
local closestZone, zonesInRange = exports['night_air_raid_sirens']:GetZoneForCoords(
tornadoCoords.x, tornadoCoords.y, tornadoCoords.z
)
if #zonesInRange > 0 then
exports['night_air_raid_sirens']:TriggerAirRaidSirensByAreaExport("air-raid-siren", zonesInRange)
else
exports['night_air_raid_sirens']:DeactivateAllAirRaidSirensExport()
end

Polling example — update sirens as a tornado moves:

-- Server-side polling loop (run inside a Citizen.CreateThread)
Citizen.CreateThread(function()
while tornadoActive do
Citizen.Wait(5000) -- poll every 5 seconds
local coords = GetTornadoCurrentCoords()
local _, zonesInRange = exports['night_air_raid_sirens']:GetZoneForCoords(
coords.x, coords.y, coords.z
)
if zonesInRange and #zonesInRange > 0 then
exports['night_air_raid_sirens']:TriggerAirRaidSirensByAreaExport("air-raid-siren", zonesInRange)
else
exports['night_air_raid_sirens']:DeactivateAllAirRaidSirensExport()
end
end
end)

EditSirens does from another resource what the Siren Editor does in game: it creates, changes and deletes areas and sirens. The change is checked, saved to sirens.json and sent to all players at once. It is a server export and has no permission check, so the calling resource decides who may use it.

local ok, message, result = exports['night_air_raid_sirens']:EditSirens(action, payload)
-- ok (boolean) : true when the change was saved
-- message (string) : the text the in-game editor would show, also when ok is false
-- result (table) : what the action returns, see the table below
Action Payload Result
createArea { name, soundFile?, soundReach?, soundVolume?, enabled? } { area }
updateArea { area, name?, soundFile?, soundReach?, soundVolume?, enabled? } { area }
deleteArea { area }
addPole { area, x, y, z, heading?, name?, soundFile? } { id }
updatePole { id, area?, x?, y?, z?, heading?, name?, soundFile? } { id }
deletePole { id }

A field with ? is optional. In an update, only the fields you send are changed.

  • area is the area’s current name. In updateArea, name renames the area. In updatePole, area moves the siren to that area.
  • soundFile must be one of SirenSoundFileList in config/config.lua. On a siren, "" clears its own sound, so it plays the area’s sound again. name = "" clears a siren’s name.
  • soundReach is 1 to Editor.MaxSoundReach metres and soundVolume is 0 to Editor.MaxSoundVolume. A new area starts with the first sound of the list, a reach of 1250 metres and SirenSoundVolume.
  • Names are 1 to Editor.MaxNameLength characters.
  • Disabling an area that is sounding turns it off.
  • id is the siren’s number. Read it from poleDetails of Get Sirens in Area, or keep the one addPole returns. The numbers are given out again when the resource starts or /arsreload runs, so read them fresh before you use them.

When a value is refused or sirens.json cannot be written, nothing changes and ok is false.

-- Server-side: an area with one siren, moved later, then removed
local ok, message, result = exports['night_air_raid_sirens']:EditSirens("createArea", {
name = "Harbour", soundFile = "air-raid-siren", soundReach = 800.0,
})
if not ok then return print(message) end
local _, _, pole = exports['night_air_raid_sirens']:EditSirens("addPole", {
area = "Harbour", x = 1200.0, y = -3000.0, z = 6.0, heading = 90.0, name = "Dock 4",
})
exports['night_air_raid_sirens']:EditSirens("updatePole", { id = pole.id, x = 1210.0, y = -3010.0 })
exports['night_air_raid_sirens']:EditSirens("deleteArea", { area = "Harbour" })

poleDetails holds one entry per siren, in the same order as poles:

local areaData = exports['night_air_raid_sirens']:GetSirensInArea("Fort Zancudo")
for i, details in ipairs(areaData.poleDetails) do
-- details.id, details.name, details.soundFile; areaData.poles[i] is the position (vector4)
end

Default sound file names you can use:

  • "air-raid-siren"
  • "luchtsirene"

Default area names you can use:

  • "Fort Zancudo"
  • "Grapeseed"
  • "Sandy Shores"
  • "Paleto Bay"

The Air Raid Sirens includes limited editable CSS files allowing you to:

  • Customize UI appearance to match your server theme
  • Modify colors and styling for better visual integration
  • Custom siren models for visual representation
  • Placement options for strategic siren locations
  • ESX Integration: Compatible with ESX job systems and permissions
  • QBCore Integration: Compatible with QBCore permissions and groups
  • Discord API: Integrate with Discord role-based permissions
  • Standalone Operation: Works without any framework
  • Police Integration: Perfect for law enforcement scenarios
  • Emergency Services: Ideal for medical and fire department roleplay
  • Military Operations: Great for military and defense scenarios
  • Civil Defense: Excellent for disaster and emergency situations
Error Solution
“Resource not found” Check resource folder name and ensure line
“Sound file not found” Verify sound file exists in resource
“Permission denied” Check configuration permissions
“Export failed” Verify export function syntax
  • Start with default settings and adjust based on server needs
  • Test different sound files to find the best fit
  • Set appropriate permissions to prevent abuse
  • Configure range settings adjust to your desires
  • Establish protocols for when to use sirens
  • Train staff on proper siren activation
  • Coordinate with other emergency systems
  • Test sirens regularly to ensure functionality
  • Create emergency scenarios that utilize sirens
  • Integrate with police and emergency services
  • Use for atmospheric events and server announcements
  • Coordinate with other roleplay systems

If you’re having trouble with Air Raid Sirens:

  1. Review this documentation thoroughly
  2. Check server console for error messages
  3. Verify your configuration matches the examples
  4. Join our Discord for community support

Join our Discord community for:

  • Technical support
  • Configuration help
  • Best practices sharing
  • Community discussions

Nights Software Discord