> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nonefivem.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Inventory

<Info>If you're using [supported inventory](/no-base/supported-resources) you dont have to make any changes in this section.</Info>

> You can override inventory actions from `no-base/configure/server/inventory.lua`

## Examples

***

<Info>This is an example of how we handle qb-inventory. Since we support qb-inventory internally you don't need to make any changes if you use qb-inventory.</Info>

```lua theme={null}
local core = exports["qb-core"]:GetCoreObject()
local GetPlayer = core.Functions.GetPlayer
local RegisterItem = core.Functions.CreateUseableItem
core = nil
Config.Inventory = {
    RegisterItem = function(itemName, cb)
        RegisterItem(itemName, function(source, item)
            item.metadata, item.info = item.info or item.metadata, nil
            cb(source, item)
        end)
    end,
    AddItem = function(source, itemName, count, metadata)
        local player = GetPlayer(source)
        if not player then return false end
        return player.Functions.AddItem(itemName, count, false, metadata)
    end,
    RemoveItem = function(source, itemName, count)
        local player = GetPlayer(source)
        if not player then return false end
        return player.Functions.RemoveItem(itemName, count)
    end
}
```

<Accordion title="RegisterItem">
  Registers item to the inventory.

  ### Parameters

  * itemName: string
  * cb: `Function(source: number, item: {metadata: any})`
</Accordion>

<Accordion title="AddItem">
  Adds item to the given source's inventory.

  ### Parameters

  * source: number
  * itemName: string
  * count: number
  * metadata?: any

  ### Returns

  * success: boolean
</Accordion>

<Accordion title="RemoveItem">
  Removes item to the given source's inventory.

  ### Parameters

  * source: number
  * itemName: string
  * count: number

  ### Returns

  * success: boolean
</Accordion>
