mirror of
https://github.com/darksaid98/overextended.github.io.git
synced 2026-12-02 14:38:50 +00:00
Remove internal functions and move external ones
This commit is contained in:
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
|
||||
```
|
||||
Reference in new issue
Block a user