migrate cache.ped to PlayerPedId()

This commit is contained in:
MrNewb committed 2025-07-28 01:37:52 -04:00
1 parent eb8a7e4449
commit 88b4daa2e8
7 files changed
+30 -21

No files matched your search

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