Skip to content

Commit

Permalink
Bump docs version
Browse files Browse the repository at this point in the history
Add new it-drugs features
  • Loading branch information
AllRoundJonU committed Oct 10, 2024
1 parent 32ac5bb commit 089c872
Show file tree
Hide file tree
Showing 7 changed files with 248 additions and 65 deletions.
7 changes: 6 additions & 1 deletion pages/_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@
"type": "separator",
"title": "Scripts"
},
"it-drugs": "🌱・it-drugs"
"it-drugs": {
"title": "🌱・it-drugs",
"theme": {
"footer": false
}
}
}

6 changes: 6 additions & 0 deletions pages/it-drugs/_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@
"theme": {
"footer": false
}
},
"common-errors": {
"title": "❓・Common Errors",
"theme": {
"footer": false
}
}
}

73 changes: 15 additions & 58 deletions pages/it-drugs/adjustments/processing-tables.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -147,65 +147,22 @@ The chance in percent that the production of an item can go wrong, which means t

---

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

---

<AccordionGroup>
<Accordion title="Processin table configuration template">
```lua copy
['uniqe_table_id'] = {
type = 'weed',
model = 'bkr_prop_weed_table_01a', -- Exanples: bkr_prop_weed_table_01a, bkr_prop_meth_table01a, bkr_prop_coke_table01a
recipes = {
-- Here you can add as many recipes as you want
}
<Accordion title="Processin table configuration template">
```lua copy
['uniqe_table_id'] = {
type = 'weed',
model = 'bkr_prop_weed_table_01a', -- Exanples: bkr_prop_weed_table_01a, bkr_prop_meth_table01a, bkr_prop_coke_table01a
recipes = {
-- Here you can add as many recipes as you want
}
```
</Accordion>
<Accordion title="Reciepe configuration template">
**With Animation:**
```lua copy
['uniqe_recipe_id'] = {
label = 'Recipe name', -- name of the recipe in the menu
showIngrediants = true, -- true or false
ingrediants = {
['ingrediant_one'] = ingrediant_one_amount,
['ingrediant_two'] = ingrediant_one_amount,
},
outputs = {
['output_one'] = output_one_amount,
},
processTime = 5,
failChance = 15,
animation = { -- Optional you also can delete this
dict = 'anim@gangops@facility@servers@bodysearch@',
anim = 'player_search',
}
},
```
**Without Animation:**
```lua copy
['uniqe_recipe_id'] = {
label = 'Recipe name', -- name of the recipe in the menu
showIngrediants = true, -- true or false
ingrediants = {
['ingrediant_one'] = ingrediant_one_amount,
['ingrediant_two'] = ingrediant_one_amount,
},
outputs = {
['output_one'] = output_one_amount,
},
processTime = 5,
failChance = 15,
},
```
</Accordion>
</AccordionGroup>
}
```
</Accordion>

51 changes: 51 additions & 0 deletions pages/it-drugs/common-errors.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
title: it-drugs - Common Errors
description: Common errors and their solutions
---

import { Callout } from '@components/Callout'
import { Steps } from 'nextra/components'
import ExternLink from '@components/ExternLink'

# Common Errors
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).

