L2S Documentation
DiscordTebex
  • Documentation
  • Information
    • Discord Roles
    • How to update your asset
    • FiveM Asset Escrow System
  • Coding Information
    • Webhook System
    • Register Key Mapping
    • Translation System
  • ASSETS & GUIDES
    • 🚨Dispatch
      • ⤵️Installation
      • ⚙️Configuration
        • Settings
        • API
        • Hub
        • CCTV
        • Dispatch
        • UI
      • 💻Integration
        • Exports
          • Client
          • Server
        • Police Alerts
        • Radio Channel
        • Duty System
    • 🏨Hotels V2
      • ⤵️Installation
      • ⚙️Configuration
        • Config
        • Elevators
        • Hotels
      • 💻Exports
    • 👮Police Hub
      • ⤵️Installation
      • ⚙️Configuration
      • 💻Events & Alerts
    • 💀Gangs Turf
      • ⤵️Installation
      • ⚙️Configuration
        • Settings
        • Gangs
      • 💻Exports
      • 📚Tutorial
    • 🔫Paint Ball
      • ⤵️Installation
      • ⚙️Configuration
        • Settings
        • Clothes
        • Locations
      • 💻Exports
Powered by GitBook
On this page
  • Custom Alert
  • Ready Alerts Functions
  • Panic Button
  • Store Robbery
  • House Robbery
  • Truck Robbery
  • Fleeca Robbery
  • Bobcat Robbery
  • Vangelico Robbery
  • Paleto Robbery
  • Pacific Robbery
  • Union Robbery
  • Vehicle Robbery
  1. ASSETS & GUIDES
  2. Dispatch
  3. Integration

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}, 
    },
})
TriggerEvent('l2s-dispatch:server:AddNotification', {
    departments = {'POLICE', 'EMS'}, 
    title = 'Alert Title Here',
    message = 'This is Test alert msg',
    coords = vec2(x, y),
    priority = 1,
    sound = 1, 
    reply = false, 
    anonymous = false, 
    street = 'Player Street here',
    blip = {
        sprite = 52, 
        colour = 1,
        scale = 1.0, 
        text = '10-15 - Custom Alert',
    },
    info = { 
        {icon = 'video', text = 'first'}, 
        {icon = 'person', text = 'secend'}, 
    },
})

Variable Name
Description

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

colour

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()

PreviousServerNextRadio Channel

Last updated 5 months ago

Icon ID for the blip.

Colour for the blip -

🚨
💻
Icon can be found here
Icon can be found here