Page cover

πŸ”©Basics

Hello, this docs its teaching basics of inventory!

Custom Inventory Creation

Locate "config_items.lua" inside inventory folder,

  ["inventory_item_name"] = {    -- Our custom inventory
        ["item"] = {
            _id = "inventory_item_name",
            _name = "NotImportant",
            _parent = "",
            _type = "Node",
            _data = {
                Name = "Inventory Name",
                Label = "Inventory Label",
                Description = "",
                Width = 1,
                Height = 1,
                Weight = 1.5,
                ExamineTime = 3.0,
                Backgroundcolor = "black",
                ItemSound = "gear_generic",
                Type = "container",
                MaxStack = 1,
                Grids = {
                    [0] = {
                        _name ="1",
                        _id ="Not_Important",
                        _parent ="inventory_item_name",
                        cellsH = 9, -- Our cells width
                        cellsV = 3, -- Our grids width
                    },
                },
                Itemimage = "",
            }
        }
    },

Before creating the inventory, you need to trigger the custom inventory with export. You can use example export for example inventory,

What is mean this variables?

  • ourinventoryid Is means Inventory name in database like "motel-george"

  • inventory_item_name It's a created item in config_items

  • isTemporary If is true never will be saved

Inventory Item Creation

Locate "config_items.lua" inside inventory folder,

After the creating the item, restart the server. If doesn't want to restart everytime locate config.lua and find Config.Debug = false, make it true. You can restart inventory everytime.

Item Convert! (QB-ESX)

Start your server, enter the "convertitems" to your server console. It will create config_converted.lua named file, you can transfer all items to config_items.lua

Inventory Keybindings

Dragging items ( Hold left click to item )

Research items ( Middle mouse button to unsearched item )

Research containers ( Middle mouse button to UNSEARCHED text or left click to Search )

Hotbar/Fastuse ( Click 3-9 keys in keyboard 1-2 for first and second weapon never be manually changed! )

Context Menu/Attachment Menu ( Right click to item )

Item Split ( Start dragging a item and hold shift, finally drop the grid, Split thing will be appear on screen. )

Custom Images Per Item

Locate html > classes.js inside inventory folder, Find "GetItemImage" and customize with your own.

Custom Container Looking Weird

  • Make sure you created item

  • Find html/clothing.css

Custom Clothing/Container Creation

Locate "config_items.lua" inside inventory folder,

Created custom clothing in lua, but there is 1 process left. UI can looks weird for reason, find html/clothing.css

After doing that, custom clothing can be useable. If you want to implement the esx_skin or qb-clothing,

We already created a bag if not make one, For an example, We're gonna edit the backpack 85

For QBCore

Inventory Shop Creation

What this mean this variables!

SHOP-XXXXXX

  • Doesnt important thing you can rename noting will be change

  • ( ! IMPORTANT ! DO NOT DELETE SHOP- )

Shop1

  • Is Inventory name in config_items.lua you can customize inventory from location.

  • Its not important and big thing!

Temporary

  • Is equals temporary, make "true"!

ShopItems

  • ShopItems is shop items you can edit freely.

  • You can add or you can remove items, items created with info

  • (DO NOT MORE INFO ITEMS AMOUNT MORE THAN 1 LIKE WEAPONS)

qb-inventory stashes

Locate "ls-inventoryhud > resources > server> functions.lua",

Locate "ls-inventoryhud > resources > client > functions.lua",

qb-shops

Locate "qb-shops > client > main.lua",

Last updated