Functions
local QBCore = exports["qb-core"]:GetCoreObject()
function CallCops()
if GetResourceState("ps-dispatch") == "started" then
local pCoords = GetEntityCoords(PlayerPedId())
exports["ps-dispatch"]:CustomAlert({
coords = pCoords,
message = "911 - Suspicious Activity",
dispatchCode = "10-10 Suspicious Activity",
description = "possibly committing a crime",
gender = true,
radius = 0,
sprite = 156,
color = 1,
scale = 1.2,
length = 3,
})
elseif GetResourceState("cd_dispatch") == "started" then
local data = exports['cd_dispatch']:GetPlayerInfo()
TriggerServerEvent('cd_dispatch:AddNotification', {
job_table = {'police'},
coords = data.coords,
title = '10-10 - Suspicious Activity',
message = 'A '..data.sex..' possibly committing a crime '..data.street,
flash = 0,
unique_id = tostring(math.random(0000000,9999999)),
blip = {
sprite = 156,
scale = 1.2,
colour = 1,
flashes = false,
text = '911 - Suspicious Activity',
time = (5*60*1000),
sound = 1,
}
})
elseif GetResourceState("qs-dispatch") == "started" then
local pCoords = GetEntityCoords(PlayerPedId())
TriggerServerEvent('qs-dispatch:server:CreateDiapatchCall', {
job = 'police',
callLocation = pCoords,
callCode = {code = '911 - Suspicious Activity', snippet = '10-10 Suspicious Activity'},
message = 'possibly committing a crime',
flashes = 'Boolean',
image = 'URL.png',
blip = {
sprite = 110,
scale = 1.5,
colour = 1,
flashes = true,
text = '10-10 Suspicious Activity',
time = (6*60*1000),-- 6 minutes
}
})
end
end
function progressBar()
QBCore.Functions.Progressbar("RoubarNPCZINHO", Language.RobNPC, Config.Utility.TimeRob, false, true, {
disableMovement = false,
disableCarMovement = true,
disableMouse = false,
disableCombat = false,
}, {}, {}, {}, function() end)
end
function notify(msg)
QBCore.Functions.Notify(msg)
end
Last updated