[ESX] CONDE-B1G_INVENTORY | Fast Items, Hotbar, Notifications, Shortcuts, HUD and much more

Hi there,

I really love this inventory, but how i can change the ‘item weapons’ for only weapons ? I could like use this inventory but i go crazy try change this for only weapons, any one already change and could help please ?

thank you so much

The items in my Hot Bar always go back into the general inventory after I log on and off… Is there a way to fix this? I would Hot Bar items to be in the same location when a player spawns.

Fixed this. Didnt realise you need to drag the ammo to use while holding the gun lol

This works like a charm, however, for me there is no shops? Anyone else having this issue?

hi can anyone help me why am i getting this when putting a gun away

you probably need to make a column for “attach” in whatever field. Have you run your SQL file?

Head into your DB and double check the table “disc_ammo” and make sure you have a column called “attach” in there. If not, here is how its setup for me.

1 Like

How did you get glovebox etc to work? Just download the esx_inventoryhud addons and run them?

thank you so much for that it was missing that little bit now working tho thanks and yer i see you saying about glovebox im two trying to get that to work as well as trunk if you work it out could you let me know thanks

No worries glad i could help :slight_smile: Yeah just waiting for a reply from anyone or perhaps the author himself. Not sure how to get the stores working, or the glovebox/trunk, cant see any “howto”-guide in the description.

followed the steps the guy posted with replacing the open inventory events. Worked perfect

Alright ; I followed the steps provided to make esx_inventoryhud_trunk and glovebox work properly, Glovebox works without issue, but Trunk opens and the inventory comes up but then when I close it I cant open trunks at all for any vehicles.

It also doesnt close the trunk lid so I’m narrowing down to this area in esx_trunk-cl.lua (109-143)

Any help would be greatly appreciated

RegisterNetEvent("conde_inventory:onClosedInventory")
AddEventHandler(
    "conde_inventory:onClosedInventory",
    function(type)
        if type == "trunk" then
            closeTrunk()
        end
    end
)

function closeTrunk()
    if currentVehicle ~= nil then
        SetVehicleDoorShut(currentVehicle, 5, false)
    end

    currentVehicle = nil
end

Citizen.CreateThread(
    function()
        while true do
            Wait(500)
            if currentVehicle ~= nil and DoesEntityExist(currentVehicle) then
                local playerPed = PlayerPedId()
                local coords = GetEntityCoords(playerPed)
                local vehicleCoords = GetEntityCoords(currentVehicle)
                local distance = GetDistanceBetweenCoords(coords, vehicleCoords, 1)

                if distance > 4.0 then
                    TriggerEvent("conde_inventory:closeInventory")
                end
            end
        end
    end
)

Hey, genuine curiousity here ; I’m trying to do the same but whenever I do this it errors out. I’m attempting to do one for a shop inside the MRPD on the keyboard ; but my error has to do with Blips and 3D Text.

DISREGARD

I got it working, turns out I’m just tired and didnt realize where I was putting things incorrectly.

Alright ; for those of you looking to integrate BT-Target with this, its actually super simple. This will also show you how to add more shop types like I have done.

First, navigate to config.lua and add your blips and length. These dont really matter since theres not going to be a blip for these new locations using BT-Target. I’m going to be using one of my “Vending Machines” as an example. I’d like to note that this will place a shop at any vending machine hash that you put in. Really simple and neat.

Config.VendingDrinkShopBlipID = 498
Config.VendingDrinkShopLength = 5

After this, youre going to add the items that you want inside the config. It should look like this.

VendingDrinkShop = {
        Locations = {
        },
        Items = {
			{ name = 'cola' ,  price =  1 },
			{ name = 'redbull' ,  price =  1 },
			{ name = 'icedtea' ,  price =  1 },
			{ name = 'water' ,  price =  1 },
            { name = 'monster', price =  2 }
		}
	},

Navigate to client/shop.lua and add your shop name zone at line 22 or 23

or IsInVendingDrinkShopZone(coords)

Now below that youll see the same code with some below it defining a keypress. Youre going to define a keypress for your shop(it doesnt work otherwise)

           if IsInVendingDrinkShopZone(coords) then
                if IsControlJustReleased(0, Keys["E"]) then
                    OpenShopInv("vendingdrink")
                    Citizen.Wait(2000)
                end
            end

After this head down somewhere near line 180-200 and define a function for the shop. Copy an existing function and add replace the existing Zone name with your Zone name. It should look like this when you’re done.

function IsInVendingDrinkShopZone(coords)
    VendingDrinkShop = Config.Shops.VendingDrinkShop.Locations
    for i = 1, #VendingDrinkShop, 1 do
        if GetDistanceBetweenCoords(coords, VendingDrinkShop[i].x, VendingDrinkShop[i].y, VendingDrinkShop[i].z, true) < 1.5 then
            return true
        end
    end
    return false
end

Directly below this youll fine another code that has to do with blips. If you havent noticed already, you’re just copying existing code to make a new shop. It doesnt take long once youre used to it and you can make as many shops as you want. Just paste it in and change the name of everything to match what you’ve done so far

