[Release][ESX] Inventory HUD - 2.4 (properties, trunks, players, shops, storages ...)

wow

can i get some http plz…

In my server everyone can use /openinventory how to disable that for users ?

Find this section: in the server/main.lua
around lines 62-74

RegisterCommand(
	"openinventory",
	function(source, args, rawCommand)
		if IsPlayerAceAllowed(source, "inventory.openinventory") then
			local target = tonumber(args[1])
			local targetXPlayer = ESX.GetPlayerFromId(target)

			if targetXPlayer ~= nil then
				TriggerClientEvent("esx_inventoryhud:openPlayerInventory", source, target, targetXPlayer.name)
			else
				TriggerClientEvent("chatMessage", source, "^1" .. _U("no_player"))
			end
		else
			TriggerClientEvent("chatMessage", source, "^1" .. _U("no_permissions"))
		end
	end
)

and delete those lines or if you want to save them comment them out like this

--[[RegisterCommand(
	"openinventory",
	function(source, args, rawCommand)
		if IsPlayerAceAllowed(source, "inventory.openinventory") then
			local target = tonumber(args[1])
			local targetXPlayer = ESX.GetPlayerFromId(target)

			if targetXPlayer ~= nil then
				TriggerClientEvent("esx_inventoryhud:openPlayerInventory", source, target, targetXPlayer.name)
			else
				TriggerClientEvent("chatMessage", source, "^1" .. _U("no_player"))
			end
		else
			TriggerClientEvent("chatMessage", source, "^1" .. _U("no_permissions"))
		end
	end
)]]--
1 Like

how do i get this hud

use invenotry society with this? any clue?

Its basically almost same as inventory with + property. Just need to change some things. Im planning to do it but not much free time right meow.

tried it and got error hoho can you help me with that

Hi, I have a big problem and I don’t know what to do anymore, I explain, everything was going well until I installed this script

I followed the steps of the installation guide and the mod works very well and everything, but in the part of the installation that says:

“Open player inventory using InventoryHUD (esx_policejob etc.)”
(I attached an image)

I think some of that I have done wrong and pressing F6 in the game, just let me open the players inventory and no other options such as handcuffs / unhandcuffs search / or check id of the player :C

I restored the files by default and fixed the problem of the F6, but I ran out of inventory, so I know that the problem is my bad installation of functions and commands, you could give me a hand, I would appreciate it a lot and thank you !!

My client.lua is this:

then, this

I added this to the beginning of my esx_policejob/server/main.lua, and it looks like this

thanks for read this problem guys! I trust someone can help me: C

Go back where you started before editing anything.

Open policejob/client/main.lua
Search for this;

function OpenBodySearchMenu(player)

	ESX.TriggerServerCallback('esx_policejob:getOtherPlayerData', function(data)

		local elements = {}

		for i=1, #data.accounts, 1 do

			if data.accounts[i].name == 'black_money' and data.accounts[i].money > 0 then

				table.insert(elements, {
					label    = _U('confiscate_dirty', ESX.Math.Round(data.accounts[i].money)),
					value    = 'black_money',
					itemType = 'item_account',
					amount   = data.accounts[i].money
				})

				break
			end

		end

		table.insert(elements, {label = _U('guns_label'), value = nil})

		for i=1, #data.weapons, 1 do
			table.insert(elements, {
				label    = _U('confiscate_weapon', ESX.GetWeaponLabel(data.weapons[i].name), data.weapons[i].ammo),
				value    = data.weapons[i].name,
				itemType = 'item_weapon',
				amount   = data.weapons[i].ammo
			})
		end

		table.insert(elements, {label = _U('inventory_label'), value = nil})

		for i=1, #data.inventory, 1 do
			if data.inventory[i].count > 0 then
				table.insert(elements, {
					label    = _U('confiscate_inv', data.inventory[i].count, data.inventory[i].label),
					value    = data.inventory[i].name,
					itemType = 'item_standard',
					amount   = data.inventory[i].count
				})
			end
		end

		ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'body_search',
		{
			title    = _U('search'),
			align    = 'top-left',
			elements = elements,
		},
		function(data, menu)

			local itemType = data.current.itemType
			local itemName = data.current.value
			local amount   = data.current.amount

			if data.current.value ~= nil then
				TriggerServerEvent('esx_policejob:confiscatePlayerItem', GetPlayerServerId(player), itemType, itemName, amount)
				OpenBodySearchMenu(player)
			end

		end, function(data, menu)
			menu.close()
		end)

	end, GetPlayerServerId(player))

end

and replace it for this

function OpenBodySearchMenu(player)
	TriggerEvent("esx_inventoryhud:openPlayerInventory", GetPlayerServerId(player), GetPlayerName(player))
end
2 Likes

we have the same issue. Black Money works but the other stuff not

I tried it but I still can’t use the policejob options (I see the menu by pressing F6, but when checking the option it doesn’t work, just open the inventory)

Thanks anyway for taking the time to help me!

esx_phone and esx_inventoruhud stuck up

Change the open key

Uhm, i just downloaded and still have the old UI? Where did u find this “new update”

Hello I have your script in my server and I can only consume various items. However, I cannot consume other items such as hamburgers, sodas, and tea. Please respond to me and let my know how I can add these items or fix this problem. - Rush Hour RP, Development Team.

The problem isn’t this script.
Add the items to your esx_basicneeds/server/main.lua

For consuming other Items like Hamburgers, you have to edit server/main.lua from the esx_basicneeds. That dosen’t have something to do with the Inventory HUD.


error esx_property
Can you help me

go the client/main.lua line 633 , find “end” and see if it is necessary to enclose or remove that “end” because that is the cause of your error