Inventory
This page serves as a guide to help you integrate your inventory with this resource.
Config File
Config.Inventory = Inventories.NONEInventory Files
-- 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
endLast updated