Add wasabi_mdt dispatch integration

Introduces client and server modules for dispatch integration with the wasabi_mdt resource. Provides functions to send alerts and retrieve the resource name, enabling compatibility with the wasabi_mdt dispatch system.
This commit is contained in:
MrNewb committed 2025-09-11 17:34:54 -04:00
1 parent 3dfbaa8573
commit 41c90f9082
2 files changed
+33

No files matched your search

@@ -0,0 +1,23 @@
---@diagnostic disable: duplicate-set-field
if GetResourceState('wasabi_mdt') == 'missing' then return end
Dispatch = Dispatch or {}
Dispatch.SendAlert = function(data)
local fallbackCoords = GetEntityCoords(PlayerPedId())
local alertData = {
type = data.code or '10-80',
title = data.code or '10-80',
description = data.message or "No message provided",
location = {data.coords.x, data.coords.y, data.coords.z} or {fallbackCoords.x, fallbackCoords.y, fallbackCoords.z},
coords = {data.coords.x, data.coords.y, data.coords.z} or {fallbackCoords.x, fallbackCoords.y, fallbackCoords.z},
}
exports.wasabi_mdt:CreateDispatch(alertData)
end
---This will get the name of the in use resource.
---@return string
Dispatch.GetResourceName = function()
return 'wasabi_mdt'
end
return Dispatch
@@ -0,0 +1,10 @@
if GetResourceState('wasabi_mdt') == 'missing' then return end
Dispatch = Dispatch or {}
---This will get the name of the in use resource.
---@return string
Dispatch.GetResourceName = function()
return 'wasabi_mdt'
end
return Dispatch