Karma Developments
DiscordStore
  • Welcome
  • Script Guides
    • Karma Developments Clothing System
      • Install
      • How to change clothing images?
    • Karma Developments Dispatch System
      • Install
      • How to add new Job to Dispatch
      • How to add alerts in my other scripts?
    • Karma Developments Server-Side Graphics Overhaul System
      • Install
      • How to fix grass on roads?
      • Getting crashs?
    • Karma Developments NPC Dialog System
      • Install
      • How to add the images of items at STORES?
    • Karma Developments Garage & Impounds System
      • Install
      • How to create a new garage?
      • How to show vehicles at my qb-phone?
    • Karma Developments Tablet System
      • Install
      • How to add a App UI in Tablet?
  • ABOUT
    • All Links
Powered by GitBook
On this page
  1. Script Guides
  2. Karma Developments Dispatch System

How to add alerts in my other scripts?

Here is how to do it!

  1. 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() 
PreviousHow to add new Job to DispatchNextKarma Developments Server-Side Graphics Overhaul System

Last updated 18 days ago