Skip to content

Commit 089c872

Browse files
committed
Bump docs version
Add new it-drugs features
1 parent 32ac5bb commit 089c872

File tree

7 files changed

+248
-65
lines changed

7 files changed

+248
-65
lines changed

pages/_meta.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@
2525
"type": "separator",
2626
"title": "Scripts"
2727
},
28-
"it-drugs": "🌱・it-drugs"
28+
"it-drugs": {
29+
"title": "🌱・it-drugs",
30+
"theme": {
31+
"footer": false
32+
}
33+
}
2934
}
3035

pages/it-drugs/_meta.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@
1212
"theme": {
1313
"footer": false
1414
}
15+
},
16+
"common-errors": {
17+
"title": "❓・Common Errors",
18+
"theme": {
19+
"footer": false
20+
}
1521
}
1622
}
1723

pages/it-drugs/adjustments/processing-tables.mdx

Lines changed: 15 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -147,65 +147,22 @@ The chance in percent that the production of an item can go wrong, which means t
147147

148148
---
149149

150-
```lua
151-
animation = {
152-
dict = 'anim@gangops@facility@servers@bodysearch@', -- Animation dict
153-
anim = 'player_search', -- Animation name
154-
}
155-
```
156-
Specifying an animation is optional if no animation is specified, the default animation of the script is used.
157-
So if you want, the complete animation part can be deleted from every recipe.
150+
## Additional Recipe Settings
151+
<ExternLink
152+
href="https://docs.it-scripts.com/it-drugs/tipps-and-tricks/additional-processing-settings">
153+
</ExternLink>
158154

159155
---
160156

