2025-06-07 22:50:13 -04:00
|
|
|
---@diagnostic disable: duplicate-set-field
|
2025-05-18 23:45:37 -04:00
|
|
|
if GetResourceState('bub-mdt') == 'missing' then return end
|
2025-02-05 20:43:44 -05:00
|
|
|
Dispatch = Dispatch or {}
|
|
|
|
|
|
|
|
|
|
Dispatch.SendAlert = function(data)
|
2025-07-28 01:37:52 -04:00
|
|
|
local ped = PlayerPedId()
|
2025-02-05 20:43:44 -05:00
|
|
|
local alertData = {
|
|
|
|
|
code = data.code or '10-80',
|
|
|
|
|
offense = data.message,
|
2025-07-28 01:37:52 -04:00
|
|
|
coords = data.coords or GetEntityCoords(ped),
|
2025-02-05 20:43:44 -05:00
|
|
|
info = { label = data.code or '10-80', icon = data.icon or 'fas fa-question' },
|
|
|
|
|
blip = data.blipData.sprite or 1,
|
|
|
|
|
isEmergency = data.priority == 1 and true or false,
|
2025-07-28 01:37:52 -04:00
|
|
|
blipCoords = data.coords or ped and GetEntityCoords(ped) or { x = 0, y = 0},
|
2025-02-05 20:43:44 -05:00
|
|
|
}
|
|
|
|
|
exports["bub-mdt"]:CustomAlert(alertData)
|
2025-05-10 00:01:56 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
return Dispatch
|