mirror of
https://github.com/darksaid98/overextended.github.io.git
synced 2026-12-02 22:22:46 +00:00
new inventory client exports
This commit is contained in:
1 parent
22edfded40
commit
1d8dd5c06d
10 files changed
+1945
-1760
No files matched your search
@@ -0,0 +1,12 @@
|
|||||||
|
Get the total item count for all items in the player's inventory with the given name and metadata.
|
||||||
|
|
||||||
|
```lua
|
||||||
|
exports.ox_inventory:GetItemCount(itemName, metadata, strict)
|
||||||
|
```
|
||||||
|
|
||||||
|
- itemName: `string`
|
||||||
|
- metadata?: `table`
|
||||||
|
- strict?: `boolean`
|
||||||
|
- Strictly match metadata properties, otherwise use partial matching.
|
||||||
|
|
||||||
|
**Returns:** `number?`
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
Get all items in the player's inventory.
|
||||||
|
|
||||||
|
```lua
|
||||||
|
exports.ox_inventory:GetPlayerItems()
|
||||||
|
```
|
||||||
|
|
||||||
|
**Returns:** `table`
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
Get the maximum carry weight of the player's inventory.
|
||||||
|
|
||||||
|
```lua
|
||||||
|
exports.ox_inventory:GetPlayerMaxWeight()
|
||||||
|
```
|
||||||
|
|
||||||
|
**Returns:** `number`
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
Get the total weight of all items in the player's inventory.
|
||||||
|
|
||||||
|
```lua
|
||||||
|
exports.ox_inventory:GetPlayerWeight()
|
||||||
|
```
|
||||||
|
|
||||||
|
**Returns:** `number`
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
Get a slot id in the player's inventory matching the given name and metadata.
|
||||||
|
|
||||||
|
```lua
|
||||||
|
exports.ox_inventory:GetSlotIdWithItem(itemName, metadata, strict)
|
||||||
|
```
|
||||||
|
|
||||||
|
- itemName: `string`
|
||||||
|
- metadata?: `table`
|
||||||
|
- strict?: `boolean`
|
||||||
|
- Strictly match metadata properties, otherwise use partial matching.
|
||||||
|
|
||||||
|
**Returns:** `number?`
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
Get all slot ids in the player's inventory matching the given name and metadata.
|
||||||
|
|
||||||
|
```lua
|
||||||
|
exports.ox_inventory:GetSlotIdsWithItem(itemName, metadata, strict)
|
||||||
|
```
|
||||||
|
|
||||||
|
- itemName: `string`
|
||||||
|
- metadata?: `table`
|
||||||
|
- strict?: `boolean`
|
||||||
|
- Strictly match metadata properties, otherwise use partial matching.
|
||||||
|
|
||||||
|
**Returns:** `number[]?`
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
Get data for a slot in the player's inventory matching the given name and metadata.
|
||||||
|
|
||||||
|
```lua
|
||||||
|
exports.ox_inventory:GetSlotWithItem(itemName, metadata, strict)
|
||||||
|
```
|
||||||
|
|
||||||
|
- itemName: `string`
|
||||||
|
- metadata?: `table`
|
||||||
|
- strict?: `boolean`
|
||||||
|
- Strictly match metadata properties, otherwise use partial matching.
|
||||||
|
|
||||||
|
**Returns:** `table?`
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
Get data all slots in the player's inventory matching the given name and metadata.
|
||||||
|
|
||||||
|
```lua
|
||||||
|
exports.ox_inventory:GetSlotsWithItem(itemName, metadata, strict)
|
||||||
|
```
|
||||||
|
|
||||||
|
- itemName: `string`
|
||||||
|
- metadata?: `table`
|
||||||
|
- strict?: `boolean`
|
||||||
|
- Strictly match metadata properties, otherwise use partial matching.
|
||||||
|
|
||||||
|
**Returns:** `table[]?`
|
||||||
+9
-9
@@ -15,25 +15,25 @@
|
|||||||
"typecheck": "tsc"
|
"typecheck": "tsc"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@algolia/client-search": "^4.14.2",
|
"@algolia/client-search": "^4.17.0",
|
||||||
"@docusaurus/core": "^2.2.0",
|
"@docusaurus/core": "^2.4.0",
|
||||||
"@docusaurus/preset-classic": "^2.2.0",
|
"@docusaurus/preset-classic": "^2.4.0",
|
||||||
"@mdx-js/react": "^1.6.22",
|
"@mdx-js/react": "^1.6.22",
|
||||||
"clsx": "^1.2.1",
|
"clsx": "^1.2.1",
|
||||||
"prism-react-renderer": "^1.3.5",
|
"prism-react-renderer": "^1.3.5",
|
||||||
"prismjs": "^1.29.0",
|
"prismjs": "^1.29.0",
|
||||||
"react": "^17.0.2",
|
"react": "^17.0.2",
|
||||||
"react-dom": "^17.0.2",
|
"react-dom": "^17.0.2",
|
||||||
"react-icons": "^4.6.0"
|
"react-icons": "^4.8.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@docusaurus/module-type-aliases": "^2.2.0",
|
"@docusaurus/module-type-aliases": "^2.4.0",
|
||||||
"@docusaurus/theme-classic": "2.0.0-beta.21",
|
"@docusaurus/theme-classic": "2.0.0-beta.21",
|
||||||
"@docusaurus/types": "2.0.0-beta.21",
|
"@docusaurus/types": "2.0.0-beta.21",
|
||||||
"@tsconfig/docusaurus": "^1.0.6",
|
"@tsconfig/docusaurus": "^1.0.7",
|
||||||
"@types/node": "^18.11.9",
|
"@types/node": "^18.16.5",
|
||||||
"@types/react": "^18.0.25",
|
"@types/react": "^18.2.6",
|
||||||
"typescript": "^4.9.3"
|
"typescript": "^4.9.5"
|
||||||
},
|
},
|
||||||
"browserslist": {
|
"browserslist": {
|
||||||
"production": [
|
"production": [
|
||||||
|
|||||||
Generated
+1855
-1751
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user