2025-06-07 22:50:13 -04:00
|
|
|
---@diagnostic disable: duplicate-set-field
|
2025-05-18 23:45:37 -04:00
|
|
|
if GetResourceState('cd_dispatch') == 'missing' then return end
|
2025-02-10 17:51:37 -05:00
|
|
|
Dispatch = Dispatch or {}
|
|
|
|
|
|
|
|
|
|
Dispatch.SendAlert = function(data)
|
|
|
|
|
local plyrData = exports['cd_dispatch']:GetPlayerInfo()
|
|
|
|
|
TriggerServerEvent('cd_dispatch:AddNotification', {
|
|
|
|
|
job_table = data.jobs,
|
|
|
|
|
coords = data.coords,
|
|
|
|
|
title = data.message,
|
|
|
|
|
message = data.message,
|
|
|
|
|
flash = 0,
|
|
|
|
|
unique_id = plyrData.unique_id,
|
|
|
|
|
sound = 1,
|
|
|
|
|
blip = {
|
|
|
|
|
sprite = data.blipData.sprite,
|
|
|
|
|
scale = data.blipData.scale,
|
|
|
|
|
colour = data.blipData.color,
|
|
|
|
|
flashes = false,
|
|
|
|
|
text = data.message,
|
|
|
|
|
time = (data.time / 1000),
|
|
|
|
|
radius = 0,
|
|
|
|
|
}
|
|
|
|
|
})
|
2025-05-10 00:01:56 -04:00
|
|
|
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 'cd_dispatch'
|
|
|
|
|
end
|
|
|
|
|
|
2025-05-10 00:01:56 -04:00
|
|
|
return Dispatch
|