In-Game Tablet with Web Based CAD/MDT Support


#243

The animation if you want that player hold the tablette:

animDictionary = “amb@world_human_seat_wall_tablet@female@base”,
animationName = “base”,

Only issue is that tablette kill the RP :joy::joy::rofl:


#244

Oh my god this is the best mod ever im dying inside


#245

Before it worked for me fine, but when I’ve downloaded today again (and changed only background pic), I can’t close it properly! Nui focus is still there. Only mouse cursor…

Does anybody know what’s with it? It’s not modified in any way. After pressing M, tab opens. Then both escape or middle button does the same thing. Tab closes, but focus prevails -.-

Edit.: SOLVED - problem was in renaming the resource to different name :man_facepalming:


#246

What can I do to make char take out this prop? All they do atm, is to make those animation, but without any tablet in their hands


#247

You need to use the tablet prop. Load the model and then attach it to the player.

Here’s the prop i used: prop_cs_tablet


#248

does anyone has the correct values for the bone index?


#249

I was bit stuck with that. Would you mind to pass that bit of the code over?


#251

i made a pull request for animation and prop (that works), sadly i didnt use an “subject” or something… this was my first time using a pull request, sry if i did something wrong.

oh, and the bone coords are correct now


#252

Sure i’ll message you what i have


#253

I’m getting memory usage errors from this now. It sucks because I put my penal code into it and it gets use a LOT. However, I can’t have a script that uses up my memory.


#254

Have you changed anything in the code?


#255

nope. started happening after one of the fivem updates.


#256

We’ve been having the same issue.


#257

What do you mean? I want the whole cad to fit inside the tablet… I have bubble cad


#258

I’m also getting the high memory issue


#259

with a touch of madness, I wonder if it’s possible to play, google games, such as this game … :stuck_out_tongue:

:smile: :smile: :smile:


#260

Ill be looking into the tab issue sometime this week.


#262

discord…facebook… google … tweeter :heart_eyes::heart_eyes::heart_eyes::heart_eyes::heart_eyes::heart_eyes::heart_eyes::heart_eyes::heart_eyes::heart_eyes::heart_eyes::heart_eyes:


#263

I fixed the high memory issue!
If you are using a command instead of control, use this:
You can’t have RegisterCommand inside Citizen.CreateThread (just learned this by mistake)


RegisterCommand("tablet", function()
TriggerEvent("tabletcommand")
end)

RegisterNetEvent("tabletcommand")
AddEventHandler('tabletcommand', function()
                tabEnabled = not tabEnabled -- Toggle tablet visible state
                REQUEST_NUI_FOCUS(tabEnabled)
                print("The tablet state is: " .. tostring(tabEnabled))
end)

Citizen.CreateThread(
    function()
        -- Wait for nui to load or just timeout
        local l = 0
        local timeout = false
        while not tabLoaded do
            Citizen.Wait(0)
            l = l + 1
            if l > 500 then
                tabLoaded = true --
                timeout = true
            end
        end

        if timeout == true then
            print("Failed to load tablet nui...")
        -- return ---- Quit
        end

        print("::The client lua for tablet loaded::")

        REQUEST_NUI_FOCUS(false) -- This is just in case the resources restarted whilst the NUI is focused.

        while true do
            if (tabEnabled) then
                local ped = GetPlayerPed(-1)
                DisableControlAction(0, 1, tabEnabled) -- LookLeftRight
                DisableControlAction(0, 2, tabEnabled) -- LookUpDown
                DisableControlAction(0, 24, tabEnabled) -- Attack
                DisablePlayerFiring(ped, tabEnabled) -- Disable weapon firing
                DisableControlAction(0, 142, tabEnabled) -- MeleeAttackAlternate
                DisableControlAction(0, 106, tabEnabled) -- VehicleMouseControlOverride
            end
            Citizen.Wait(0)
        end
    end
)

#264

Seems to have fixed the resource time warning for us. Thanks for sharing!