Skip to content

ErrorMauw/op-dispatch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Preview

MiniaturaOptoDispatch

Opto Dispatch V2 Available for ESX & QBCore

Download & Installation

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

Manually

Using Git

cd resources git clone https://github.com/ErrorMauw/op-dispatch resources/op-dispatch

About

Op-Dispatch a dispatch that seeks the best user experience

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published