Skip to content

Alerts ​

Core Dispatch includes a library of pre-built alert types that can be triggered from any script. Alerts appear as calls on the dispatch board with appropriate codes, icons, and targeting.

How Alerts Work ​

When an alert fires:

  1. A call card appears on the dispatch board for the targeted job(s)
  2. An audio notification plays (different sound for priority/urgent calls)
  3. A map blip is created at the alert location (if enabled)
  4. Units can accept, respond to, or dismiss the call

Alerts support priority mode — urgent calls get a distinct animation and sound to draw attention.

Try It Out ​

Click the buttons to simulate dispatch calls. Right-click a call card for actions like Accept, Dismiss, or Remove. Click a card to expand it.

INTERACTIVE DEMO
John DoeL-42
Police Department
No active calls — use the buttons below to simulate alerts

Built-In Alert Types ​

These are ready-to-use alert functions exposed as server exports. Call them from any server script.

Law Enforcement Alerts ​

lua
-- Shots fired in area — Code 10-71
exports['core_dispatch']:sendShootingAlert(coords, gender)

-- Vehicle carjacking — Code 10-35
exports['core_dispatch']:sendCarjackAlert(vehicle, coords)

-- Vehicle theft from parking — Code 10-35
exports['core_dispatch']:sendCarTheftAlert(vehicle, coords)

-- Drug sale detected — Code 10-13
exports['core_dispatch']:sendDrugSellAlert(coords, gender)

-- Officer down — Code 10-99 (alerts ALL departments)
exports['core_dispatch']:sendOfficerDown(coords, gender)

Robbery Alerts ​

lua
-- Store robbery — Code 10-90
exports['core_dispatch']:sendStoreRobbery(coords, gender)

-- Bank robbery — Code 10-90
exports['core_dispatch']:sendBankRobbery(coords, gender)

-- House robbery — Code 10-90
exports['core_dispatch']:sendHouseRobbery(coords, gender)

EMS Alerts ​

lua
-- Injured person — Code 10-69 (targets EMS)
exports['core_dispatch']:sendInjuredPersonAlert(coords, gender)

Custom Alerts ​

For full control, use the sendAlert export with a data table:

lua
exports['core_dispatch']:sendAlert({
    code = '10-71',
    message = 'Shots fired near Legion Square',
    extraInfo = {
        { icon = 'fa-venus-mars', info = 'Male suspect' },
        { icon = 'fa-car', info = 'Red Sultan RS' },
    },
    coords = vector3(215.0, -810.0, 30.0),
    priority = true,              -- URGENT flag
    job = 'police',               -- string or table: {'police', 'ems'}
    time = 5000,                  -- Display duration (ms)
    blip = 156,                   -- Blip sprite ID
    color = 1,                    -- Blip color ID
})

Extra Info Icons ​

The extraInfo table supports Font Awesome icons to display additional details on the call card:

IconUse Case
fa-venus-marsSuspect gender
fa-carVehicle info
fa-userPerson description
fa-map-marker-altLocation detail
fa-gunWeapon type

You can use any Font Awesome icon class.

Multi-Job Targeting ​

Target multiple departments with a single alert by passing a table:

lua
exports['core_dispatch']:sendAlert({
    code = '10-99',
    message = 'Officer down — all units respond',
    coords = coords,
    priority = true,
    job = { 'police', 'ambulance' },  -- Both departments receive the call
})

Automatic Alerts ​

Some alerts fire automatically based on player actions — no scripting needed:

AlertTriggerConfig Toggle
ShootingPlayer fires weapon in a configured zoneEnableShootingAlerts
CarjackingPlayer steals vehicle from NPCEnableCarJackingAlert
Car TheftPlayer steals parked vehicle with alarmEnableCarTheftAlert

These can be fine-tuned with NPC witness requirements, probability chances, weapon/job whitelists, and zone definitions. See the Configuration page for details.