Fix blips

This commit is contained in:
Luke authored and GitHub committed 2026-04-19 17:10:57 +01:00
1 parent 5cc8a0cd68
commit b8642cea23
1 file changed
+9 -5
@@ -21,7 +21,7 @@ Dispatch.SendAlert = function(data)
if type(data.job) == "string" then if type(data.job) == "string" then
data.job = {data.job} data.job = {data.job}
end end
local coords = data.coords or nil local coords = data.coords or GetEntityCoords(GetPlayerPed(data.source))
local alertData = { local alertData = {
source = data.source, source = data.source,
title = data.title or "No message provided", title = data.title or "No message provided",
@@ -31,11 +31,15 @@ Dispatch.SendAlert = function(data)
priority = data.priority or 2, priority = data.priority or 2,
metadata = metadata, metadata = metadata,
blip = { blip = {
radius = data.blip and data.blip.radius or 0, title = data.title or "No message provided",
coords = coords,
radius = data.blip and data.blip.radius or nil,
sprite = data.blip and data.blip.sprite or 161, sprite = data.blip and data.blip.sprite or 161,
color = data.blip and data.blip.color or 84, color = data.blip and data.blip.color or 1,
scale = data.blip and data.blip.scale or 1.0, scale = data.blip and data.blip.scale or 1.2,
time = data.time and (data.time / 1000) or nil, flashes = data.blip.flash or false,
time = data.time or (6 * 60000),
category = data.category or nil,
}, },
} }
exports.fd_dispatch:addAlert(alertData) exports.fd_dispatch:addAlert(alertData)