Files

30 lines
857 B
Lua
Raw Permalink Normal View History

---@diagnostic disable: duplicate-set-field
2025-05-18 23:45:37 -04:00
if GetResourceState('tk_dispatch') == 'missing' then return end
2025-02-10 17:51:37 -05:00
Dispatch = Dispatch or {}
Dispatch.SendAlert = function(data)
2025-10-19 23:04:54 -04:00
local alertData = {
2025-02-10 17:51:37 -05:00
title = data.message,
code = data.code or '10-80',
priority = 'Priority 3',
coords = data.coords or GetEntityCoords(PlayerPedId()),
showLocation = true,
showGender = false,
playSound = true,
blip = {
color = data.blipData.color or 3,
sprite = data.blipData.sprite or 1,
scale = data.blipData.scale or 0.8,
},
jobs = data.jobs or {'police'},
2025-10-19 23:04:54 -04:00
}
exports.tk_dispatch:addCall(alertData)
end
2025-09-10 12:27:12 -04:00
---This will get the name of the in use resource.
---@return string
Dispatch.GetResourceName = function()
return 'tk_dispatch'
end
return Dispatch