Functions
local QBCore = exports[Config.Settings.core]:GetCoreObject()
function Notify(msg, type)
if type == "primary" then
QBCore.Functions.Notify(msg, "primary")
end
if type == "success" then
QBCore.Functions.Notify(msg, "success")
end
if type == "error" then
QBCore.Functions.Notify(msg, "error")
end
end
function AlertPoliceWarehouse() -- Function to alert cops when you steal the warehouse
exports["ps-dispatch"]:CustomAlert({
coords = Config.SettingsWarehouse.LocWarehouseOutside,
message = "Warehouse Robbery",
dispatchCode = "911",
description = "Warehouse Robbery",
radius = 0,
sprite = 357,
color = 3,
scale = 0.8,
length = 3,
})
end
function AlertPoliceDismantCar() -- Function to alert cops when you finish the dismant of the car
local playerPos = GetEntityCoords(PlayerPedId(), true)
exports["ps-dispatch"]:CustomAlert({
coords = playerPos,
message = "Dismant Vehicle",
dispatchCode = "911",
description = "Dismant Vehicle",
radius = 0,
sprite = 357,
color = 3,
scale = 0.8,
length = 3,
})
end
-- Function to check zone
function CheckZone()
local playerPos = GetEntityCoords(PlayerPedId(), true)
for k,v in pairs(Config.Zones) do
if #(playerPos - vector3(v.x, v.y, v.z)) < 10.0 then
return true
else
return false
end
end
end
Last updated