mirror of
https://github.com/darksaid98/overextended.github.io.git
synced 2026-12-02 06:28:54 +00:00
formatting and typos
This commit is contained in:
1 parent
75698216e0
commit
724c7e356d
99 files changed
+515
-305
No files matched your search
@@ -8,37 +8,37 @@ Crafting locations, items and their ingredients are defined in [data/crafting.lu
|
||||
|
||||
```lua
|
||||
{
|
||||
items = {
|
||||
{
|
||||
name = 'lockpick',
|
||||
ingredients = {
|
||||
garbage = 3,
|
||||
WEAPON_HAMMER = 0.1
|
||||
},
|
||||
duration = 5000,
|
||||
count = 3,
|
||||
metadata = { durability = 20 }
|
||||
items = {
|
||||
{
|
||||
name = 'lockpick',
|
||||
ingredients = {
|
||||
garbage = 3,
|
||||
WEAPON_HAMMER = 0.1
|
||||
},
|
||||
duration = 5000,
|
||||
count = 3,
|
||||
metadata = { durability = 20 }
|
||||
},
|
||||
{
|
||||
name = 'garbage',
|
||||
ingredients = {
|
||||
cola = 1
|
||||
},
|
||||
metadata = { description = 'An empty soda can.', weight = 20, image = 'trash_can' }
|
||||
},
|
||||
},
|
||||
{
|
||||
name = 'garbage',
|
||||
ingredients = {
|
||||
cola = 1
|
||||
},
|
||||
metadata = { description = 'An empty soda can.', weight = 20, image = 'trash_can' }
|
||||
points = {
|
||||
vec3(-1147.083008, -2002.662109, 13.180260),
|
||||
},
|
||||
zones = {
|
||||
{
|
||||
coords = vec3(-1146.2, -2002.05, 13.2),
|
||||
size = vec3(3.8, 1.05, 0.15),
|
||||
distance = 1.5,
|
||||
rotation = 315.0,
|
||||
},
|
||||
},
|
||||
},
|
||||
points = {
|
||||
vec3(-1147.083008, -2002.662109, 13.180260),
|
||||
},
|
||||
zones = {
|
||||
{
|
||||
coords = vec3(-1146.2, -2002.05, 13.2),
|
||||
size = vec3(3.8, 1.05, 0.15),
|
||||
distance = 1.5,
|
||||
rotation = 315.0,
|
||||
},
|
||||
},
|
||||
blip = { id = 566, colour = 31, scale = 0.8 },
|
||||
blip = { id = 566, colour = 31, scale = 0.8 },
|
||||
},
|
||||
```
|
||||
|
||||
@@ -51,9 +51,9 @@ Crafting locations, items and their ingredients are defined in [data/crafting.lu
|
||||
* value - If 1 or above it's the consume count, if below 1 and above 0 it's the durability consume amount, if
|
||||
set to 0 then the item is required but not consumed.
|
||||
* duration: `number`
|
||||
* Crafting duration in miliseconds.
|
||||
* Crafting duration in milliseconds.
|
||||
* count: `number`
|
||||
* Item amount recieved upon crafting.
|
||||
* Item amount received upon crafting.
|
||||
* metadata: `table`
|
||||
* Metadata applied to the item being crafted.
|
||||
* points: `vector3[]`
|
||||
|
||||
@@ -39,14 +39,14 @@ options for the item.
|
||||
* status?: `table`
|
||||
* Adjust esx_status values after use.
|
||||
* anim?: `table`
|
||||
* Animation that will be played during the progress bar.
|
||||
* dict: `string`
|
||||
* clip: `string`
|
||||
* Animation that will be played during the progress bar.
|
||||
* dict: `string`
|
||||
* clip: `string`
|
||||
* prop?: `table`
|
||||
* Attached prop that will be displayed during the progress bar.
|
||||
* model: `string` or `hash`
|
||||
* pos: `table` (x, y, z)
|
||||
* rot: `table` (x, y, z)
|
||||
* Attached prop that will be displayed during the progress bar.
|
||||
* model: `string` or `hash`
|
||||
* pos: `table` (x, y, z)
|
||||
* rot: `table` (x, y, z)
|
||||
* disable?: `table`
|
||||
* Actions to be disabled during the progress bar
|
||||
* move?: `boolean`
|
||||
@@ -57,11 +57,11 @@ options for the item.
|
||||
* cancel?: `boolean`
|
||||
* If set to true the player canc cancel item use.
|
||||
* add?: `function`(total: `number`)
|
||||
* Function that triggers when recieving an item
|
||||
* Function that triggers when receiving an item
|
||||
* Returns total item count as `total`
|
||||
* remove?: `function`(total: `number`)
|
||||
* Function that triggers when removing an item
|
||||
* Returns total item count as `total`
|
||||
* Function that triggers when removing an item
|
||||
* Returns total item count as `total`
|
||||
* buttons?: `table`
|
||||
* label: `string`
|
||||
* action: `function`(slot: `number`)
|
||||
@@ -147,8 +147,8 @@ A modified burger item, which gives you notifications on add and remove argument
|
||||
|
||||
## Making the item usable
|
||||
|
||||
- If you are using ESX, you can continue using `ESX.RegisterUsableItem`.
|
||||
- If you are using QBCore, you can continue using `QBCore.Functions.CreateUseableItem`.
|
||||
* If you are using ESX, you can continue using `ESX.RegisterUsableItem`.
|
||||
* If you are using QBCore, you can continue using `QBCore.Functions.CreateUseableItem`.
|
||||
|
||||
Using the built-in system is more secure and provides much more functionality.
|
||||
|
||||
|
||||
@@ -2,5 +2,5 @@
|
||||
title: Guides
|
||||
---
|
||||
|
||||
Providing examples and explaining certain inventory API into more detail.
|
||||
Providing examples and explaining certain inventory API into more detail.
|
||||
If you have trouble understanding how some of the API works check out our [**_example resource_**](https://github.com/overextended/ox_inventory_examples).
|
||||
@@ -72,10 +72,12 @@ Targets and model are only available when using a targeting resource like ox_tar
|
||||
## Register during runtime
|
||||
|
||||
Shops can be added using `exports.ox_inventory:RegisterShop` on the server, however they cannot utilise any client-only features.
|
||||
|
||||
- Blips, markers, and zones will not be created.
|
||||
- Must use "locations" and not "targets" to define each shop using the archetype.
|
||||
|
||||
**Example:**
|
||||
|
||||
```lua
|
||||
exports.ox_inventory:RegisterShop('TestShop', {
|
||||
name = 'Test shop',
|
||||
|
||||
@@ -34,6 +34,7 @@ Firstly, we need to define the stashes properties.
|
||||
## Example
|
||||
|
||||
Below the value is hardset, but it could be loaded from the database (especially if there are unknown fields, i.e. owner)
|
||||
|
||||
```lua
|
||||
-- Server
|
||||
local stash = {
|
||||
@@ -55,6 +56,7 @@ exports.ox_inventory:openInventory('stash', {id='42wallabyway', owner=property.o
|
||||
```
|
||||
|
||||
The following sample is based on esx_property's db data.
|
||||
|
||||
```lua
|
||||
-- Server
|
||||
local properties
|
||||
|
||||
Reference in new issue
Block a user