feat(modules): add origen_police to dispatch modules
This commit is contained in:
1 parent
a5500a1479
commit
5957a887a2
2 files changed
+26
No files matched your search
@@ -0,0 +1,22 @@
|
|||||||
|
---@diagnostic disable: duplicate-set-field
|
||||||
|
if GetResourceState('origen_police') == 'missing' then return end
|
||||||
|
Dispatch = Dispatch or {}
|
||||||
|
|
||||||
|
Dispatch.SendAlert = function(data)
|
||||||
|
local customData = {
|
||||||
|
coords = data.coords or vector3(0.0, 0.0, 0.0),
|
||||||
|
title = 'Alert '..(data.code or '10-80'),
|
||||||
|
message = data.message,
|
||||||
|
job = data.jobs or 'police',
|
||||||
|
metadata = {
|
||||||
|
model = data.vehicle and (GetDisplayNameFromVehicleModel(GetEntityModel(data.vehicle))) or nil,
|
||||||
|
color = {255, 255, 255},
|
||||||
|
plate = data.vehicle and GetVehicleNumberPlateText(data.vehicle) or nil,
|
||||||
|
speed = data.vehicle and (GetEntitySpeed(veh) * 3.6)..' kmh' or nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
TriggerServerEvent("SendAlert:police", customData)
|
||||||
|
end
|
||||||
|
|
||||||
|
return Dispatch
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
if GetResourceState('origen_police') == 'missing' then return end
|
||||||
|
Dispatch = Dispatch or {}
|
||||||
|
|
||||||
|
return Dispatch
|
||||||
Reference in new issue
Block a user