In-Game Tablet with Web Based CAD/MDT Support

Hello, im wondering if you can do this in any kind of jobmanageing? For exampel so if you are set as police, you get the icons for the policewebsite and the laws. And if you are set as ambulance you get the icons for the ambulance website and other stuffs that only the ambulance can see?

Pretty new to this, so i tested somethings, but dosent seem to work, what i have now is in the client.lua:56-69

while true do
– Control ID 20 is the ‘Z’ key by default
– 244 = M
– Use https://wiki.fivem.net/wiki/Controls to find a different key
RegisterCommand(“ems”, function(job)
Playerdata.job

            if job.name ~= 'ambulance' then
            tabEnabled = not tabEnabled -- Toggle tablet visible state
            REQUEST_NUI_FOCUS(tabEnabled)
            print("The tablet state is: " .. tostring(tabEnabled))
            Citizen.Wait(0)
            end
        end)

It won’t allow me to close it with ESC when i’m in my CAD, anyone know a fix?

Hey i found out tht the page is ~1000px in the width

i added my cad to the html and changed the xframe issue i think in my hosting site but it still says the issue of denied x frame when i saved it to where its not blocked

your host may be setting the xframe header to SAMEORIGIN in which case you’d need to either have your host change that or use a different host.

how did you get rocket cad to work mine just opens a white screen

How can i get it to work with my website it just goes blank after press login

Is it possible to access an MDT webpage that is already as in resource implemented in the FiveM server. Can’t seem to find that. Like this one:

https://github.com/thelindat/mdt

How can i change the open key ?

Find this line in client.lua and edit 244 to reflect which key you want.

if (IsControlJustPressed(0, 244)) and GetLastInputMethod( 0 ) then

Control list can be found here:
https://docs.fivem.net/docs/game-references/controls/

Make sure that whatever site you’re trying to open can be iframed. If it’s bubble, you’ll need to allow iframes.

AFAIK, no. The display is written in HTML and HTML doesn’t care about lua or anything happening in FiveM, HTML is just a language used to display stuff.

If you wanted to, you could make separate tablets (separate resources) and edit them so you have a LEO tablet, civ tablet, ems etc.

@AminYadevice Sorry for ping Uhmm seen you help people with this
I added this yesterday and we switched to rocketcad I’ve tried multiple times and I can’t get it to log in. An you help

1 Like

can someone make a version that’s just the cad that auto opens nothing else available on it and the home button would minimize it

You don’t need a special version, just remove the icons you don’t want, you can find them in ui.html starting here:

Yes but i also want the home button to minimize it and not take it to the home screen

Did anyone get this to work im trying to add my cad to the tablet but just shows a blank screen

Anyone know how to increase the size of the entire tablet on the screen

How I export photos in news?

I don’t understand what you’re asking. Could you be a little bit more wordy?