SetDurability
Sets the durability on an item found by the findBy search options.
- inv:
number
orstring
- findBy:
table
- name?
string
- name?
- itemHash?
string
- itemHash?
- slot?
number
- slot?
- quantity?
number
- quantity?
- meta?
ItemMetaData
- meta?
- 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)