From ba63b7c64993d61edeb557085c1323a0f4ba559a Mon Sep 17 00:00:00 2001 From: daniel Date: Mon, 20 May 2024 21:02:22 +0200 Subject: [PATCH] Add compatibility with origen_police for PoliceDispatch module --- modules/PoliceDispatch/client.lua | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/modules/PoliceDispatch/client.lua b/modules/PoliceDispatch/client.lua index 2c742f5..5cb5a12 100644 --- a/modules/PoliceDispatch/client.lua +++ b/modules/PoliceDispatch/client.lua @@ -1,5 +1,5 @@ --- Table of resources for dispatch systems. (custom is a placeholder for your application) -local resources = { {name = "linden_outlawalert"}, {name = "cd_dispatch"}, {name = "ps-dispatch"}, {name = "qs-dispatch"}, {name = "core_dispatch"}, {name = "custom"} } +local resources = { {name = "linden_outlawalert"}, {name = "cd_dispatch"}, {name = "ps-dispatch"}, {name = "qs-dispatch"}, {name = "core_dispatch"}, {name = "custom"}, {name = "origen_police"} } -- Common tables for jobs and job types in the case of ps-dispatch. local jobs = { 'police' } @@ -113,6 +113,16 @@ local SelectDispatch = function() data.colour ) end + elseif resource.name == "origen_police" then + return function(data, playerCoords, locationInfo, gender) + TriggerServerEvent("SendAlert:police", { + coords = playerCoords, + title = data.message, + type = data.displayCode, + message = data.description, + job = 'police', + }) + end elseif resource.name == "custom" then -- Custom dispatch system implementation placeholder return function(data, playerCoords, locationInfo, gender)