How to add alerts in my other scripts?
Here is how to do it!
First, go to
karma-dispatch/client/custom_alerts.lua
and add your custom alerts like this
local function Shooting()
if not CheckWhitelist() then
local coords = GetEntityCoords(PlayerPedId())
local dispatchData = {
message = 'Gun shots reported',
codeName = 'shooting',
code = '10-71A',
priority = 2,
coords = coords,
street = GetStreetAndZone(coords),
assigned = false,
alertTime = nil,
jobs = { 'police' }
}
TriggerServerEvent('karma-dispatch:server:notify', dispatchData)
end
end exports('Shooting', Shooting)
After you add that you can export it where you want it like (in any script) like
exports['karma-dispatch']:Shooting()
Last updated