# Inventory

{% hint style="warning" %}
For experienced **DEVELOPERS** only!
{% endhint %}

## Config File

Start by setting the inventory to NONE and make sure you don't have any of the supported inventories present on your server: (config.lua)

```lua
Config.Inventory = Inventories.NONE
```

## Inventory Files

* Our prison resource is using inventory in those scenarios: checking player inventory items, items manipulation.
* The files which you need to integrate are located in `rcore_prison/modules/bridge/server/inventory/sv-standalone.lua`.
* You can get a good idea on what to do from the other inventory files.

```lua
-- Check if player has specific item in his inventory
-- @param {number} client - The player's server identifier
-- @param {string} name - The name of the item
-- @param {number} amount - The amount of them item which player should have
-- @returns {boolean} item - If player has specific item or not
Inventory.hasItem = function(client, itemName, amount)
    return false
end


-- Add item to player's inventory
-- @param {number} client - The player's server identifier
-- @param {string} name - The name of the item
-- @param {number} amount - The amount of the item which player will receive
-- @param {metadata} amount - Metadata for this item
-- @returns {boolean} - The state of the action
Inventory.addItem = function(client, itemName, amount, metadata)
    return false
end

-- Remove item from player's inventory
-- @param {number} client - The player's server identifier
-- @param {string} name - The name of the item
-- @param {number} amount - The amount of the item which player will receive
-- @param {metadata} amount - Metadata for this item
-- @returns {boolean} - The state of the action
Inventory.removeItem = function(client, itemName, amount, metadata)
    return false
end

-- Register specific item to be useable
-- @param {string} name - Name of item
-- @param {number} client - The player's server identifier
-- @param {string} item - The item data
-- @param {callback} cb - Action that will be done with callback
-- @returns {callback} - The data passed into callback
Inventory.registerUsableItem = function(name, client, item, cb)
    cb(client, name, item)
end

-- Clear player items in his inventory
-- @param {number} client - The player's server identifier
-- @returns {boolean} - The state of the action
Inventory.clearInventory = function(client)
    return false
end
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://documentation.rcore.cz/paid-resources/rcore_prison/integrations/inventory.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