<Callout type="info">
This page is still under construction.
If you have any errors that are not listed here, please let us know in the [Discord](https://discord.it-scripts.com).
</Callout>

## General Errors

```ansi
 attempt to index a nil value (global 'lib')
```
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.
Make sure to start the ox_lib script before the it-drugs script.

## Database Errors


## Animation Error

```ansi
 attempt to index a nil value (field 'animation')
```

If you get this error that means you are using **1.2.4** of the script.
We would recommend updating to the latest version of the script. This will fix the error.
<ExternLink href="https://docs.it-scripts.com/it-drugs/update#v124-to-13x"></ExternLink>

However, if you want to fix it manually, you can do the following:

<Steps>
### Open the `config.lua` file.
### Search for `Config.ProcessingTables`.
### Add the following lines to every recipe in every processing tables:
```lua
animation = {
dict = 'anim@gangops@facility@servers@bodysearch@',
anim = 'player_search',
},
```
</Steps>
10 changes: 8 additions & 2 deletions pages/it-drugs/tipps-and-tricks/_meta.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
{
"add-required-items": {
"title": "Add Required Items",
"additional-plant-settings": {
"title": "Additional Plant Settings",
"theme": {
"footer": false
}
},
"additional-processing-settings": {
"title": "Additional Processing Settings",
"theme": {
"footer": false
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
---
title: it-drugs - Required Items
description: A guide explaining how to add required items to a plant.
title: it-drugs - Additional Plant Settings
description: How to add additional settings to the plant system.
---

import { Callout } from '@components/Callout'

# Add required items
# Additional Plant Settings

## Add required items
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.
To add the feature the following code must be added to each plant.

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

## Full example
### Full example

```lua
['weed_lemonhaze_seed'] = {
Expand Down
156 changes: 156 additions & 0 deletions pages/it-drugs/tipps-and-tricks/additional-processing-settings.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
---
title: it-drugs - Additional Processing Settings
description: How to add additional settings to the processing system.
---

import { Steps } from 'nextra/components'
import ExternLink from '@components/ExternLink'
import { IconExternalLink } from '@tabler/icons-react'
import Accordion from '@components/Accordion'
import AccordionGroup from '@components/AccordionGroup'

# Additional Processing Settings

## Add custom animation
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

<Steps>
### Get your animation
A good resource to find animation is:
<ExternLink
href="https://forge.plebmasters.de/animations"
manualTitle="Pleb Masters: Forge - GTA V Animations List | Data Browser | Search and Preview Tool"
icon={IconExternalLink} >
</ExternLink>

### Add the animation to the Config
Add the following code to the recipe you want to change the animation for:
```lua copy
animation = {
dict = 'you animation dict', -- Animation dict
anim = 'your animation name', -- Animation name
}
```

**Example:**
```lua
animation = {
dict = 'anim@gangops@facility@servers@bodysearch@', -- Animation dict
anim = 'player_search', -- Animation name
}
```
</Steps>

<Accordion title="Full Example">
```lua
['weed_processing_table'] = {
type = 'weed',
model = 'bkr_prop_weed_table_01a', -- Exanples: bkr_prop_weed_table_01a, bkr_prop_meth_table01a, bkr_prop_coke_table01a
recipes = {
['joint'] = {
label = 'Joint',
showIngrediants = true,
ingrediants = {
['weed_lemonhaze'] = 3,
['paper'] = 1
},
outputs = {
['joint'] = 2
},
processTime = 5,
failChance = 15,
animation = {
dict = 'anim@gangops@facility@servers@bodysearch@',
anim = 'player_search',
}
},
}
}
```
</Accordion>

## Add particles
A new feature with version **v1.3.0** is the possibility to add particles to a recipe. This can be done via the Config.

<Steps>
### Get your particle
A good resource to find particles is:
<ExternLink
href="https://www.vespura.com/fivem/particle-list/"
manualTitle="Particles List"
icon= {IconExternalLink} >
</ExternLink>

### Add the particle to the Config
Add the following code to the recipe you want to add the particle to:
```lua copy
particlefx = {
dict = 'your dict name',
particle = 'your particle name',
color = {r = 255, g = 255, b = 255},
offset = {x = 0.0, y = 0, z = 0},
scale = 0.5,
},
```

---

```lua
color = {r = 255, g = 255, b = 255},
```
The color of the particle, each value can be between 0 and 255 and represents the RGB color space.

---

```lua
offset = {x = 0.0, y = 0, z = 0},
```

The offset of the particle, this can be used to move the particle to a different position.
Due to the fact that some particles are not centered, it is recommended to play around with the values.
If you are using the default table props provided by the script, you can use the following values:


```lua copy
offset = {x = 0.0, y = -1.5, z = 1.0},
```

---

```lua
scale = 0.5,
```
The scale of the particle, this can be used to make the particle bigger or smaller.

</Steps>

<Accordion title="Full Example">
```lua
['weed_processing_table'] = {
type = 'weed',
model = 'bkr_prop_weed_table_01a', -- Exanples: bkr_prop_weed_table_01a, bkr_prop_meth_table01a, bkr_prop_coke_table01a
recipes = {
['joint'] = {
label = 'Joint',
showIngrediants = true,
ingrediants = {
['weed_lemonhaze'] = 3,
['paper'] = 1
},
outputs = {
['joint'] = 2
},
processTime = 5,
failChance = 15,
particlefx = {
dict = 'scr_ar_planes',
particle = 'scr_ar_trail_smoke_slow',
color = {r = 255, g = 255, b = 153},
offset = {x = 0.0, y = -1.5, z = 1.0},
scale = 0.5,
},
},
}
}
```
</Accordion>

0 comments on commit 089c872

Please sign in to comment.