Client

GetItemList

exports["tgiann-inventory"]:GetItemList()

Return :

Example

local allItems = exports["tgiann-inventory"]:GetItemList()

GetItemLabel

exports["tgiann-inventory"]:GetItemLabel(item)

Return :

Parameters :

Example

local label = exports["tgiann-inventory"]:GetItemLabel("bandage")

GetPlayerItems

exports["tgiann-inventory"]:GetPlayerItems()

Return :

Example

local playerItems = exports["tgiann-inventory"]:GetPlayerItems()

GetPlayerClotheItems

exports["tgiann-inventory"]:GetPlayerClotheItems()

Return :

Example

local playerClotheItems = exports["tgiann-inventory"]:GetPlayerClotheItems()

HasItem

exports["tgiann-inventory"]:HasItem(items, amount)

Return :

Parameters :

Example

local has1 = exports["tgiann-inventory"]:HasItem("bandage", 2)
local has2 = exports["tgiann-inventory"]:HasItem({"bandage", "armor"}, 2)

OpenInventory

Same function as the F2(default) key

exports["tgiann-inventory"]:OpenInventory()

CloseInventory

exports["tgiann-inventory"]:CloseInventory()

SetInventoryActive

turns inventory usage off or on, when off, the player cannot open and use their inventory

exports["tgiann-inventory"]:SetInventoryActive(boolen)

ToggleHotbar

exports["tgiann-inventory"]:ToggleHotbar(isOpen)

Parameters :

Example

exports["tgiann-inventory"]:ToggleHotbar(true)
exports["tgiann-inventory"]:ToggleHotbar(false)

SetCanUseItem

turns off or on item usage in inventory, Player can't use items in their inventory when closed

exports["tgiann-inventory"]:SetCanUseItem(boolen)

IsInventoryActive

Returns the value modified with SetInventoryActive

local isActive = exports["tgiann-inventory"]:IsInventoryActive()

LastWeaponData

Returns the weapon in his hand and all weapons he uses within 30 seconds

local lastWeaponData, lastWeaponDataForDrop = exports["tgiann-inventory"]:LastWeaponData()

ResetWeaponDataForDrop

Within 30 seconds, resets the data of all weapons used

exports["tgiann-inventory"]:ResetWeaponDataForDrop()

GetCurrentWeapon

Get data for the currently equipped weapon

exports["tgiann-inventory"]:GetCurrentWeapon()

FastSlotAddItem

adds items to the fast slot. remember, if there is no item in your inventory, you cannot use the item in the fast slot

exports["tgiann-inventory"]:FastSlotAddItem(slot, itemName)

Parameters :

Example

exports["tgiann-inventory"]:FastSlotAddItem(1, "bandage")

FastSlotRemoveItem

removes the item from the fast slot

exports["tgiann-inventory"]:FastSlotRemoveItem(slot)

Parameters :

Example

exports["tgiann-inventory"]:FastSlotRemoveItem(1)

FastSlotRemoveAllSlots

Removes all items in the fast slot

exports["tgiann-inventory"]:FastSlotRemoveAllSlots()

Last updated