addItem

Bridge.addItem(inventoryName, item, count, metadata)

Arguments

  • inventoryName (string): The name of the inventory.

  • item (string): The item to add.

  • count (number): The quantity of the item.

  • metadata (table, optional): Additional metadata for the item.

Returns

  • success (boolean): Whether the item was successfully added.

Example Usage

local success = Bridge.addItem("playerInventory", "apple", 10)

print("Item Added: " .. tostring(success))

Return Structure

If item is added successfully:

true

If item is not added successfully:

false

Last updated