PoliceDispatch

The SD.Dispatch function sends a police alert.

Overview

Purpose: Dynamically sends police dispatch alerts based on the currently active dispatch system within the server.

Resource List

  • linden_outlawalert

  • cd_dispatch

  • ps-dispatch

  • qs-dispatch

  • core_dispatch

  • custom (placeholder for user-implemented systems)

Parameters

  • data (table): A table containing the information necessary for the dispatch alert, such as the title, message, and other details specific to the dispatch type.

Usage Example

-- Police Alert for Bobcat Heist (Used Dispatch System can be changed in sd_lib/sh_config.lua)
policeAlert = function()
    SD.PoliceDispatch({
        displayCode = "10-31B",                          -- Emergency, all units stand by
        title = 'Bobcat Weapons Heist',                 -- Title is used in cd_dispatch/ps-dispatch
        description = "Weapons depot heist in progress",-- Description of the heist
        message = "Suspects reported at the Bobcat Security weapons depot", -- Additional message
        -- Blip information is used for ALL dispatches besides ps_dispatch, please reference dispatchcodename below.
        sprite = 313,                                  -- The blip sprite for weapons depot or related icon
        scale = 1.0,                                   -- The size of the blip
        colour = 2,                                    -- Color of the blip
        blipText = "Bobcat Heist",                      -- Text on the Blip
        -- ps-dispatch
        dispatchcodename = "bobcat_heist"               -- This is the name used by ps-dispatch users for the sv_dispatchcodes.lua or config.lua under the Config.Blips entry. (Depending on Version)
    })
end -- This is the function that is called when the police are alerted.

Last updated