-- source : player id-- items : items-- amount : amount of items to checkexports['codem-inventory']:HasItem(source, items, amount)
AddItem
Adds item to inventory. There are two options for this export.
Option 1
-- source = Player id-- item = item name-- amount = amount of item-- slot = slot number or nil-- info = item info or nilexports['codem-inventory']:AddItem(source, item, amount, slot, info)
Option 2
-- source = Player id-- item = item name-- amount = amount of itemexports['codem-inventory']:AddItem(source, item, amount)
RemoveItem
Removes item from inventory. There are two options for this export.
Option 1
-- source = player id-- itemname = item name-- amount = amount of item to remove-- slot = slot of item to removeexports['codem-inventory']:RemoveItem(source, itemname, amount, slot)
Option 2
-- source = player id-- itemname = item name-- amount = amount of item to removeexports['codem-inventory']:RemoveItem(source, itemname, amount)
GetFirstsSlotByItem
Gets the item that in the first slot of the player inventory.
-- items : Player Inventory-- itemname : Item name to searchexports['codem-inventory']:GetFirstSlotByItem(items, itemname)
GetItemsWeight
Gets the items weight.
-- items : Player Itemsexports['codem-inventory']:GetTotalWeight(items)
GetItemByName
Gets the data of item by their name.
-- source : player id-- name : item name-- slot : item slotexports['codem-inventory']:GetItemByName(source, name, slot)
SetItemBySlot
Sets the items slot in player inventory. " For Example : Water item is in the 4th slot of the player inventory, with this export you can move it to any slot you want. "
-- source : player id-- slot : slot number-- itemdata : new item dataexports['codem-inventory']:SetItemBySlot(source, slot, itemdata)
GetItemBySlot
Gets the items data according to their slot number.
-- source : player id-- slot : slot numberexports['codem-inventory']:GetItemBySlot(source, slot)
SaveInventory
Saves the player inventory.
-- source : Player ID-- offline : If the player is offline true else falseexports['codem-inventory']:SaveInventory(source, offline)
GetItemsByName
Gets the data of multiple items by their name.
-- source : player id-- item : item name exports['codem-inventory']:GetItemsByName(source,item)
LoadInventory
Loads the player inventory. Think it like an restart as indivual inventories.
-- source : player id-- identifier : player identifier or nilexports['codem-inventory']:LoadInventory(source, identifier)
ClearInventory
Clears the player inventory entirely.
-- source : player idexports['codem-inventory']:ClearInventory(source)
GetItemList
Gets all the items lists that is on the server.
exports['codem-inventory']:GetItemList()
GetInventory
Gets the data of players inventory.
-- identifier : player identifier-- source : player idexports['codem-inventory']:GetInventory(identifier, source)
CheckItemValid
Checks if the player has the valid inputed information in their inventory or not.
-- source : player id-- name : item name-- count : item countexports['codem-inventory']:CheckItemValid(source, name, count)