mirror of
https://github.com/darksaid98/overextended.github.io.git
synced 2026-12-02 14:38:50 +00:00
fix oddities
This commit is contained in:
1 parent
77666c92fb
commit
14609569d7
1 file changed
+13
-15
@@ -1,19 +1,6 @@
|
|||||||
import { Tabs, Tab } from 'nextra-theme-docs';
|
import { Tabs, Tab } from 'nextra-theme-docs';
|
||||||
import { Callout } from 'nextra/components';
|
import { Callout } from 'nextra/components';
|
||||||
|
|
||||||
```lua
|
|
||||||
local itemNames
|
|
||||||
ESX.RegisterServerCallback('crafting:itemNames', function(source, cb)
|
|
||||||
if not itemNames then
|
|
||||||
itemNames = {}
|
|
||||||
for item, data in pairs(exports.ox_inventory:Items()) do
|
|
||||||
itemNames[item] = data.label
|
|
||||||
end
|
|
||||||
end
|
|
||||||
cb(itemNames)
|
|
||||||
end)
|
|
||||||
```
|
|
||||||
|
|
||||||
## setPlayerInventory
|
## setPlayerInventory
|
||||||
|
|
||||||
Creates and sets the player's inventory.
|
Creates and sets the player's inventory.
|
||||||
@@ -114,6 +101,19 @@ exports.ox_inventory:Items()
|
|||||||
|
|
||||||
The following snippet can be used in crafting resources such as okokCrafting or core_crafting, rather than querying the database.
|
The following snippet can be used in crafting resources such as okokCrafting or core_crafting, rather than querying the database.
|
||||||
|
|
||||||
|
```lua
|
||||||
|
local itemNames
|
||||||
|
ESX.RegisterServerCallback('crafting:itemNames', function(source, cb)
|
||||||
|
if not itemNames then
|
||||||
|
itemNames = {}
|
||||||
|
for item, data in pairs(exports.ox_inventory:Items()) do
|
||||||
|
itemNames[item] = data.label
|
||||||
|
end
|
||||||
|
end
|
||||||
|
cb(itemNames)
|
||||||
|
end)
|
||||||
|
```
|
||||||
|
|
||||||
## AddItem
|
## AddItem
|
||||||
|
|
||||||
Adds an item into the specified inventory.
|
Adds an item into the specified inventory.
|
||||||
@@ -713,8 +713,6 @@ For a use case example on this function check out the written [Guide](../../../G
|
|||||||
|
|
||||||
## CreateTemporaryStash
|
## CreateTemporaryStash
|
||||||
|
|
||||||
# CreateTemporaryStash
|
|
||||||
|
|
||||||
Creates a temporary stash which will be removed after some time.
|
Creates a temporary stash which will be removed after some time.
|
||||||
|
|
||||||
```lua
|
```lua
|
||||||
|
|||||||
Reference in new issue
Block a user