fix location returning hash instead of string

This commit is contained in:
Luke20201 committed 2025-09-28 18:11:14 +01:00
1 parent c0e5241d40
commit ab414b2b48
1 file changed
+2 -1
@@ -13,11 +13,12 @@ Dispatch.SendAlert = function(data)
color = data.colorHex or nil color = data.colorHex or nil
}) })
end end
local coords = data.coords or GetEntityCoords(PlayerPedId())
local alertData = { local alertData = {
title = data.message or "No message provided", title = data.message or "No message provided",
description = data.message or "", description = data.message or "",
groups = data.jobs or data.job or "police", groups = data.jobs or data.job or "police",
location = {coords = data.coords, street = GetStreetNameAtCoord(table.unpack(data.coords))} or {coords = GetEntityCoords(PlayerPedId()), street = GetStreetNameAtCoord(table.unpack(GetEntityCoords(PlayerPedId())))}, location = {coords = coords, street = GetStreetNameFromHashKey(GetStreetNameAtCoord(coords.x, coords.y, coords.z))},
code = data.code or '10-80', code = data.code or '10-80',
priority = data.priority or 2, priority = data.priority or 2,
metadata = metadata, metadata = metadata,