> For the complete documentation index, see [llms.txt](https://docs.0resmon.org/0resmon/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.0resmon.org/0resmon/0resmon-1/s4-resources/s4-flipper-hack-tool/custom-dispatches.md).

# Custom Dispatches

### Integrating with a Different Dispatch System

If you are using a **different dispatch system** instead of the default one, you need to modify the template actions.

> **Answer:**\
> You should check **line 778** in the `templates.lua` file.\
> There is an example of how to integrate with a dispatch system.\
> You can adapt it to your own system as shown below:

```lua
Templates.Action["Fake Gunshot decoy"] = function()
    if GetResourceState("kibra-dispatch") == "started" then
        exports["kibra-dispatch"]:SendAlert("Gunshot", "10-60", "fa-vehicle", {"police"}, 3)
    end
end

Templates.Action["Fake EMS decoy"] = function()
    if GetResourceState("kibra-dispatch") == "started" then
        exports["kibra-dispatch"]:SendAlert("Injured civilian", "10-60", "fa-vehicle", {"ambulance"}, 3)
    end
end
```

📌 **Tip:** Replace `kibra-dispatch` with the name of your own dispatch resource, and adjust the `SendAlert` parameters to match your API.

***

### Notes

* Always restart the resource after making changes in `templates.lua`.
* Ensure your dispatch script is running (`started`) before triggering these events.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.0resmon.org/0resmon/0resmon-1/s4-resources/s4-flipper-hack-tool/custom-dispatches.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
