fix for compatibility in kartik-mdt

repack job table as it needs a boolean
This commit is contained in:
MrNewb committed 2025-07-19 01:47:53 -04:00
1 parent 4e15466814
commit 11a82194a9
1 file changed
+7 -2
@@ -3,12 +3,17 @@ if GetResourceState('kartik-mdt') == 'missing' then return end
Dispatch = Dispatch or {}
Dispatch.SendAlert = function(data)
local repackJobsBools = {}
for k, v in pairs(data.jobs) do
if v then
repackJobsBools[k] = true
end
end
local alertOptions = {
title = data.message or "Alert",
code = data.code or '10-80',
description = data.message,
type = "Alert",
-- sound = "gunshots",
coords = data.coords,
blip = {
radius = 100.0,
@@ -17,7 +22,7 @@ Dispatch.SendAlert = function(data)
scale = data.blipData.scale or 0.8,
length = 2
},
jobs = data.jobs or {"police"},
jobs = repackJobsBools,
}
exports['kartik-mdt']:CustomAlert(alertOptions)
end