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

is there a way to use it without esx_kashacters ?

Search the event in your gcphone and replace with:


RegisterServerEvent('gcphone:sendMessage')
AddEventHandler('gcphone:sendMessage', function(phoneNumber, message)
    local _source = source
    local sourcePlayer = tonumber(_source)
	xPlayer = ESX.GetPlayerFromId(_source)
    identifier = xPlayer.identifier
    addMessage(sourcePlayer, identifier, phoneNumber, message)
	
	local persoon = GetPlayerPed(_source)
	local gezien = GetEntityCoords(persoon)
	local jezus = ESX.GetPlayerFromId(_source)
	local ok = jezus.getName(_source)
	
	if phoneNumber == 'police' then
		TriggerEvent("mdt:newCall", message, ok, vector3(gezien.x, gezien.y, gezien.z))
	end
end)

Hello, individuals of this thread, if you wish to use this mdt with a some realistic tablet look, you may use this code, which I have integrated into my redevelopment of this mdt.

For this to work, first we need to download this tablet.png file (47.6 KB file on MEGA)

Now, that you have downloaded this make a new folder inside your coding software with the name (img) and insert the tablet.png into that folder, and you are ready for the next steps

HTML

Place this code in the index.html under the div id=“container”

        <img src="img/ipad.png" id="ipad">

CSS

Head to main.css and inplement this code.

#ipad {
position: absolute;
width: 106.94%;
height: 109%;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}

If you have any questions, you may reply to this message,

Regards,
Aaron

Update:

For those wondering, I quickly just built a html and css tablet, to allow you to see what the actual tablet border around the mdt looks like.

There’s no picture of the tablet for us to see lol

Sorry, I understand what you mean, unfortunately I won’t upload any images of my mdt, just incase anyone tries to replicate

Hello, I think I have followed all the steps and installed everything correctly. However, it doesn’t seem to work

I can’t find any names it the database and can’t write any report. I have installed the newest version of ESX identity as you provided in the comment.

I am happy, to do the tablet around his current one to show you how it looks if you wish?

When I do this, it always sets my location to West Vinewood, not where the message was sent. Any solution?

Hahaha, There is 0 reasons to answer you. Read the whole topic before commenting.

Mine works perfect,i guess your database is messed up or something i dont know :confused:

1 Like

Hey, where does the script take the names of the fines? Is it possible to change them, or does it grab the names from esx_policejob?

Okay

1 Like

It pulls them from your database from : fine_types

Okay (5 char)

1 Like

If you add more fines to your database: fine_types the new ones will appear in your mdt

1 Like

I said release version, not newest. You should be using a table called characters to store character data and it should have a primary key column named id. Follow the installation steps carefully in the original post.


Nope, sorry. You can edit the SQL/server-side code yourself and make it compatible with your character system that way.


That would mean it is not getting player coordinates correctly and it defaults to 0, 0, 0 which is in West Vinewood. Check the event parameters used when creating a new call and ensure the third parameter is a vector3 value.

This is what it looks like in gcphone/server.lua

bro i cant :frowning: please help me…

i do everywhint fine and good but this not work for me