Server-side

Server export

SetMetaData - Used to deliver specific metadata to the player.

-- player: Player Citizenid or identifier
-- info: Name of the metadata you want to insert
-- metadata: Information of the inserted metadata, valid number and string
exports['qs-inventory']:SetMetaData(player, { info = metadata })

GetMetaData - Check a specific metadata of a player.

-- player: Player identifier
exports['qs-inventory']:GetMetaData(player)

GiveItemToPlayer - Useful to deliver items with metadata, configure it in server/custom.

-- source: Player source
-- item: Name of the item to deliver
-- count: Quantity of the item to deliver
exports['qs-inventory']:GiveItemToPlayer(source, item, count)

GetTotalUsedSlots - Get the used slots in your inventory.

-- source: Player source
exports['qs-inventory']:GetTotalUsedSlots(source)

RegisterStash - Create stashes with a simple export.

-- source: Player source
-- stash: stash identifier
-- slots: Total stash slots
-- weight: Total stash space
exports['qs-inventory']:RegisterStash(source, stash, slots, weight)

AddItemIntoStash - Add items to a stash externally.

-- stashid: Stash id, example 'stash_house'
-- item: item to add, example 'bread'
-- amount: item amount
-- slot: slot or nil
-- info: metadata information or nil
-- slots: stash slots
-- maxWeight: stash weight
exports['qs-inventory']:AddItemIntoStash(stashid, item, amount, slot, info, slots, maxWeight)

RemoveItemIntoStash- Remove items to a stash externally.

-- stashid: Stash id, example 'stash_house'
-- item: item to add, example 'bread'
-- amount: item amount
-- slot: item slot or nil
-- slots: stash slots
-- maxWeight: stash weight
exports['qs-inventory']:RemoveItemIntoStash(stashid, item, amount, slot, slots, maxWeight)

GetStashItems - Check items within a certain stash.

-- stashid: Stash id, example 'stash_house'
exports['qs-inventory']:GetStashItems(stashid)

Last updated