I make a redesign of ox_inventory and i want to add peds in the inventory like this

The problem is when i push code like this :
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
I have this :
without my inventory, how i can do this with my ox inventory please ?
