Skip to main content

SetDurability

Sets the durability on an item found by the findBy search options.

  • inv: number or string
  • findBy: table
    • name? string
    • itemHash? string
    • slot? number
    • quantity? number
    • meta? ItemMetaData
  • durability: number

The inv argument can be a number (as player ID) or the inventory uniqueID.

Returns the updated InventoryItem.

exports["avp_inv_4"]:SetDurability(inv, findBy, durability)
Example
local source = source
exports["avp_inv_4"]:SetDurability(source, { name = "axe" }, 100)