From 9fbca335482a8134145128d27428e07e5d4bf03b Mon Sep 17 00:00:00 2001 From: Jon Date: Tue, 21 Jan 2025 23:47:53 +0100 Subject: [PATCH] Update it-crafting entry --- .../adjustments/crafting-points.mdx | 24 +- .../adjustments/crafting-tables.mdx | 24 +- pages/it-crafting/adjustments/zones.mdx | 8 + pages/it-crafting/common-errors.mdx | 13 + pages/it-crafting/installation.mdx | 973 +++--------------- pages/it-crafting/tipps-and-tricks/_meta.json | 20 + .../additional-recipe-settings.mdx | 159 +++ .../tipps-and-tricks/easy-zone-creation.mdx | 44 + .../tipps-and-tricks/webhook-setup.mdx | 57 + 9 files changed, 479 insertions(+), 843 deletions(-) create mode 100644 pages/it-crafting/common-errors.mdx create mode 100644 pages/it-crafting/tipps-and-tricks/_meta.json create mode 100644 pages/it-crafting/tipps-and-tricks/additional-recipe-settings.mdx create mode 100644 pages/it-crafting/tipps-and-tricks/easy-zone-creation.mdx create mode 100644 pages/it-crafting/tipps-and-tricks/webhook-setup.mdx diff --git a/pages/it-crafting/adjustments/crafting-points.mdx b/pages/it-crafting/adjustments/crafting-points.mdx index 54062cd..15962fc 100644 --- a/pages/it-crafting/adjustments/crafting-points.mdx +++ b/pages/it-crafting/adjustments/crafting-points.mdx @@ -48,10 +48,23 @@ This is the name of the item to which this configuration is bound. The item can --- ```lua -zone = vector3(2.0, 1.0, 2.0), +target = { + size = vector3(3.5, 1.0, 1.0), + rotation = 0.0, + drawSprite = true, + interactDistance = 1.5, +}, ``` As soon as the player places the table, the script will create a zone around the table. The zone is used to interact with the table. -The zone has to be defined as a vector3. The first value is the width, the second value is the length, and the third value is the height of the zone. +Here you can change some settings for the target zone. +- `size` * - The size of the target zone. The first value is the width, the second value is the length, and the third value is the height of the zone. +- `rotation` * - The rotation of the target zone. The value is in degrees. If you dont want to use this you can remove it. +- `drawSprite` * - If set to `true`, a sprite will be displayed at the target zone. If set to `false`, no sprite will be displayed. +- `interactDistance` * - The distance at which the player can interact with the table. + +`*` All these values are optional and can be removed if you dont want to use them. But please do not remove the target table. + +--- ```lua model = 'v_res_tre_table2' @@ -106,7 +119,12 @@ Each table can theoretically have an infinite number of recipes, how exactly a r ```lua copy ['simple_crafting_point'] = { - zone = vector3(2.0, 1.0, 2.0), + target = { + size = vector3(1.0, 1.0, 1.0), + rotation = 0.0, + drawSprite = true, + interactDistance = 1.5, + }, label = 'Weed Processing Table', -- Label for the table model = 'v_res_tre_table2', -- Exanples: freeze_it-scripts_empty_table, freeze_it-scripts_weed_table, freeze_it-scripts_coke_table, freeze_it-scripts_meth_table restricCrafting = { diff --git a/pages/it-crafting/adjustments/crafting-tables.mdx b/pages/it-crafting/adjustments/crafting-tables.mdx index 9617188..fd50e56 100644 --- a/pages/it-crafting/adjustments/crafting-tables.mdx +++ b/pages/it-crafting/adjustments/crafting-tables.mdx @@ -48,10 +48,23 @@ This is the name of the item to which this configuration is bound. The item can --- ```lua -zone = vector3(2.0, 1.0, 2.0), +target = { + size = vector3(3.5, 1.0, 1.0), + rotation = 0.0, + drawSprite = true, + interactDistance = 1.5, +}, ``` As soon as the player places the table, the script will create a zone around the table. The zone is used to interact with the table. -The zone has to be defined as a vector3. The first value is the width, the second value is the length, and the third value is the height of the zone. +Here you can change some settings for the target zone. +- `size` * - The size of the target zone. The first value is the width, the second value is the length, and the third value is the height of the zone. +- `rotation` * - The rotation of the target zone. The value is in degrees. If you dont want to use this you can remove it. +- `drawSprite` * - If set to `true`, a sprite will be displayed at the target zone. If set to `false`, no sprite will be displayed. +- `interactDistance` * - The distance at which the player can interact with the table. + +`*` All these values are optional and can be removed if you dont want to use them. But please do not remove the target table. + +--- ```lua model = 'v_res_tre_table2' @@ -130,7 +143,12 @@ If you use the ox_inventory, please use the following template to add the tables ```lua copy ['simple_crafting_table'] = { - zone = vector3(2.0, 1.0, 2.0), + target = { + size = vector3(1.0, 1.0, 1.0), + rotation = 0.0, + drawSprite = true, + interactDistance = 1.5, + }, label = 'Weed Processing Table', -- Label for the table model = 'v_res_tre_table2', -- Exanples: freeze_it-scripts_empty_table, freeze_it-scripts_weed_table, freeze_it-scripts_coke_table, freeze_it-scripts_meth_table restricCrafting = { diff --git a/pages/it-crafting/adjustments/zones.mdx b/pages/it-crafting/adjustments/zones.mdx index 1f4ca2e..3f8bf16 100644 --- a/pages/it-crafting/adjustments/zones.mdx +++ b/pages/it-crafting/adjustments/zones.mdx @@ -6,6 +6,7 @@ description: Here, it is possible to create zones that can have an effect on cer import { Callout } from '@components/Callout' import Accordion from '@components/Accordion' import AccordionGroup from '@components/AccordionGroup' +import ExternLink from '@components/ExternLink' # 🗺️・Zones First, let's take a look at zone management. @@ -88,6 +89,13 @@ The blip is always displayed in the middle of the zone. --- +If you want to create the zones more easily please take a look at the following guide: + + + +--- + ```lua copy diff --git a/pages/it-crafting/common-errors.mdx b/pages/it-crafting/common-errors.mdx new file mode 100644 index 0000000..82bcf35 --- /dev/null +++ b/pages/it-crafting/common-errors.mdx @@ -0,0 +1,13 @@ +--- +title: it-drugs - Common Errors +description: Common errors and their solutions +--- +import { Callout } from '@components/Callout' +import { Steps, Cards, Card } from 'nextra/components' +import ExternLink from '@components/ExternLink' +import { IconBrandGithub, IconBrandDiscord, IconCode, IconTag } from '@tabler/icons-react'; + +# 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). + +**Seems like there are no errors yet. 🎉** \ No newline at end of file diff --git a/pages/it-crafting/installation.mdx b/pages/it-crafting/installation.mdx index e0c03e9..8995d9c 100644 --- a/pages/it-crafting/installation.mdx +++ b/pages/it-crafting/installation.mdx @@ -75,7 +75,7 @@ ensure inventory --Then we start all the dependencies ensure ox_lib -ensure ox_target or qb-target +ensure ox_target -- Only if you are using a target system -- Run it-crafting here along with its dependencies ensure it-crafting @@ -119,886 +119,185 @@ DROP TABLE IF EXISTS `it_crafting_tables`; If you use qbcore + ox_inventory, you must add the items inside ox_inventory for the items using to work. Here you will find a series of selected items in different extensions for different inventories, select the option that suits your server, remember to check if your inventory works with this script! +Also for this script you can use all items on your server to craft items with the crafting table. +You can configure everything int the it-crafting config file. - + ```sql copy INSERT INTO `items` (`name`, `label`, `weight`, `rare`, `can_remove`) VALUES - ('watering_can', 'Watering Can', 500, 0, 1), - ('fertilizer', 'fertilizer', 500, 0, 1), - ('advanced_fertilizer', 'Advanced Fertilizer', 500, 0, 1), - ('liquid_fertilizer', 'Liquid Fertilizer', 200, 0, 1), - ('weed_lemonhaze_seed', 'Weed Lemonhaze Seed', 20, 0, 1), - ('weed_lemonhaze', 'Weed Lemonhaze', 20, 0, 1), - ('weed_og_seed', 'Weed OG Seed', 20, 0, 1), - ('weed_og', 'weed Og', 20, 0, 1), - ('weed_purple_haze_seed', 'Weed Purple Haze Seed', 20, 0, 1), - ('weed_purple_haze', 'weed Purple Haze', 20, 0, 1), - ('weed_white_widow_seed', 'Weed White Widow Seed', 20, 0, 1), - ('weed_white_widow', 'weed White Widow', 20, 0, 1), - ('weed_blueberry_seed', 'Weed Blueberry Seed', 20, 0, 1), - ('weed_blueberry', 'weed Blueberry', 20, 0, 1), - ('coca_seed', 'Coca Seed', 20, 0, 1), - ('coca', 'Coca', 20, 0, 1), - ('paper', 'Paper', 20, 0, 1), - ('nitrous', 'nitrous', 20, 0, 1), - ('cocaine', 'cocaine', 20, 0, 1), - ('joint', 'joint', 20, 0, 1), - ('weed_processing_table', 'weed_processing_table', 1000, 0, 1), - ('cocaine_processing_table', 'cocaine_processing_table', 1000, 0, 1) - ; + ('scrapmetal', 'Scrap Metal', 500, 0, 1), + ('lockpick', 'Lockpick', 100, 0, 1), + ('cloth', 'Cloth', 200, 0, 1), + ('scissors', 'Scissors', 250, 0, 1), + ('bandage', 'Bandage', 50, 0, 1), + ('simple_crafting_table', 'Simple Crafting Table', 2000, 0, 1) + ; ``` ```lua copy - watering_can = { - name = "watering_can", - label = 'Watering can', - weight = 500, + scrapmetal = { + name = "scrapmetal", + label = 'Scrap Metal', + weight = 500, type = 'item', - image = "watering_can.png", + image = "scrapmetal.png", unique = false, useable = false, shouldClose = false, combinable = nil, - description = 'simple watering can' + description = 'Scrap Metal' }, - fertilizer = { - name = 'fertilizer', - label = 'fertilizer', - weight = 500, - type = 'item', - image = 'fertilizer.png', - unique = false, - useable = false, - shouldClose = false, - combinable = nil, - description = 'fertilizer' - }, - - advanced_fertilizer = { - name = 'advanced_fertilizer', - label = 'Advanced Fertilizer', - weight = 500, - type = 'item', - image = 'advanced_fertilizer.png', - unique = false, - useable = false, - shouldClose = false, - combinable = nil, - description = 'Fertilizer with the litte extra' - }, - - liquid_fertilizer = { - name = "liquid_fertilizer", - label = 'Liquid Fertilizer', - weight = 200, - type = 'item', - image = "liquid_fertilizer.png", - unique = false, - useable = false, - shouldClose = false, - combinable = nil, - description = 'Basicly Water with nutrations' - }, - - weed_lemonhaze_seed = { - name = 'weed_lemonhaze_seed', - label = 'Weed Lemonhaze Seed', - weight = 20, - type = 'item', - image = 'weed_lemonhaze_seed.png', - unique = false, - useable = true, - shouldClose = true, - combinable = nil, - description = 'Weed Lemonhaze Seed' - }, - - weed_lemonhaze = { - name = 'weed_lemonhaze', - label = 'weed lemonhaze', - weight = 20, - type = 'item', - image = 'weed_lemonhaze.png', - unique = false, - useable = false, - shouldClose = false, - combinable = nil, - description = 'Weed Lemonhaze' - }, - - weed_og_seed = { - name = 'weed_og_seed', - label = 'Weed Og Seed', - weight = 20, - type = 'item', - image = 'weed_og_seed.png', - unique = false, - useable = true, - shouldClose = true, - combinable = nil, - description = 'Weed Og Seed' - }, - - weed_og = { - name = 'weed_og', - label = 'weed Og', - weight = 20, - type = 'item', - image = 'weed_og.png', - unique = false, - useable = false, - shouldClose = false, - combinable = nil, - description = 'Weed Og' - }, - - weed_purple_haze_seed = { - name = 'weed_purple_haze_seed', - label = 'Weed Purple Haze Seed', - weight = 20, - type = 'item', - image = 'weed_purple_haze_seed.png', - unique = false, - useable = true, - shouldClose = true, - combinable = nil, - description = 'Weed Purple Haze Seed' - }, - - weed_purple_haze = { - name = 'weed_purple_haze', - label = 'weed Purple Haze', - weight = 20, - type = 'item', - image = 'weed_purple_haze.png', - unique = false, - useable = false, - shouldClose = false, - combinable = nil, - description = 'Weed Purple Haze' - }, - - weed_white_widow_seed = { - name = 'weed_white_widow_seed', - label = 'Weed White Widow Seed', - weight = 20, - type = 'item', - image = 'weed_white_widow_seed.png', - unique = false, - useable = true, - shouldClose = true, - combinable = nil, - description = 'Weed White Widow Seed' - }, - - weed_white_widow = { - name = 'weed_white_widow', - label = 'weed White Widow', - weight = 20, - type = 'item', - image = 'weed_white_widow.png', - unique = false, - useable = false, - shouldClose = false, - combinable = nil, - description = 'Weed white Widow' - }, - - weed_blueberry_seed = { - name = 'weed_blueberry_seed', - label = 'Weed Blueberry Seed', - weight = 20, - type = 'item', - image = 'weed_blueberry_seed.png', - unique = false, - useable = true, - shouldClose = true, - combinable = nil, - description = 'Weed Blueberry Seed' - }, - - weed_blueberry = { - name = 'weed_blueberry', - label = 'weed Blueberry', - weight = 20, - type = 'item', - image = 'weed_blueberry.png', - unique = false, - useable = false, - shouldClose = false, - combinable = nil, - description = 'Weed Blueberry' - }, - - coca_seed = { - name = 'coca_seed', - label = 'coca seed', - weight = 20, - type = 'item', - image = 'coca_seed.png', - unique = false, - useable = true, - shouldClose = true, - combinable = nil, - description = 'Coca Seed' - }, - - coca = { - name = 'coca', - label = 'coca', - weight = 20, - type = 'item', - image = 'coca.png', - unique = false, - useable = false, - shouldClose = true, - combinable = nil, - description = 'Coca' - }, - - paper = { - name = 'paper', - label = 'paper', - weight = 50, - type = 'item', - image = 'paper.png', - unique = false, - useable = false, - shouldClose = false, - combinable = nil, - description = 'Paper' - }, - - nitrous = { - name = 'nitrous', - label = 'nitrous', - weight = 500, - type = 'item', - image = 'nitrous.png', - unique = false, - useable = false, - shouldClose = false, - combinable = nil, - description = 'nitrous' - }, - - cocaine = { - name = 'cocaine', - label = 'cocaine', - weight = 20, - type = 'item', - image = 'cocaine.png', - unique = false, - useable = true, - shouldClose = false, - combinable = nil, - description = 'Small bag of cocaine' - }, - - joint = { - name = 'joint', - label = 'joint', - weight = 10, - type = 'item', - image = 'joint.png', - unique = false, - useable = true, - shouldClose = true, - combinable = nil, - description = 'joint' - }, - - weed_processing_table = { - name = 'weed_processing_table', - label = 'Weed processing table', - weight = 1000, - type = 'item', - image = 'weed_processing_table.png', - unique = false, - useable = true, - shouldClose = true, - combinable = nil, - description = 'Process some weed' - }, - - cocaine_processing_table = { - name = 'cocaine_processing_table', - label = 'cocaine processing table', - weight = 1000, - type = 'item', - image = 'cocaine_processing_table.png', - unique = false, - useable = true, - shouldClose = true, - combinable = nil, - description = 'Process some cocaine' - }, - ``` - - - ```lua copy - ["watering_can"] = { - label = "Watering can", - weight = 500, - stack = false, - close = false, - description = "Simple watering can", - client = { - image = "watering_can.png", - } - }, - - ["fertilizer"] = { - label = "Fertilizer", - weight = 500, - stack = false, - close = false, - description = "Fertilizer", - client = { - image = "fertilizer.png", - } - }, - - ["advanced_fertilizer"] = { - label = "Advanced fertilizer", - weight = 500, - stack = false, - close = false, - description = "Fertilizer with the litte extra", - client = { - image = "advanced_fertilizer.png", - } - }, - - ["liquid_fertilizer"] = { - label = "Liquid Fertilizer", - weight = 200, - stack = false, - close = false, - description = "Basicly Water with nutrations", - client = { - image = "liquid_fertilizer.png", - } - }, - - ["weed_lemonhaze_seed"] = { - label = "Weed Lemonhaze Seed", - weight = 20, - stack = true, - close = true, - description = "Weed Lemonhaze Seed", - client = { - image = "weed_lemonhaze_seed.png", - }, - server = { - export = "it-drugs.useSeed" - } - }, - - ["weed_lemonhaze"] = { - label = "Weed Lemonhaze", - weight = 20, - stack = true, - close = false, - description = "Weed Lemonhaze", - client = { - image = "weed_lemonhaze.png", - }, - }, - - ["weed_og_seed"] = { - label = "Weed Og Seed", - weight = 20, - stack = true, - close = true, - description = "Weed Og Seed", - client = { - image = "weed_og_seed.png", - }, - server = { - export = "it-drugs.useSeed" - } - }, - - ["weed_og"] = { - label = "weed Og", - weight = 20, - stack = true, - close = false, - description = "weed Og", - client = { - image = "weed_og.png", - }, - }, - - ["weed_purple_haze_seed"] = { - label = "Weed Purple Haze Seed", - weight = 20, - stack = true, - close = true, - description = "Weed Purple Haze Seed", - client = { - image = "weed_purple_haze_seed.png", - }, - server = { - export = "it-drugs.useSeed" - } - }, - - ["weed_purple_haze"] = { - label = "weed Purple Haze", - weight = 20, - stack = true, - close = false, - description = "weed Purple Haze", - client = { - image = "weed_purple_haze.png", - }, - }, - - ["weed_white_widow_seed"] = { - label = "Weed White Widow Seed", - weight = 20, - stack = true, - close = true, - description = "Weed White Widow Seed", - client = { - image = "weed_white_widow_seed.png", - }, - server = { - export = "it-drugs.useSeed" - } - }, - - ["weed_white_widow"] = { - label = "weed White Widow", - weight = 20, - stack = true, - close = false, - description = "weed White Widow", - client = { - image = "weed_white_widow.png", - } - }, - - ["weed_blueberry_seed"] = { - label = "Weed Blueberry Seed", - weight = 20, - stack = true, - close = true, - description = "Weed Blueberry Seed", - client = { - image = "weed_blueberry_seed.png", - }, - server = { - export = "it-drugs.useSeed" - } - }, - - ["weed_blueberry"] = { - label = "weed Blueberry", - weight = 20, - stack = true, - close = false, - description = "weed Blueberry", - client = { - image = "weed_blueberry.png", - } - }, - - ["coca_seed"] = { - label = "Coca Seed", - weight = 20, - stack = true, - close = true, - description = "Coca Seed", - client = { - image = "coca_seed.png", - }, - server = { - export = "it-drugs.useSeed" - } - }, - - ["coca"] = { - label = "Coca", - weight = 20, - stack = true, - close = false, - description = "Coca", - client = { - image = "coca.png", - } - }, - - ["paper"] = { - label = "Paper", - weight = 50, - stack = true, - close = false, - description = "Paper", - client = { - image = "paper.png", - } - }, - - ["nitrous"] = { - label = "Nitrous", - weight = 500, - stack = false, - close = false, - description = "Nitrous", - client = { - image = "nitrous.png", - } - }, - - ["weed_processing_table"] = { - label = "Weed Processing Table", - weight = 1000, - stack = false, - close = true, - description = "Process some weed", - client = { - image = "weed_processing_table.png", - }, - server = { - export = "it-drugs.placeProcessingTable" - } - }, - - ["cocaine_processing_table"] = { - label = "Cocaine Processing Table", - weight = 1000, - stack = false, - close = true, - description = "Process some cocaine", - client = { - image = "cocaine_processing_table.png", - }, - server = { - export = "it-drugs.placeProcessingTable" - } - }, - - ["cocaine"] = { - label = "Cocaine", - weight = 20, - stack = true, - close = true, - description = "A little bag of cocaine", - consume = 0, -- ADDED - server = { - export = "it-drugs.takeDrug" - }, - client = { - image = "cocaine.png", - }, - }, - - ["joint"] = { - label = "Joint", - weight = 10, - stack = true, - close = true, - description = "Joint", - consume = 0, -- ADDED - server = { - export = "it-drugs.takeDrug" - }, - client = { - image = "joint.png", - } - }, - ``` - - - ```lua copy - ["watering_can"] = { - name = "watering_can", - label = "Watering can", - type = "item", - weight = 500, - unique = false, - shouldClose = false, - description = "Simple watering can", - image = "watering_can.png", - }, - - ["fertilizer"] = { - name = "fertilizer", - label = "Fertilizer", - type = "item", - weight = 500, - unique = false, - shouldClose = false, - description = "Fertilizer", - image = "fertilizer.png", - }, - - ["advanced_fertilizer"] = { - name = "advanced_fertilizer", - label = "Advanced fertilizer", - type = "item", - weight = 500, + lockpick = { + name = "lockpick", + label = 'Lockpick', + weight = 100, + type = 'item', + image = "lockpick.png", unique = false, + useable = false, shouldClose = false, - description = "Fertilizer with the litte extra", - image = "advanced_fertilizer.png", - }, - - ["liquid_fertilizer"] = { - name = "liquid_fertilizer", - label = "Liquid Fertilizer", - type = "item", + combinable = nil, + description = 'A tool for picking locks' + }, + + cloth = { + name = "cloth", + label = 'Cloth', weight = 200, + type = 'item', + image = "cloth.png", unique = false, + useable = false, shouldClose = false, - description = "Basicly Water with nutrations", - image = "liquid_fertilizer.png", - }, - - ["weed_lemonhaze_seed"] = { - name = "weed_lemonhaze_seed", - label = "Weed Lemonhaze Seed", - type = "item", - weight = 20, - unique = false, - shouldClose = true, - useable = true, - description = "Weed Lemonhaze Seed", - image = "weed_lemonhaze_seed.png", - }, - - ["weed_lemonhaze"] = { - name = "weed_lemonhaze", - label = "Weed Lemonhaze", - type = "item", - weight = 20, - unique = false, - shouldClose = false, - description = "Weed Lemonhaze", - image = "weed_lemonhaze.png", - }, + combinable = nil, + description = 'A piece of cloth' + }, - ["weed_og_seed"] = { - name = "weed_og_seed", - label = "Weed Og Seed", - type = "item", - weight = 20, + scissors = { + name = "scissors", + label = 'Scissors', + weight = 250, + type = 'item', + image = "scissors.png", unique = false, - shouldClose = true, - useable = true, - description = "Weed Og Seed", - image = "weed_og_seed.png", - }, + useable = false, + shouldClose = false, + combinable = nil, + description = 'A tool for cutting' + }, - ["weed_og"] = { - name = "weed_og", - label = "weed Og", - type = "item", - weight = 20, + bandage = { + name = "bandage", + label = 'Bandage', + weight = 50, + type = 'item', + image = "bandage.png", unique = false, + useable = false, shouldClose = false, - description = "weed Og", - image = "weed_og.png", - }, + combinable = nil, + description = 'A bandage for wounds' + }, - ["weed_purple_haze_seed"] = { - name = "weed_purple_haze_seed", - label = "Weed Purple Haze Seed", - type = "item", - weight = 20, + simple_crafting_table = { + name = "simple_crafting_table", + label = 'Simple Crafting Table', + weight = 2000, + type = 'item', + image = "simple_crafting_table.png", unique = false, + useable = false, shouldClose = true, - useable = true, - description = "Weed Purple Haze Seed", - image = "weed_purple_haze_seed.png", + combinable = nil, + description = 'A simple crafting table' + } + ``` + + + ```lua copy + ["scrapmetal"] = { + label = "Scrap Metal", + weight = 500, + stack = false, + close = false, + description = "Scrap Metal", + client = { + image = "scrapmetal.png", + } }, - ["weed_purple_haze"] = { - name = "weed_purple_haze", - label = "weed Purple Haze", - type = "item", - weight = 20, - unique = false, - shouldClose = false, - description = "weed Purple Haze", - image = "weed_purple_haze.png", + ["lockpick"] = { + label = "Lockpick", + weight = 100, + stack = false, + close = false, + description = "A tool for picking locks", + client = { + image = "lockpick.png", + } }, - ["weed_white_widow_seed"] = { - name = "weed_white_widow_seed", - label = "Weed White Widow Seed", - type = "item", - weight = 20, - unique = false, - shouldClose = true, - useable = true, - description = "Weed White Widow Seed", - image = "weed_white_widow_seed.png", + ["cloth"] = { + label = "Cloth", + weight = 200, + stack = false, + close = false, + description = "A piece of cloth", + client = { + image = "cloth.png", + } }, - ["weed_white_widow"] = { - name = "weed_white_widow", - label = "weed White Widow", - type = "item", - weight = 20, - unique = false, - shouldClose = false, - description = "weed White Widow", - image = "weed_white_widow.png", + ["scissors"] = { + label = "Scissors", + weight = 250, + stack = false, + close = false, + description = "A tool for cutting", + client = { + image = "scissors.png", + } }, - ["weed_blueberry_seed"] = { - name = "weed_blueberry_seed", - label = "Weed Blueberry Seed", - type = "item", - weight = 20, - unique = false, - shouldClose = true, - useable = true, - description = "Weed Blueberry Seed", - image = "weed_blueberry_seed.png", + ["bandage"] = { + label = "Bandage", + weight = 50, + stack = false, + close = false, + description = "A bandage for wounds", + client = { + image = "bandage.png", + } }, - ["weed_blueberry"] = { - name = "weed_blueberry", - label = "weed Blueberry", - type = "item", - weight = 20, - unique = false, - shouldClose = false, - description = "weed Blueberry", - image = "weed_blueberry.png", - }, - - ["coca_seed"] = { - name = "coca_seed", - label = "Coca Seed", - type = "item", - weight = 20, - unique = false, - shouldClose = true, - useable = true, - description = "Coca Seed", - image = "coca_seed.png", - }, - - ["coca"] = { - name = "coca", - label = "Coca", - type = "item", - weight = 20, - unique = false, - shouldClose = false, - description = "Coca", - image = "coca.png", - }, - - ["paper"] = { - name = "paper", - label = "Paper", - type = "item", - weight = 50, - unique = false, - shouldClose = false, - description = "Paper", - image = "paper.png", - }, - - ["nitrous"] = { - name = "nitrous", - label = "Nitrous", - type = "item", - weight = 500, - unique = false, - shouldClose = false, - description = "Nitrous", - image = "nitrous.png", - }, - - ["cocaine"] = { - name = "cocaine", - label = "Cocaine", - type = "item", - weight = 20, - unique = false, - shouldClose = true, - useable = true, - description = "Small bag of cocaine", - image = "cocaine.png", - }, - - ["joint"] = { - name = "joint", - label = "Joint", - type = "item", - weight = 10, - unique = false, - shouldClose = true, - useable = true, - description = "Joint", - image = "joint.png", - }, - - ["weed_processing_table"] = { - name = "weed_processing_table", - label = "Weed Processing Table", - type = "item", - weight = 1000, - unique = true, - shouldClose = true, - useable = true, - description = "Process some weed", - image = "weed_processing_table.png", - }, - - ["cocaine_processing_table"] = { - name = "cocaine_processing_table", - label = "Cocaine Processing Table", - type = "item", - weight = 1000, - unique = true, - shouldClose = true, - useable = true, - description = "Process some cocaine", - image = "cocaine_processing_table.png", - }, + ["simple_crafting_table"] = { + label = "Simple Crafting Table", + weight = 2000, + stack = false, + close = false, + description = "A simple crafting table", + client = { + image = "simple_crafting_table.png", + }, + server = { + export = "it-crafting.placeCraftingTable" + } + } ``` ```lua copy - watering_can = { name = 'watering_can', label = 'Watering Can', weight = 100, type = 'item', image = 'watering_can.png', unique = false, useable = false, shouldClose = false, combinable = nil, description = 'Simple watering can' }, - fertilizer = { name = 'fertilizer', label = 'Fertilizer', weight = 100, type = 'item', image = 'fertilizer.png', unique = false, useable = false, shouldClose = true, combinable = nil, description = 'Fertilizer' }, - advanced_fertilizer = { name = 'advanced_fertilizer', label = 'Advanced Fertilizer', weight = 100, type = 'item', image = 'advanced_fertilizer.png', unique = false, useable = false, shouldClose = true, combinable = nil, description = 'Fertilizer with the litte extra' }, - liquid_fertilizer = { name = 'liquid_fertilizer', label = 'Liquid Fertilizer', weight = 100, type = 'item', image = 'liquid_fertilizer.png', unique = false, useable = false, shouldClose = true, combinable = nil, description = 'Basicly Water with nutrations' }, - weed_lemonhaze_seed = { name = 'weed_lemonhaze_seed', label = 'Weed Lemonhaze Seed', weight = 100, type = 'item', image = 'weed_lemonhaze_seed.png', unique = false, useable = false, shouldClose = true, combinable = nil, description = 'Weed Lemonhaze Seed' }, - weed_lemonhaze = { name = 'weed_lemonhaze', label = 'Weed Lemonhaze', weight = 100, type = 'item', image = 'weed_lemonhaze.png', unique = false, useable = false, shouldClose = true, combinable = nil, description = 'Weed Lemonhaze' }, - weed_og_seed = { name = 'weed_og_seed', label = 'Weed Og Seed', weight = 100, type = 'item', image = 'weed_og_seed.png', unique = false, useable = false, shouldClose = true, combinable = nil, description = 'Weed Og Seed' }, - weed_og = { name = 'weed_og', label = 'Weed Og', weight = 100, type = 'item', image = 'weed_og.png', unique = false, useable = false, shouldClose = true, combinable = nil, description = 'Weed Og' }, - weed_purple_haze_seed = { name = 'weed_purple_haze_seed', label = 'Weed Purple Haze Seed', weight = 100, type = 'item', image = 'weed_purple_haze_seed.png', unique = false, useable = false, shouldClose = true, combinable = nil, description = 'Weed Purple Haze Seed' }, - weed_purple_haze = { name = 'weed_purple_haze', label = 'Weed Purple Haze', weight = 100, type = 'item', image = 'weed_purple_haze.png', unique = false, useable = false, shouldClose = true, combinable = nil, description = 'Weed Purple Haze' }, - weed_white_widow_seed = { name = 'weed_white_widow_seed', label = 'Weed White Widow Seed', weight = 100, type = 'item', image = 'weed_white_widow_seed.png', unique = false, useable = false, shouldClose = true, combinable = nil, description = 'Weed White Widow Seed' }, - weed_white_widow = { name = 'weed_white_widow', label = 'Weed White Widow', weight = 100, type = 'item', image = 'weed_white_widow.png', unique = false, useable = false, shouldClose = true, combinable = nil, description = 'Weed White Widow' }, - weed_blueberry_seed = { name = 'weed_blueberry_seed', label = 'Weed Blueberry Seed', weight = 100, type = 'item', image = 'weed_blueberry_seed.png', unique = false, useable = false, shouldClose = true, combinable = nil, description = 'Weed Blueberry Seed' }, - weed_blueberry = { name = 'weed_blueberry', label = 'Weed Blueberry', weight = 100, type = 'item', image = 'weed_blueberry.png', unique = false, useable = false, shouldClose = true, combinable = nil, description = 'Weed Blueberry' }, - coca_seed = { name = 'coca_seed', label = 'Coca Seed', weight = 100, type = 'item', image = 'coca_seed.png', unique = false, useable = false, shouldClose = true, combinable = nil, description = 'Coca Seed' }, - coca = { name = 'coca', label = 'Coca', weight = 100, type = 'item', image = 'coca.png', unique = false, useable = false, shouldClose = true, combinable = nil, description = 'Coca' }, - paper = { name = 'paper', label = 'Paper', weight = 100, type = 'item', image = 'paper.png', unique = false, useable = false, shouldClose = true, combinable = nil, description = 'Use to roll some good stuff' }, - nitrous = { name = 'nitrous', label = 'Nitrous', weight = 100, type = 'item', image = 'nitrous.png', unique = false, useable = false, shouldClose = true, combinable = nil, description = 'Nitrous' }, - cocaine = { name = 'cocaine', label = 'Cocaine', weight = 100, type = 'item', image = 'cocaine.png', unique = false, useable = false, shouldClose = true, combinable = nil, description = 'Small bag of cocaine' }, - joint = { name = 'joint', label = 'Joint', weight = 100, type = 'item', image = 'joint.png', unique = false, useable = false, shouldClose = true, combinable = nil, description = 'High on life' }, - weed_processing_table = { name = 'weed_processing_table', label = 'Weed Processing Table', weight = 100, type = 'item', image = 'weed_processing_table.png', unique = false, useable = false, shouldClose = true, combinable = nil, description = 'Process some weed' }, - cocaine_processing_table = { name = 'cocaine_processing_table', label = 'Cocaine Processing_Table', weight = 100, type = 'item', image = 'cocaine_processing_table.png', unique = false, useable = false, shouldClose = true, combinable = nil, description = 'Process some cocain' }, + scrapmetal = { name = 'scrapmetal', label = 'Scrap Metal', weight = 500, type = 'item', image = 'scrapmetal.png', unique = false, useable = false, shouldClose = false, combinable = nil, description = 'Scrap Metal' }, + lockpick = { name = 'lockpick', label = 'Lockpick', weight = 100, type = 'item', image = 'lockpick.png', unique = false, useable = false, shouldClose = false, combinable = nil, description = 'A tool for picking locks' }, + cloth = { name = 'cloth', label = 'Cloth', weight = 200, type = 'item', image = 'cloth.png', unique = false, useable = false, shouldClose = false, combinable = nil, description = 'A piece of cloth' }, + scissors = { name = 'scissors', label = 'Scissors', weight = 250, type = 'item', image = 'scissors.png', unique = false, useable = false, shouldClose = false, combinable = nil, description = 'A tool for cutting' }, + bandage = { name = 'bandage', label = 'Bandage', weight = 50, type = 'item', image = 'bandage.png', unique = false, useable = false, shouldClose = false, combinable = nil, description = 'A bandage for wounds' }, + simple_crafting_table = { name = 'simple_crafting_table', label = 'Simple Crafting Table', weight = 2000, type = 'item', image = 'simple_crafting_table.png', unique = false, useable = false, shouldClose = false, combinable = nil, description = 'A simple crafting table' } ``` - - Soon... - ## Use Webhooks diff --git a/pages/it-crafting/tipps-and-tricks/_meta.json b/pages/it-crafting/tipps-and-tricks/_meta.json new file mode 100644 index 0000000..f2bdd23 --- /dev/null +++ b/pages/it-crafting/tipps-and-tricks/_meta.json @@ -0,0 +1,20 @@ +{ + "additional-recipe-settings": { + "title": "Additional Recipe Settings", + "theme": { + "footer": false + } + }, + "webhook-setup": { + "title": "Webhook Setup", + "theme": { + "footer": false + } + }, + "easy-zone-creation": { + "title": "Easy Zone Creation", + "theme": { + "footer": false + } + } +} \ No newline at end of file diff --git a/pages/it-crafting/tipps-and-tricks/additional-recipe-settings.mdx b/pages/it-crafting/tipps-and-tricks/additional-recipe-settings.mdx new file mode 100644 index 0000000..17fe253 --- /dev/null +++ b/pages/it-crafting/tipps-and-tricks/additional-recipe-settings.mdx @@ -0,0 +1,159 @@ +--- +title: it-drugs - Recipe Settings +description: How to add additional settings to the recipes. +--- + +import { Callout } from '@components/Callout' +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 Recipe Settings + +## Add custom animation +If you do not want to use the normal animation for a recipe in a recipe, you can also easily change this via the Config + + +### Get your animation +A good resource to find animation is: + + + +### 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 +} +``` + + + +```lua +['lockpick'] = { + label = 'Lockpick', + ingrediants = { + ['scrapmetal'] = {amount = 3, remove = true}, + ['WEAPON_HAMMER'] = {amount = 1, remove = false} + }, + outputs = { + ['lockpick'] = 2 + }, + processTime = 15, + failChance = 15, + showIngrediants = false, + animation = { + dict = 'anim@amb@drug_processors@coke@female_a@idles', + anim = 'idle_a', + }, + skillCheck = { + enabled = true, + difficulty = {'easy', 'easy', 'medium', 'easy'}, + keys = {'w', 'a', 's', 'd'} + } +}, +``` + + +## Add particles + + This feature is not fully implemented and tested yet and may not work as expected. + + +This features allows you to add particles to your recipes. This can be used to make the recipe more interactive. + + +### Get your particle +A good resource to find particles is: + + + +### 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. + + + + +```lua +['lockpick'] = { + label = 'Lockpick', + ingrediants = { + ['scrapmetal'] = {amount = 3, remove = true}, + ['WEAPON_HAMMER'] = {amount = 1, remove = false} + }, + outputs = { + ['lockpick'] = 2 + }, + processTime = 15, + failChance = 15, + showIngrediants = false, + particlefx = { + dict = 'core', + particle = 'ent_amb_torch_fire', + color = {r = 255, g = 255, b = 255}, + offset = {x = 0.0, y = -1.5, z = 1.0}, + scale = 0.5, + }, + skillCheck = { + enabled = true, + difficulty = {'easy', 'easy', 'medium', 'easy'}, + keys = {'w', 'a', 's', 'd'} + } + }, +``` + diff --git a/pages/it-crafting/tipps-and-tricks/easy-zone-creation.mdx b/pages/it-crafting/tipps-and-tricks/easy-zone-creation.mdx new file mode 100644 index 0000000..26a5fdd --- /dev/null +++ b/pages/it-crafting/tipps-and-tricks/easy-zone-creation.mdx @@ -0,0 +1,44 @@ +--- +title: it-crafting - Easy Zone Creation +description: Here you will learn how eays it is to create new crafting-zones for it-drugs. +--- + +import { Callout } from '@components/Callout' + +# Easy Zone Creation +To create a new zone you now can use the `/zone poly` command from ox_lib. + + +Make sure you use `/zone poly` if not you will get the zone in a wrong format at the end and cannot add it to the config. + + +After you have used the command, the following menu should open: + +![creating_zone_menu](/creating_zone_menu.png) + +You can now simply walk through the zone in-game and set points yourself. +As soon as you have finished creating the zone, press [ENTER]. The following menu will now open: + +![save_zone_menu](/save_zone_menu.png) + +Now you can give the zone a name and select the format. + + +YOU MUST SELECT ARRAY FOR FORMAT OTHERWISE THE ZONE WILL NOT HAVE THE CORRECT FORMAT AND CANNOT BE INSERTED INTO THE SCRIPT. + + +Zones will be saved to `ox_lib/created_zones.lua` with your chosen format an will look like this: +```lua +{ + name = poly, + points = { + vec(447.9, -998.8, 25.8), + vec(450.3, -998.2, 25.8), + vec(449.9, -995.5, 25.8), + vec(447.2, -995.6, 25.8), + vec(446.3, -997.9, 25.8), + }, + thickness = 2, +}, +``` +You can now simply copy the points and thickness and paste them into one of the zones in the config of it-crafting. \ No newline at end of file diff --git a/pages/it-crafting/tipps-and-tricks/webhook-setup.mdx b/pages/it-crafting/tipps-and-tricks/webhook-setup.mdx new file mode 100644 index 0000000..932bda9 --- /dev/null +++ b/pages/it-crafting/tipps-and-tricks/webhook-setup.mdx @@ -0,0 +1,57 @@ +--- +title: it-crafting - Webhook Setup +description: With the script, it is also possible to create your own consumable drugs directly. +--- + +import ExternLink from '@components/ExternLink' +import { Callout } from '@components/Callout' +import {IconBrandDiscord} from '@tabler/icons-react' + +# Webhook Setup +With version `1.3.0` of it-drugs the creation of webhooks is changing. From now on the webhooks are set entirely in the file `server/sv_webhooks`. + +```lua +local webhookSettings = { + ['active'] = false, -- Set to true to enable the webhook + ['name'] = 'it-drugs', -- Name for the webhook + ['avatar'] = 'https://i.imgur.com/KvZZn88.png', -- Avatar for the webhook + ['urls'] = { + ['plant'] = nil, --'', -- Webhook URL for plant actions + ['table'] = nil, --'', -- Webhook URL for table actions + ['sell'] = nil, --'', -- Webhook URL for sell actions + ['message'] = nil, --'', -- Webhook URL for messages + } +} +``` + +It is now possible to use your own webhook links for the various individual actions of the user. + +If a valid webhook id is entered and the attribute active is set to true, a webhook message is sent for the corresponding category. + +```lua +local webhookSettings = { + ['active'] = true, -- Set to true to enable the webhook + ['name'] = 'it-drugs', -- Name for the webhook + ['avatar'] = 'https://i.imgur.com/KvZZn88.png', -- Avatar for the webhook + ['urls'] = { + ['plant'] = 'https://discord.com/api/webhooks/**************/*************************', -- Webhook URL for plant actions + ['table'] = nil, --'', -- Webhook URL for table actions + ['sell'] = nil, --'', -- Webhook URL for sell actions + ['message'] = nil, --'', -- Webhook URL for messages + } +} +``` +In this example now the script only sends webhook messages when a user interacts with a plant. + + +Please note that only messages with in the sell and message area will be sent immediately. +The messages for plants and tables are sent every minute all together to prevent Discord from rate limiting your Discord server + + +You don't know how to create Discord webhooks no problem check this article from Discord. + + \ No newline at end of file