Remove internal functions and move external ones

This commit is contained in:
Luke committed 2022-03-26 15:17:51 +01:00
1 parent 82518e769b
commit 49d5315d52
76 files changed
-3

No files matched your search

@@ -0,0 +1,25 @@
Sets durability onto the specified slot.
Can be used for repairing weapons.
```lua
-- inv: string or number
-- slot: number
-- durability: number
exports.ox_inventory:SetDurability(inv, slot, durability)
```
**Example:**
```lua
local ox_inventory = exports.ox_inventory
-- Set the durability of the item in slot 3 of source player's inventory to 100
ox_inventory:SetDurability(source, 3, 100)
-- Set the durability of the source player's current weapon to 100
local weapon = ox_inventory:GetCurrentWeapon(source)
if weapon then
ox_inventory:SetDurability(source, weapon.slot, 100)
end
```