[FREE] [ESX & QBCORE] Opto Dispatch V2

Opto Dispatch V2 for ESX & QBCore

Config

  • Make sure to change your language in Config.Locale and Config.Framework.
  • At the bottom of the config.lua file you will see
    Config.Jobs and Config.AllowedJobs, you can add whatever job you’re interested to be able to use the dispatch.
Config = {}
Config.Sound = true -- Enable/Disable dispatch sounds
Config.Framework = 'ESX' -- 'ESX' or 'QBCore'
Config.Locale = 'en' -- Language 'en' or 'es'
Config.ShootingAlerts = true -- Enable/Disable Shooting alerts
Config.Measurement = true -- True = Metric False = Imperial
Config.ShootingCooldown = 30 -- Seconds
Config.BlipDeletion = 30 -- Seconds

Config.CommandShow = {
    command = 'showDispatch',
    description = 'Open Dispatch'
}

Config.VehicleRob = {
    command = 'vehrob',
    description = 'Vehicle theft'
}

Config.CommandPanic = {
    command = 'p',
    description = 'Emergency button'
}

Config.CommandClear = {
    command = 'cls',
    description = 'Clear Alerts'
}

Config.DispatcherJob = 'police'
Config.Jobs = {'police', 'ambulance'}
Config.DefaultDispatchNumber = '0A-00'

Config.AllowedJobs = {
    ["police"] = {
        name = 'police',
        label = 'LSPD',
        command = 'alert',
        descriptcommand = 'Send an alert to LSPD',
        panic = true
    },
    ["ambulance"] = {
        name = 'ambulance',
        label = 'EMS',
        command = 'alertems',
        descriptcommand = 'Send an alert to EMS',
        panic = true
    }
}

Adding alerts to your scripts

Example function:
function ExampleAlert()
 local job = "police" -- Jobs that will recive the alert
 local text = "Example Text" -- Main text alert
 local coords = GetEntityCoords(PlayerPedId()) -- Alert coords
 local id = GetPlayerServerId(PlayerId()) -- Player that triggered the alert
 local title = "Example Title" -- Main title alert
 local panic = false -- Allow/Disable panic effect

 TriggerServerEvent('Opto_dispatch:Server:SendAlert', job, title, text, coords, panic, id)
end
9 Likes

Any chance to make it Standalone? It looks really nice!

Nice release :slight_smile:

It’s something you can give it a try since it’s open source for everyone, but making it standalone will include removing jobs detectors and will stop being a Police Dispatch : )

Thanks! :heart:

Is it possible to make it so that EMS and police get access to the menu Config.DispatcherJob = ‘police’ I tried to add ambulance, but it didn’t work like in this Config.Jobs = {‘police’, ‘ambulance’}

And one more question I have about this, maybe you forgot Picture

I love that :blush:

2 Likes

I will take a look tomorrow on it.
By the way, thanks for the screenshot, it’s already fixed : )

1 Like

just insane !

I can’t add alert to my script… Can you help me? please

Hi, is it possible to create an export of certain alerts like a shop robbery, in the case that you can, how can you do it? Very good script btw

Hi, sorry for the late response, I would be glad to help you, if you can join the discord for easier support it would make it easier for me to help you, thanks!

No problem I’ve already fixed it, but thanks for your respones btw!

can anyone help me, I put this:

function ExampleAlert()
local job = “police” – Jobs that will receive the alert
local text = “Example Text” – Main text alert
local coords = GetEntityCoords(PlayerPedId()) – Alert coords
local id = GetPlayerServerId(PlayerId()) – Player that triggered the alert
local title = “Example Title” – Main title alert
local panic = false – Allow/Disable panic effect

TriggerServerEvent(‘Opto_dispatch:Server:SendAlert’, job, title, text, coords, panic, id)
end

In my heist script, I modified it as I wanted, but when I try to start the heist the notification doesn’t come, and I thought maybe I needed to change “function ExampleAlert()” to something else. Can you help me thanks.