[ESX] [FREE] Dispatch notifications

ESX Dispatch System

This is a nopixel style dispatch system wich will send to every player with a given job (configurable) a specific dispatch message

Video

Youtube Link

Tutorial

Pressing the “DEL” key on your keybord will open the list of all previous and current dispatch messages.
To use this script you’ll need to call a server event (from the client :/) called “dispatch:svNotify” with given data, for example:

local dispatch = {
        code = "10-40",
        street = GetStreetAndZone(),
        id = randomId(),
        priority = priority,
        title = message,
        position = {
            x = coords.x,
            y = coords.y,
            z = coords.z
        },
        blipname = "Test dispatch",
        color = 2,
        sprite = 304,
        fadeOut = 30,
        duration = 10000,
        officer = "Test officername"
    }
  • code will be the text inside the little red container in the top left of the message
  • street will be the text on the bottom of the message indicating the street where the message was sent
  • id is a random id generated for that message; it can be anything but it requires to be unique for every single dispatch message
  • priority can be 1 or 2 (number not string) and will change the type of dispatch (normal or blinking)
  • title will be the text on top of the message (or the title if you want to call it that way :/)
  • position the position where the dispatch signal will point (needs to be a table not a vector)
  • blipname if enabled in the config file, this will be the name of the blip created on the position of the dispatch
  • color will be the color of the named blip
  • sprite will be the sprite of the named blip
  • fadeOut is how much time need to pass to remove the blip from the map
  • duration is how much time need to pass to remove the dispatch message from the screen
  • officer is the name of the officer wich sent the dispatch message

Download link

Github
And here are the two sounds shown in the video

Known issues

  • Sometimes the blip will not be removed automatically but you’ll need to press the delete button
13 Likes

If I understand correctly to use it I will need to edit another script?
I am a little confused how to make it work. but I know very little about coding so…

Hey, Really cool script any way for this to be non esx?

It can be anything you want. You’ll just need to edit the server side with your framework (and also client for notifications)

Nope. This script contains the logic between the dispatches (blips and so) and you can show your dispatch by calling the server event with your arguments

Is there anyway to not make this command based, and integrate it into my other scripts. For instance, I have a drug selling script, and I want this script to automatically send a dispatch for it? Can that work with this? If so, what would I call for it to trigger?

You just need to trigger the server event with the table containing the announce infoes: e.g. i have some args in the policejob like these

local dispatch = {
	code = "TestCode",
	street = GetStreetAndZone(),
	id = uuid,
	priority = 1,
	title = "TestTitle",
	position = {
		x = coords.x,
		y = coords.y,
		z = coords.z
	},
	officer = "TestOfficer"
}

TriggerServerEvent("dispatch:svNotify", dispatch)
1 Like

Very nice

Can you give example for ispedshooting
because im confused how it is works

this doesnt work

This also is not working for me, do you know any reason why?

You just need to know how to implement it.

Half of the resource doesnt even work

I think that you just don’t know how to use it… And instead, just say what’s not working for you so, maybe, i can fix the issue you’re getting. Bye

the whole of the server side

Thank you again for your useless feedback, maybe i will (never) find the error you’re referring to :slight_smile: Have a great time

How is that useless, none of the server code works

None of the serversided code works for you. The server code is preatty simple and easy to understand so if it doesn’t work for you, you should be able (maybe…) to understand why it’s not working and maybe share the problems you found on the forum (and not just complain on an issue so generic that i and nobody else can fix)

the function GetStreetAndZone() doesnt even exist xD

If you don’t know how the script is done and if for you it’s hard to understand that that’s a function that you’ll need to define in another script… I don’t even know why i’m still answering your posts. Also i can see that you can’t even read, because the function you’re looking for it’s in the config.lua file