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:
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.
Last updated