Resource Integration
A guide to help customers understand where to replace default police notifications with cd_dispatch notifications.
client-side
The links below will take you to resources from the official ESX GitHub. The highlighted line you will see is the default dispatch alert. All you need to do is replace that line with the code snippet we have provided below. Be sure to customise the variables in the event to suit your server's needs.
Click any of the links below and find the highlighted line; this will be the default dispatch alert for that resource - EXAMPLE.
Copy and paste this code snippet over the existing police alert.
1
local data = exports['cd_dispatch']:GetPlayerInfo()
2
TriggerServerEvent('cd_dispatch:AddNotification', {
3
job_table = {'police', },
4
coords = data.coords,
5
title = '10-15 - Store Robbery',
6
message = 'A '..data.sex..' robbing a store at '..data.street,
7
flash = 0,
8
unique_id = data.unique_id,
9
sound = 1,
10
blip = {
11
sprite = 431,
12
scale = 1.2,
13
colour = 3,
14
flashes = false,
15
text = '911 - Store Robbery',
16
time = 5,
17
radius = 0,
18
}
19
})

Before and after example from a random resource.
client-side
The links below will take you to resources from the official QBCore GitHub. The highlighted line you will see is the default dispatch alert. All you need to do is replace that line with the code snippet we have provided below. Be sure to customise the variables in the event to suit your server's needs.
Click any of the links below and find the highlighted line; this will be the default dispatch alert for that resource - EXAMPLE.
Copy and paste this code snippet over the existing police alert.
1
local data = exports['cd_dispatch']:GetPlayerInfo()
2
TriggerServerEvent('cd_dispatch:AddNotification', {
3
job_table = {'police', },
4
coords = data.coords,
5
title = '10-15 - Store Robbery',
6
message = 'A '..data.sex..' robbing a store at '..data.street,
7
flash = 0,
8
unique_id = data.unique_id,
9
sound = 1,
10
blip = {
11
sprite = 431,
12
scale = 1.2,
13
colour = 3,
14
flashes = false,
15
text = '911 - Store Robbery',
16
time = 5,
17
radius = 0,
18
}
19
})

Before and after example from a random resource.
Our goal is to get as many resources pre-configured to be compatible with our dispatch, or at the very least; we will try to add them here for you to do yourself.
Jaksam Robbery Creator
Jaksam Drugs Creator
You can find this event in
[robberies_creator/integrations/sv_integrations.lua].
Fully replace the existing event with this new edited one.
RegisterNetEvent("robberies_creator:alertedPolice", function(coords, message)
TriggerClientEvent('cd_dispatch:AddNotification', -1, {
job_table = {'police', },
coords = coords,
title = '10-15 - Robbery',
message = message,
flash = 0,
unique_id = tostring(math.random(0000000,9999999)),
sound = 1,
blip = {
sprite = 431,
scale = 1.2,
colour = 3,
flashes = false,
text = '911 - Robbery',
time = 5,
radius = 0,
}
})
end)
You can find this event in
[drugs_creator/integrations/sv_integrations.lua].
Fully replace the existing event with this new edited one.
RegisterNetEvent("drugs_creator:alertedPolice", function(coords, message)
TriggerClientEvent('cd_dispatch:AddNotification', -1, {
job_table = {'police', },
coords = coords,
title = '10-15 - Drugs',
message = message,
flash = 0,
unique_id = tostring(math.random(0000000,9999999)),
sound = 1,
blip = {
sprite = 431,
scale = 1.2,
colour = 3,
flashes = false,
text = '911 - Drugs',
time = 5,
radius = 0,
}
})
end)
Last modified 2mo ago

