Git Product home page Git Product logo

op-dispatch's Introduction

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

op-dispatch's People

Contributors

errormauw avatar jordanbscott avatar viluu avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.