mirror of
https://github.com/darksaid98/overextended.github.io.git
synced 2026-12-01 14:38:50 +00:00
inventory type tweaks
This commit is contained in:
1 parent
a3ebfc8537
commit
1afcdd80ae
16 files changed
+18
-18
No files matched your search
@@ -33,8 +33,8 @@ By returning `false`, you can cancel the action and revert the inventory state.
|
||||
|
||||
- source: `number`
|
||||
- action: `'move'` or `'stack'` or `'swap'` or `'give'`
|
||||
- fromInventory: `number` or `string`
|
||||
- toInventory: `number` or `string`
|
||||
- fromInventory: `table` or `string` or `number`
|
||||
- toInventory: `table` or `string` or `number`
|
||||
- fromType: `string`
|
||||
- toType: `string`
|
||||
- fromSlot: `table`
|
||||
|
||||
@@ -4,7 +4,7 @@ Returns the amount a player can hold based on available weight.
|
||||
exports.ox_inventory:CanCarryAmount(inv, item)
|
||||
```
|
||||
|
||||
* inv: `string` or `number`
|
||||
* inv: `table` or `string` or `number`
|
||||
* item: `table` or `string`
|
||||
* Can be array to check multiple items.
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ The function checks for inventory weight and available slots.
|
||||
exports.ox_inventory:CanCarryItem(inv, item, count, metadata)
|
||||
```
|
||||
|
||||
* inv: `string` or `number`
|
||||
* inv: `table` or `string` or `number`
|
||||
* item `table` or `string`
|
||||
* Can be array of items.
|
||||
* count: `number`
|
||||
|
||||
@@ -4,7 +4,7 @@ Returns if inventory can carry specified weight and free inventory weight.
|
||||
exports.ox_inventory:CanCarryWeight(inv, weight)
|
||||
```
|
||||
|
||||
* inv: `string` or `number`
|
||||
* inv: `table` or `string` or `number`
|
||||
* weight: `number`
|
||||
|
||||
Example:
|
||||
|
||||
@@ -4,7 +4,7 @@ Returns true if the item swap is possible based on inventory weight.
|
||||
exports.ox_inventory:CanSwapItem(inv, firstItem, firstItemCount, testItem, testItemCount)
|
||||
```
|
||||
|
||||
* inv: `string` or `number`
|
||||
* inv: `table` or `string` or `number`
|
||||
* firstItem: `string`
|
||||
* firstItemCount: `number`
|
||||
* testItem: `string`
|
||||
|
||||
@@ -4,5 +4,5 @@ Clears the specified inventory. The `keep` argument is either a string or an arr
|
||||
exports.ox_inventory:ClearInventory(inv, keep)
|
||||
```
|
||||
|
||||
* inv: `string` or `number`
|
||||
* inv: `table` or `string` or `number`
|
||||
* keep?: `string` or `string[]`
|
||||
@@ -5,4 +5,4 @@ Returns the player's currently equipped weapon as a table.
|
||||
exports.ox_inventory:GetCurrentWeapon(inv)
|
||||
```
|
||||
|
||||
* inv: `string` or `number`
|
||||
* inv: `table` or `string` or `number`
|
||||
@@ -4,7 +4,7 @@ Returns the item from the specified inventory.
|
||||
exports.ox_inventory:GetItem(inv, item, metadata, returnsCount)
|
||||
```
|
||||
|
||||
* inv: `string` or `number`
|
||||
* inv: `table` or `string` or `number`
|
||||
* item: `table` or `string`
|
||||
* Can be items array.
|
||||
* metadata?: `any`
|
||||
|
||||
@@ -4,6 +4,6 @@ Returns the number of slots the specified item is in, the item's total count and
|
||||
exports.ox_inventory:GetItemSlots(inv, item, metadata)
|
||||
```
|
||||
|
||||
* inv: `string` or `number`
|
||||
* inv: `table` or `string` or `number`
|
||||
* item: `table` or `string`
|
||||
* metadata?: `table`
|
||||
@@ -5,7 +5,7 @@ Returns the specified slot data as a table.
|
||||
exports.ox_inventory:GetSlot(inv, slot)
|
||||
```
|
||||
|
||||
* inv: `string` or `number`
|
||||
* inv: `table` or `string` or `number`
|
||||
* slot: `number`
|
||||
|
||||
**Example:**
|
||||
|
||||
@@ -4,7 +4,7 @@ Searches an inventory for a specified item.
|
||||
exports.ox_inventory:Search(inv, search, item, metadata)
|
||||
```
|
||||
|
||||
* inv: `string` or `number`
|
||||
* inv: `table` or `string` or `number`
|
||||
* search: `string`
|
||||
* item: `table` or `string`
|
||||
* metadata?: `table` or `string`
|
||||
|
||||
@@ -6,7 +6,7 @@ Can be used for repairing weapons.
|
||||
exports.ox_inventory:SetDurability(inv, slot, durability)
|
||||
```
|
||||
|
||||
* inv: `string` or `number`
|
||||
* inv: `table` or `string` or `number`
|
||||
* slot: `number`
|
||||
* durability: `number`
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ Sets the maximum weight available for an inventory.
|
||||
exports.ox_inventory:SetMaxWeight(inv, maxWeight)
|
||||
```
|
||||
|
||||
* inv: `string` or `number` or `table`
|
||||
* inv: `table` or `string` or `number`
|
||||
* maxWeight: `number`
|
||||
|
||||
**Example:**
|
||||
|
||||
@@ -4,7 +4,7 @@ Sets metadata on the specified slot.
|
||||
ox_inventory:SetMetadata(inv, slot, metadata)
|
||||
```
|
||||
|
||||
* inv: `string` or `number`
|
||||
* inv: `table` or `string` or `number`
|
||||
* slot: `number`
|
||||
* metadata: `table`
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ Sets the number of slots available for an inventory.
|
||||
exports.ox_inventory:SetSlotCount(inv, slots)
|
||||
```
|
||||
|
||||
* inv: `string` or `number` or `table`
|
||||
* inv: `table` or `string` or `number`
|
||||
* slots: `number`
|
||||
|
||||
**Example:**
|
||||
|
||||
@@ -4,7 +4,7 @@ Swaps slots in specified inventories.
|
||||
exports.ox_inventory:SwapSlots(fromInventory, toInventory, slot1, slot2)
|
||||
```
|
||||
|
||||
* fromInventory: `any`
|
||||
* toInventory: `any`
|
||||
* fromInventory: `table` or `string` or `number`
|
||||
* toInventory: `table` or `string` or `number`
|
||||
* slot1: `number`
|
||||
* slot2: `number`
|
||||
Reference in new issue
Block a user