Change native Gta frontend position

This is a continuation of this topic:
I’m working on a Vrp fivem server, and trying to make an inventory system.
My goal is to show the player inventory along with his current ped model.
Something like this

I was able to show the ped and inventory at the same time

Code:


function createPedScreen() 

    CreateThread(function()

        heading = GetEntityHeading(PlayerPedId())
        SetScriptGfxAlign(67, 67)
        
        SetFrontendActive(true)

        ActivateFrontendMenu('FE_MENU_VERSION_EMPTY', true, -1)

        Citizen.Wait(100)

        N_0x98215325a695e78a(false)

        PlayerPedPreview = ClonePed(PlayerPedId(), heading, true, false)

        local x,y,z = table.unpack(GetEntityCoords(PlayerPedPreview))

        SetEntityCoords(PlayerPedPreview, x ,y,z-100)

        FreezeEntityPosition(PlayerPedPreview, true)

        SetEntityVisible(PlayerPedPreview, false, false)

        NetworkSetEntityInvisibleToNetwork(PlayerPedPreview, false)

        Wait(200)

        SetPedAsNoLongerNeeded(PlayerPedPreview)



        GivePedToPauseMenu(PlayerPedPreview, 2)
        

        SetPauseMenuPedLighting(true)

        SetPauseMenuPedSleepState(false)

    end)

end

As you can see, they don’t align properly.
So my next goal is to change the default position of the ped in the screen.

1 Like