Skip to content

10. AIOMenu support (OPTIONAL)

Dutch Players edited this page Mar 23, 2021 · 2 revisions

Add support for esx_aiomenu:

Replace DP_Inventory/client/main.lua

Citizen.CreateThread(
    function()
        while true do
            Citizen.Wait(0)
            if IsControlJustReleased(0, Config.OpenControl) and IsInputDisabled(0) then
                openInventory()
            end
        end
    end

with:

--[[Citizen.CreateThread(
    function()
        while true do
            Citizen.Wait(0)
            if IsControlJustReleased(0, Config.OpenControl) and IsInputDisabled(0) then
                openInventory()
            end
        end
    end
)--]]

Then add to DP_Inventory/__resource.lua:

exports {
	'openInventory'
}

And replace in esx_aiomenu/client/main.lua:

RegisterNUICallback('NUIopenInventory', function()
	exports['es_extended']:openInventory()
end)

With:

RegisterNUICallback('NUIopenInventory', function()
	exports['DP_Inventory']:openInventory()
end)