161-
<AccordionGroup>
162-
<Accordion title="Processin table configuration template">
163-
```lua copy
164-
['uniqe_table_id'] = {
165-
type = 'weed',
166-
model = 'bkr_prop_weed_table_01a', -- Exanples: bkr_prop_weed_table_01a, bkr_prop_meth_table01a, bkr_prop_coke_table01a
167-
recipes = {
168-
-- Here you can add as many recipes as you want
169-
}
157+
<Accordion title="Processin table configuration template">
158+
```lua copy
159+
['uniqe_table_id'] = {
160+
type = 'weed',
161+
model = 'bkr_prop_weed_table_01a', -- Exanples: bkr_prop_weed_table_01a, bkr_prop_meth_table01a, bkr_prop_coke_table01a
162+
recipes = {
163+
-- Here you can add as many recipes as you want
170164
}
171-
```
172-
</Accordion>
173-
<Accordion title="Reciepe configuration template">
174-
**With Animation:**
175-
```lua copy
176-
['uniqe_recipe_id'] = {
177-
label = 'Recipe name', -- name of the recipe in the menu
178-
showIngrediants = true, -- true or false
179-
ingrediants = {
180-
['ingrediant_one'] = ingrediant_one_amount,
181-
['ingrediant_two'] = ingrediant_one_amount,
182-
},
183-
outputs = {
184-
['output_one'] = output_one_amount,
185-
},
186-
processTime = 5,
187-
failChance = 15,
188-
animation = { -- Optional you also can delete this
189-
dict = 'anim@gangops@facility@servers@bodysearch@',
190-
anim = 'player_search',
191-
}
192-
},
193-
```
194-
**Without Animation:**
195-
```lua copy
196-
['uniqe_recipe_id'] = {
197-
label = 'Recipe name', -- name of the recipe in the menu
198-
showIngrediants = true, -- true or false
199-
ingrediants = {
200-
['ingrediant_one'] = ingrediant_one_amount,
201-
['ingrediant_two'] = ingrediant_one_amount,
202-
},
203-
outputs = {
204-
['output_one'] = output_one_amount,
205-
},
206-
processTime = 5,
207-
failChance = 15,
208-
},
209-
```
210-
</Accordion>
211-
</AccordionGroup>
165+
}
166+
```
167+
</Accordion>
168+

pages/it-drugs/common-errors.mdx

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
title: it-drugs - Common Errors
3+
description: Common errors and their solutions
4+
---
5+
6+
import { Callout } from '@components/Callout'
7+
import { Steps } from 'nextra/components'
8+
import ExternLink from '@components/ExternLink'
9+
10+
# Common Errors
11+
Here you will find common errors and their solutions. If you have any further questions, please feel free to ask in the [Discord](https://discord.it-scripts.com).
12+
13+
<Callout type="info">
14+
This page is still under construction.
15+
If you have any errors that are not listed here, please let us know in the [Discord](https://discord.it-scripts.com).
16+
</Callout>
17+
18+
## General Errors
19+
20+
```ansi
21+
 attempt to index a nil value (global 'lib')
22+
```
23+
If you get this error you either don't have [ox_lib](https://github.com/overextended/ox_lib) installed on your server or you start it after the it-drugs script.
24+
Make sure to start the ox_lib script before the it-drugs script.
25+
26+
## Database Errors
27+
28+
29+
## Animation Error
30+
31+
```ansi
32+
 attempt to index a nil value (field 'animation')
33+
```
34+
35+
If you get this error that means you are using **1.2.4** of the script.
36+
We would recommend updating to the latest version of the script. This will fix the error.
37+
<ExternLink href="https://docs.it-scripts.com/it-drugs/update#v124-to-13x"></ExternLink>
38+
39+
However, if you want to fix it manually, you can do the following:
40+
41+
<Steps>
42+
### Open the `config.lua` file.
43+
### Search for `Config.ProcessingTables`.
44+
### Add the following lines to every recipe in every processing tables:
45+
```lua
46+
animation = {
47+
dict = 'anim@gangops@facility@servers@bodysearch@',
48+
anim = 'player_search',
49+
},
50+
```
51+
</Steps>

pages/it-drugs/tipps-and-tricks/_meta.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
{
2-
"add-required-items": {
3-
"title": "Add Required Items",
2+
"additional-plant-settings": {
3+
"title": "Additional Plant Settings",
4+
"theme": {
5+
"footer": false
6+
}
7+
},
8+
"additional-processing-settings": {
9+
"title": "Additional Processing Settings",
410
"theme": {
511
"footer": false
612
}

pages/it-drugs/tipps-and-tricks/add-required-items.mdx renamed to pages/it-drugs/tipps-and-tricks/additional-plant-settings.mdx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
---
2-
title: it-drugs - Required Items
3-
description: A guide explaining how to add required items to a plant.
2+
title: it-drugs - Additional Plant Settings
3+
description: How to add additional settings to the plant system.
44
---
55

66
import { Callout } from '@components/Callout'
77

8-
# Add required items
8+
# Additional Plant Settings
9+
10+
## Add required items
911
A desired feature is that items are required when an item is planted or harvested, this feature is now available with version <span style={{color: "green"}}>**v1.3.0**</span> but not active by default in the Config.lua.
1012
To add the feature the following code must be added to each plant.
1113

@@ -32,7 +34,7 @@ In each of the 2 categories you can add as many items as you want, the schema yo
3234
Please remember to register all the items you list here in your inventory!
3335
</Callout>
3436

35-
## Full example
37+
### Full example
3638

3739
```lua
3840
['weed_lemonhaze_seed'] = {
Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
---
2+
title: it-drugs - Additional Processing Settings
3+
description: How to add additional settings to the processing system.
4+
---
5+
6+
import { Steps } from 'nextra/components'
7+
import ExternLink from '@components/ExternLink'
8+
import { IconExternalLink } from '@tabler/icons-react'
9+
import Accordion from '@components/Accordion'
10+
import AccordionGroup from '@components/AccordionGroup'
11+
12+
# Additional Processing Settings
13+
14+
## Add custom animation
15+
If you do not want to use the normal animation for a recipe in a processing table, you can also easily change this via the Config
16+
17+
<Steps>
18+
### Get your animation
19+
A good resource to find animation is:
20+
<ExternLink
21+
href="https://forge.plebmasters.de/animations"
22+
manualTitle="Pleb Masters: Forge - GTA V Animations List | Data Browser | Search and Preview Tool"
23+
icon={IconExternalLink} >
24+
</ExternLink>
25+
26+
### Add the animation to the Config
27+
Add the following code to the recipe you want to change the animation for:
28+
```lua copy
29+
animation = {
30+
dict = 'you animation dict', -- Animation dict
31+
anim = 'your animation name', -- Animation name
32+
}
33+
```
34+
35+
**Example:**
36+
```lua
37+
animation = {
38+
dict = 'anim@gangops@facility@servers@bodysearch@', -- Animation dict
39+
anim = 'player_search', -- Animation name
40+
}
41+
```
42+
</Steps>
43+
44+
<Accordion title="Full Example">
45+
```lua
46+
['weed_processing_table'] = {
47+
type = 'weed',
48+
model = 'bkr_prop_weed_table_01a', -- Exanples: bkr_prop_weed_table_01a, bkr_prop_meth_table01a, bkr_prop_coke_table01a
49+
recipes = {
50+
['joint'] = {
51+
label = 'Joint',
52+
showIngrediants = true,
53+
ingrediants = {
54+
['weed_lemonhaze'] = 3,
55+
['paper'] = 1
56+
},
57+
outputs = {
58+
['joint'] = 2
59+
},
60+
processTime = 5,
61+
failChance = 15,
62+
animation = {
63+
dict = 'anim@gangops@facility@servers@bodysearch@',
64+
anim = 'player_search',
65+
}
66+
},
67+
}
68+
}
69+
```
70+
</Accordion>
71+
72+
## Add particles
73+
A new feature with version **v1.3.0** is the possibility to add particles to a recipe. This can be done via the Config.
74+
75+
<Steps>
76+
### Get your particle
77+
A good resource to find particles is:
78+
<ExternLink
79+
href="https://www.vespura.com/fivem/particle-list/"
80+
manualTitle="Particles List"
81+
icon= {IconExternalLink} >
82+
</ExternLink>
83+
84+
### Add the particle to the Config
85+
Add the following code to the recipe you want to add the particle to:
86+
```lua copy
87+
particlefx = {
88+
dict = 'your dict name',
89+
particle = 'your particle name',
90+
color = {r = 255, g = 255, b = 255},
91+
offset = {x = 0.0, y = 0, z = 0},
92+
scale = 0.5,
93+
},
94+
```
95+
96+
---
97+
98+
```lua
99+
color = {r = 255, g = 255, b = 255},
100+
```
101+
The color of the particle, each value can be between 0 and 255 and represents the RGB color space.
102+
103+
---
104+
105+
```lua
106+
offset = {x = 0.0, y = 0, z = 0},
107+
```
108+
109+
The offset of the particle, this can be used to move the particle to a different position.
110+
Due to the fact that some particles are not centered, it is recommended to play around with the values.
111+
If you are using the default table props provided by the script, you can use the following values:
112+
113+
114+
```lua copy
115+
offset = {x = 0.0, y = -1.5, z = 1.0},
116+
```
117+
118+
---
119+
120+
```lua
121+
scale = 0.5,
122+
```
123+
The scale of the particle, this can be used to make the particle bigger or smaller.
124+
125+
</Steps>
126+
127+
<Accordion title="Full Example">
128+
```lua
129+
['weed_processing_table'] = {
130+
type = 'weed',
131+
model = 'bkr_prop_weed_table_01a', -- Exanples: bkr_prop_weed_table_01a, bkr_prop_meth_table01a, bkr_prop_coke_table01a
132+
recipes = {
133+
['joint'] = {
134+
label = 'Joint',
135+
showIngrediants = true,
136+
ingrediants = {
137+
['weed_lemonhaze'] = 3,
138+
['paper'] = 1
139+
},
140+
outputs = {
141+
['joint'] = 2
142+
},
143+
processTime = 5,
144+
failChance = 15,
145+
particlefx = {
146+
dict = 'scr_ar_planes',
147+
particle = 'scr_ar_trail_smoke_slow',
148+
color = {r = 255, g = 255, b = 153},
149+
offset = {x = 0.0, y = -1.5, z = 1.0},
150+
scale = 0.5,
151+
},
152+
},
153+
}
154+
}
155+
```
156+
</Accordion>

0 commit comments

Comments
 (0)