Files
community_bridge/modules/dispatch/redutzu-mdt/client/client.lua
T

17 lines
553 B
Lua
Raw Normal View History

---@diagnostic disable: duplicate-set-field
2025-05-18 23:45:37 -04:00
if GetResourceState('redutzu-mdt') == 'missing' then return end
2025-04-02 12:53:02 -04:00
Dispatch = Dispatch or {}
Dispatch.SendAlert = function(data)
local streetName, _ = Utility.GetStreetNameAtCoords(data.coords)
local alertData = {
code = data.code or '10-80',
message = data.message or "Dispatch Alert",
street = streetName,
time = data.time or 10000,
coords = data.coords,
}
TriggerServerEvent("community_bridge:server:dispatch:sendAlert", alertData)
end
return Dispatch