Client
These exports can only be used on the client-side. Make sure to use them in your client-side script files.
I do not recommend using these exports on the client-side. Most of the time these exports just trigger a callback with the server exports. You make your script more vulnerable if you are using these exports. They are intended for server-side use only.
CanCarryItem
exports.it_bridge:CanCarryItem(item, amount)- item:
string: The item name. - count:
number: The amount of items.
Checks if the player can carry the specified amount of items. Returns true if the player can carry the items, false otherwise.
Example
local canCarry = exports.it_bridge:CanCarryItem('paper', 10)
print(canCarry)GetItemCount
exports.it_bridge:GetItemCount(item, metadata)- item:
string: The item name. - metadata?:
table | nil(optional): The item metadata.
Returns the amount of the specified item the player has in their inventory.
Example
local itemCount = exports.it_bridge:GetItemCount('paper')
print(itemCount)HasItem
exports.it_bridge:HasItem(item, amount, metadata)- item:
string: The item name. - count:
number: The amount of items. - metadata?:
table | nil(optional): The item metadata.
Checks if the player has the specified amount of items. Returns true if the player has the items, false otherwise.
Example
local hasItem = exports.it_bridge:HasItem('paper', 10)
print(hasItem)GetItemLabel
exports.it_bridge:GetItemLabel(item)- item:
string: The item name.
Returns the label of the specified item.
Example
local label = exports.it_bridge:GetItemLabel('paper')
print(label)