mirror of
https://github.com/darksaid98/overextended.github.io.git
synced 2026-12-01 22:21:48 +00:00
30 lines
476 B
Plaintext
30 lines
476 B
Plaintext
Returns the specified slot data as a table.
|
|
|
|
```lua
|
|
|
|
exports.ox_inventory:GetSlot(inv, slot)
|
|
```
|
|
|
|
* inv: `table` or `string` or `number`
|
|
* slot: `number`
|
|
|
|
**Example:**
|
|
|
|
```lua
|
|
local slot = exports.ox_inventory:GetSlot(source, 1)
|
|
|
|
print(json.encode(slot, {indent=true}))
|
|
--[[
|
|
{
|
|
"weight": 2000,
|
|
"name": "water",
|
|
"metadata": [],
|
|
"slot": 1,
|
|
"label": "Water",
|
|
"close": true,
|
|
"stack": true,
|
|
"count: 4
|
|
}
|
|
]]
|
|
```
|