Police Alerts
There are many ready-made functions that you can use directly, or you can create your own alert and link it with any theft script.
Custom Alert
local playerData = exports['l2s-dispatch']:GetPlayerData()
TriggerServerEvent('l2s-dispatch:server:AddNotification', {
departments = {'POLICE', 'EMS'},
title = 'Alert Title Here',
message = playerData.sex..' was testing new alert',
coords = vec2(playerData.coords.x, playerData.coords.y),
priority = 1,
sound = 1,
street = playerData.street,
reply = playerData.source,
anonymous = false,
blip = {
sprite = 52,
colour = 1,
scale = 1.0,
text = '10-15 - Custom Alert',
},
info = {
{icon = 'video', text = 'first'},
{icon = 'person', text = playerData.sex},
},
})
departments
List of departments or hubs that will receive the alert (e.g., 'POLICE', 'EMS'). You can add multiple hubs.
title
Title of the alert notification or police 10 codes.
message
Custom message for the alert, including any varibles.
coords
Coordinates of the alert, retrieved from the player's current position.
priority
Priority level of the alert (1 = High, 3 = Low).
sound
Sound level associated with the alert (1 to 3).
reply
The source of the player who initiated the alert if the report requires a response to the person (used in 911 reports) (optional).
anonymous
Boolean to determine if the alert is anonymous. If set to true
, no blip will be added (optional).
street
Player street name
blip
Table defining the blip details for the alert on the map (not added if anonymous = true). If you do not want to add blip, delete this blip array.
sprite
Icon ID for the blip. Icon can be found here
colour
Colour for the blip - Icon can be found here
scale
The size of the blip: 0.1-2.0
.
text
Text label associated with the blip (English).
info
Additional custom information, including icons and descriptive text only showing in Respond Calls logs.
Ready Alerts Functions
Panic Button
--- @param hub String - The hub of current Unit Like POLICE, EMS
exports['l2s-dispatch']:Panic(hub)
TriggerEvent('l2s-dispatch:client:PanicButton', hub) -- Client Event ...
Store Robbery
exports['l2s-dispatch']:StoreRobbery()
House Robbery
exports['l2s-dispatch']:HouseRobbery()
Truck Robbery
exports['l2s-dispatch']:TruckRobbery()
Fleeca Robbery
exports['l2s-dispatch']:FleecaRobbery()
Bobcat Robbery
exports['l2s-dispatch']:BobcatRobbery()
Vangelico Robbery
exports['l2s-dispatch']:VangelicoRobbery()
Paleto Robbery
exports['l2s-dispatch']:PaletoRobbery()
Pacific Robbery
exports['l2s-dispatch']:PacificRobbery()
Union Robbery
exports['l2s-dispatch']:UnionRobbery()
Vehicle Robbery
exports['l2s-dispatch']:VehicleBurglary()
Last updated