Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cd_dispatch integration #69

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion client/fuel_cl.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1738,6 +1738,26 @@ local function PoliceAlert(coords)
if chance < Config.SyphonPoliceCallChance then
if Config.SyphonDispatchSystem == "ps-dispatch" then
exports['ps-dispatch']:SuspiciousActivity()
elseif Config.SyphonDispatchSystem == "cd_dispatch" then
local data = exports['cd_dispatch']:GetPlayerInfo()
TriggerServerEvent('cd_dispatch:AddNotification', {
job_table = {'police', },
coords = data.coords,
title = 'Suspicious Activity',
message = 'Suspicious Activity in Progress',
flash = 0,
unique_id = data.unique_id,
sound = 1,
blip = {
sprite = 456,
scale = 1.2,
colour = 3,
flashes = false,
text = '911 - Suspicious Activity',
time = 5,
radius = 0,
}
})
elseif Config.SyphonDispatchSystem == "qb-dispatch" then
TriggerServerEvent('qb-dispatch:911call', coords)
elseif Config.SyphonDispatchSystem == "qb-default" then
Expand Down Expand Up @@ -2684,4 +2704,4 @@ CreateThread(function()
end
end
end
end)
end)
2 changes: 1 addition & 1 deletion shared/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ Config.UseSyphoning = false -- Follow the Syphoning Install Guide to enable this
Config.SyphonDebug = false -- Used for Debugging the syphon portion!
Config.SyphonKitCap = 50 -- Maximum amount (in L) the syphon kit can fit!
Config.SyphonPoliceCallChance = 25 -- Math.Random(1, 100) Default: 25%
Config.SyphonDispatchSystem = "ps-dispatch" -- Options: "ps-dispatch", "qb-dispatch", "qb-default" (just blips) or "custom" (Custom: you must configure yourself!)
Config.SyphonDispatchSystem = "ps-dispatch" -- Options: "cd_dispatch", "ps-dispatch", "qb-dispatch", "qb-default" (just blips) or "custom" (Custom: you must configure yourself, line 1736!)

--- Jerry Can -----
Config.UseJerryCan = true -- Enable the Jerry Can functionality. Will only work if properly installed.
Expand Down