Files
community_bridge/modules/dispatch/bub-mdt/client/client.lua
T
MrNewb c71a261115 chore(intellisense): improve parameter annotations and add missing comments
Touched up incorrect or missing Intellisense parameter annotations across several functions. Added some missing descriptions to improve editor support. Still more to do, but this is a small step forward for overall developer workflow. Also small fix in picklexp
2025-06-07 22:50:13 -04:00

18 lines
679 B
Lua

---@diagnostic disable: duplicate-set-field
if GetResourceState('bub-mdt') == 'missing' then return end
Dispatch = Dispatch or {}
Dispatch.SendAlert = function(data)
local alertData = {
code = data.code or '10-80',
offense = data.message,
coords = data.coords or GetEntityCoords(cache.ped),
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,
blipCoords = data.coords or cache.ped and GetEntityCoords(cache.ped) or { x = 0, y = 0},
}
exports["bub-mdt"]:CustomAlert(alertData)
end
return Dispatch