for k, v in pairs(Config.Shops.VendingDrinkShop.Locations) do
        CreateBlip(vector3(Config.Shops.VendingDrinkShop.Locations[k].x, Config.Shops.VendingDrinkShop.Locations[k].y, Config.Shops.VendingDrinkShop.Locations[k].z ), "Store", 3.0, Config.Color, Config.VendingDrinkShopBlipID)
    end

A little further down do the same thing for the marker function

			for k, v in pairs(Config.Shops.VendingDrinkShop.Locations) do
                local distance = GetDistanceBetweenCoords(coords, Config.Shops.VendingDrinkShop.Locations[k].x, Config.Shops.VendingDrinkShop.Locations[k].y, Config.Shops.VendingDrinkShop.Locations[k].z, true)
                if distance < 10 then
                    DrawMarker(27, Config.Shops.VendingDrinkShop.Locations[k].x, Config.Shops.VendingDrinkShop.Locations[k].y, Config.Shops.VendingDrinkShop.Locations[k].z, 0, 0, 0, 0, 0, 0, 0.5, 0.5, 1.0, 1, 157, 0, 155, false, false, 2, false, false, false, false)
                    if distance < 3.0 then 
                        DrawText3Ds(Config.Shops.VendingDrinkShop.Locations[k].x, Config.Shops.VendingDrinkShop.Locations[k].y, Config.Shops.VendingDrinkShop.Locations[k].z + 1, "Press [~g~E~w~] to open the shop")
                        near = true
                        break
                    end
                    near = true
                end
            end

Now then, we’re going to set up the trigger open inventory event that we’re going to use for bt-target.

The code should look something like this. The OpenShovInv(“xxx”) should match what you put at top for the keypress to open the specific inventory for this.

                   (What Im Referring To)
--------------------------------------------
			if IsInVendingDrinkShopZone(coords) then
                if IsControlJustReleased(0, Keys["E"]) then
                    OpenShopInv("vendingdrink")
                    Citizen.Wait(2000)
                end
            end
-----------------------------------------------------
(Code To Add)
-------------
RegisterNetEvent("VendingDrink")
AddEventHandler("VendingDrink", function()
	Citizen.Wait(100)
	OpenShopInv("vendingdrink")
end)

You’re now done in shops.lua ; Now we’re going to head over to server/main.lua

At Line 122 you’re going to define the shop type and items for VendingDrinkShop. Use the code thats already there as an example to follow. Mine looks like this. Shop type will be the shop inventory name you used above and Config.Shops should match what you used in your shops.lua and config.lua

		if shoptype == "vendingdrink" then
			for _, v in pairs(Config.Shops.VendingDrinkShop.Items) do
				if v.name == itemResult[i].name then
					table.insert(itemShopList, {
						type = "item_standard",
						name = itemInformation[itemResult[i].name].name,
						label = itemInformation[itemResult[i].name].label,
						weight = itemInformation[itemResult[i].name].weight,
						rare = itemInformation[itemResult[i].name].rare,
						can_remove = itemInformation[itemResult[i].name].can_remove,
						price = v.price,
						count = 99999999
					})
				end
			end
		end

Now then. You’re done with the inventory. Youre now going to go to bt-target/client/main.lua and head down to the bottom below the exports for bt-target.

You’re going to define what you want it to do, for this one in specific I have it set up so that all of the Drink Machine hashes are going to have this shop when you walk up to it.

 local vendingdrink = {
        1114264700, 992069095, 1099892058,
    }
    AddTargetModel(vendingdrink, {
        options = {
            {
                event = "VendingDrink",
                icon = "fas fa-shop",
                label = "Buy Drinks",
            },
        },
        job = {"all"},
        distance = 1.0
    })

If you did everything correctly it should now sell the items at any vending machine that has to do with drinks. You’ll have to restart the inventory and bt-target for these to show up in game. If you run into some that arent working or are a different drink machine prop, just add their hashes with the other to make them work.

1 Like

Having a problem where my input becomes locked after closing the [tab] inventory screen.

I can still open the FiveM console to disconnect yet all other input is locked with a cursor on screen.
Any ideas?

how would i go about that?

Thanks, for helping the guys out there!

No problem! I ultimately ended up moving over to ESX Legacy and another inventory system, but yours is really well made and makes life super easy for doing everything. Thank you for providing such a useful resource <3

you can always just put it on a hotkey and press it aswell :slight_smile: way easier

Hey everyone! :slight_smile:

I was wondering if anyone has gotten trunk and glovebox to work with Es_extended 1.2?

I have done this;

  • Made sure every trigger event is changed from esx_inventory to conde_inventory in the client.lua in esx_inventoryhud_trunk
  • Copied the trunk.lua and added it to conde_inventory script on client side + added the file to fxmanifest.lua
  • Ran every SQL im soppused to.

Heres the MySQL error im getting.

Im just wondering if this is an issue related to my version of es_extended or not, and if anyone has a fix for it. :slight_smile: Would hate to change inventory because i love what @Daniel_Escadas has made here!! Thanks.

trunk.lua (4.2 KB)

Here you go man :stuck_out_tongue: This is working for me