> For the complete documentation index, see [llms.txt](https://docs.l2s.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.l2s.dev/assets-and-guides/police-hub/events-and-alerts.md).

# Events & Alerts

## Custom Alert

You can create your custom alert in your script by using this method&#x20;

```lua
    local pos = GetEntityCoords(PlayerPedId(),  true)
    local info = { -- Options here , you can add multi options
        {icon = 'globe-americas', text = exports['l2s-policehub']:GetStreetAndZone()},
    }
    local proirty = 1
    local code = '10-9' -- Alerts Code Here
    local title = 'Title Here'
    local icon = 'masks-theater'
    local coords = {x = pos.x, y = pos.y, z = pos.z}
    local time = 10000
    local sound = 3
    local amublance = false
    local police = true
    local blips = {
        Color = 1,
        Sprite = 487,
        Scale = 1.2,
    }
    TriggerServerEvent('l2s-policehub:server:sendalert', proirty ,code, title, info, coords, time, sound, police, amublance, blips
```

## Ready Alerts

<mark style="color:red;">Robberys</mark>&#x20;

```lua
TriggerEvent('dispatch:cayorobbery') 

TriggerEvent('dispatch:pacificRobbery') 

TriggerEvent('dispatch:unionRobbery')

TriggerEvent('dispatch:yachtrobbery') 

TriggerEvent('dispatch:artRobbery') 

TriggerEvent('dispatch:trainrobbery') 

TriggerEvent('dispatch:paletoRobbery') 

TriggerEvent('dispatch:truckRobbery')

TriggerEvent('dispatch:jewelryRobbery')

TriggerEvent('dispatch:bobcatRobbery') 

TriggerEvent('dispatch:fleecaRobbery') 

TriggerEvent('dispatch:houseRobbery') 

TriggerEvent('dispatch:storeRobbery') 

TriggerEvent('dispatch:gunshot')

TriggerEvent('dispatch:lockpick')

```

<mark style="color:red;">Emergency Officers</mark>

```lua
Police : 
TriggerEvent('dispatch:officerDown') -- Seek help if killed

TriggerEvent('dispatch:emergncy') -- Seek help for an emergency

TriggerEvent('dispatch:normaldown') -- Seek help if you die naturally

TriggerEvent('dispatch:w7dtn8l') -- Request assistance if you do not own a vehicle

EMS :

TriggerEvent('dispatch:emsDown') -- Request Ambulance for emergency situation

TriggerEvent('dispatch:emsN8L') -- Request assistance if you do not own a vehicle

```
