[ESX] Mobile Data Terminal | Reports, warrants, calls, searches & more

Before we get into it!

Hi there. I wasn’t intentionally planning on releasing this, but I recently became aware that some people got hold of my outdated code for this script and began selling it. With that said, I present you with a more up-to-date, crème de la crème version of my MDT and it’s completely free.

I think that all deprecated methods were replaced with updated alternatives, but please feel free to make a pull request if that’s not the case.

An even-more updated version is unfortunately only compatible my servers’ private framework and currently don’t have time to convert it. I am more than happy to answer questions below, should there be any.


What does it do?

This resource provides police with an in-game Mobile Data Terminal integrated with kashacters for the ESX framework.

The system itself is self-explanatory to use, and provides compatibility for reports, mugshots, character notes, warrants, calls, plate searches and more.

It should work out of the box, but I no longer have an ESX server to test this a year down the line, so no guarantees.


Some useful info…

  • To access, set your character job to police and press DEL on your keyboard
  • When stationary behind a vehicle, the MDT will automatically run plates when opened
  • The command /mdt may also be used to access the UI
  • Search, edit, delete and submit police reports & warrants
  • Attach to, mark as waypoint, delete and edit calls
  • Add character notes, mugshots and amend convictions
  • Search for vehicles by license plate
  • No snails were injured in the making :hushed:

The MDT has functionality to present a different theme with another job, you just have to make the appropriate appendments yourself to do so. There’s a few functions in the ui/script.js code to help with this.

:warning: I will not be providing any updates for this script, it is very old and some of my beginner NUI from a year ago. There could certainly be some optimization.

Other Resources

Check out our other releases below!

Vehicle Spotlight System (px_spotlight) | Advanced spotlight management system - FiveM Resource Development & Modding / Releases - Cfx.re Community

Character Selection for QB (px_chars) | Spawn picker, playtime indicator & more - FiveM Resource Development & Modding / Releases - Cfx.re Community

Character Selection for ESX (px_chars) | Spawn picker, playtime indicator & more - FiveM Resource Development & Modding / Releases - Cfx.re Community


Download and Contents

fxmanifest.lua
cl_mdt.lua
sv_mdt.lua
sv_vehcolors.lua
user_mdt.sql
ui/badges/police.png
ui/styles/police.css
ui/footer.png
ui/index.html
ui/main.css
ui/mugshot.png
ui/script.js
ui/vue.min.js


Installation

  1. There are a few dependencies, please follow the installation steps provided for these scripts and ensure they are running:
    es_extended (v1, duh)
    esx_kashacters
    esx_identity (release version using characters table)
    esx_license
    esx_vehicleshop
    esx_policejob
    mythic_notify: for 911 call notifications
    mysql_async
    gcphone: the MDT fetches phone numbers from gcphone, edit lines 119 and 197 of sv_mdt.lua to select from elsewhere

  2. Execute the provided SQL queries in the user_mdt.sql file.

  3. If your characters database table from esx_identity does not contain a primary key (old version), you will have to execute the following query:

ALTER TABLE `characters` ADD COLUMN `id` int(10) UNSIGNED PRIMARY KEY AUTO_INCREMENT FIRST;
  1. Place folder in server resources, and start the resource. Use DEL to open when in-game.

Click here if you do not have a characters table and use a table called users to store character data.


Documentation

There’s a server-side event you might want to know about so that you can trigger this when a call comes through and want it to show on the MDT.

-- Create a new 911 call in the MDT under the 'Calls' tab.
TriggerEvent("mdt:newCall", details --[[string]], caller --[[int]], coords --[[vector3]])

Screenshots



Changelog

  • v0.2 (18/10/2020): Fixed an issue with loading person details.
  • v0.3 (18/10/2020): Fixed an issue with vehicle paint job not loading.
  • v0.4 (18/10/2020): Reports no longer need charges attached.
  • v0.5 (18/10/2020): Add special cases to searching by ID.
  • v0.6 (18/10/2020): Fixed a call indexing issue.
  • v0.7.1 (18/10/2020): Bug fix, MDT calls consistent across all clients

:snail: Enjoy.

72 Likes

This is amazing thank you bro! Checking it out right now!

1 Like

love it thank you <3

3 Likes

Thanks bud :+1:

1 Like

So I can search for the vehicles I own just fine but when I search for a player I get stuck on this loading

2 Likes

I’m gonna need an error message from your server console in order to help you with this.

Just to make sure, you have in fact ran the SQL code provided?

That is the only error that came up. Nothing in the actual console, and yes I ran the sql

same :sweat_smile:

1 Like

This should now be fixed, just redownload from GitHub.

1 Like

Appreciate you @distritic !

I download the last version from GitHub, but i have this error on console:


Pushed another update to fix this, download v0.3.

Works now for me! :slight_smile: Thx!

I have a question :sweat_smile: How can I publish a new report?, I don’t see the button

t

Not entirely sure why. The button appears when there is a name, title and details attached. I’ve just updated it so charges don’t have to be attached, that’s all I can think of.

Thx!

These errors maybe have something to do with it?

How do I access that highway patrol version?

1 Like

1m

That is just a different design. If you go to mdt>ui>styles> police.css. There you can change the mdt to which ever colors you would like! To change the badge at the top left you would need to go into the mdt > ui > badges folder. You would need to change police.png to which ever badge / logo you would like to use. I recommend renaming it the same “police.png” if you do change it. Also make sure its the same size as the original. You can change the picture in the bottom right by going to mdt > ui and changing the footer.png to which ever photo you like but once again I would make sure its the same size and I would rename it the same “footer.png”

Hi. It’s great! However I would like to ask … how I could remove the dependence on esx_kashacters?.

You would have to find alternative methods to search for characters in your database structure and replace the existing ones in sv_mdt.lua. If you’re still going to use MySQL, the syntax won’t change much. Just use Google for help.

Don’t forget to double check that all table values passed into the code by your database query match the existing ones.

Replace the contents of ui/styles/police.css with the version below and remove the suffix -fhp from all classes, or alternatively edit the getClass function in ui/script.js to:

getClass(element) {
  if (this.style.police) {
    return element + "-fhp"
  } 
}

I have a few of these as the MDT supports different stylesheets depending on your job. This will not replace the badge or text relevant to FHP. That’s something you have to edit in the code.
fhp.css (4.9 KB)

1 Like