Documentation added, deprecated old points, removed incomplete clothing bridge. I migrated the points into the new system and added deprecation notices. Cleaned some white spaces because they made me unhappy. Added GetStreetNameAtCoords as it may be useful to return a string for others. Added support for lb-tablet dispatch alerts (thank you loaf)
30 lines
949 B
Lua
30 lines
949 B
Lua
if GetResourceState('ps-dispatch') ~= 'started' then return end
|
|
if GetResourceState('lb-tablet') == 'started' then return end
|
|
Dispatch = Dispatch or {}
|
|
|
|
Dispatch.SendAlert = function(data)
|
|
local alertData = {
|
|
message = data.message,
|
|
code = data.code or '10-80',
|
|
icon = data.icon or 'fas fa-question',
|
|
priority = 2,
|
|
coords = data.coords,
|
|
vehicle = data.vehicle,
|
|
plate = data.plate,
|
|
alertTime = (data.time or 10000) / 1000,
|
|
alert = {
|
|
radius = 0,
|
|
recipientList = data.jobs,
|
|
sprite = data.blipData.sprite,
|
|
color = data.blipData.color,
|
|
scale = data.blipData.scale,
|
|
length = 2,
|
|
sound = "Lose_1st",
|
|
sound2 = "GTAO_FM_Events_Soundset",
|
|
offset = false,
|
|
flash = false
|
|
},
|
|
jobs = data.jobs
|
|
}
|
|
exports["ps-dispatch"]:CustomAlert(alertData)
|
|
end |