> For the complete documentation index, see [llms.txt](https://docs.av-scripts.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.av-scripts.com/guides/house-robbery/dispatch.md).

# Dispatch

* In **client/editable/dispatch.lua you can add your own dispatch function, there's 3 different alerts based on what the player has triggered while inside the house:**
  * door: Triggered when the player fails to lockpick the entry, this will be randomly triggered when failing the minigame to avoid any spam.
  * alarm: Triggered when the player fails to hack the alarm.
  * noise: If the player makes enough noise, cops will receive a call from the neighbors.

```lua
function callCops(type,identifier)
    dbug('callCops(type)', type)
    local coords = GetEntityCoords(cache.ped)
    if type == "door" then
        -- Triggered when player fails to lockpick door

    end
    if type == "alarm" then
        -- Triggered when house alarm doesn't get hacked in time

    end
    if type == "noise" then
        -- Triggered when noise bar gets red color

    end
    -- Default dispatch notification and blip
    TriggerServerEvent('av_houserobbery:sendDispatch', coords, type, identifier or currentIdentifier)
end
```
