Config
Here’s how to configure my script.
Step 1 : Configuring Crafting Points
To add new crafting points, modify the kr_craft\config\config.lua
file and add a configuration similar to this:
{
coords = vector3(-338.763, -2444.587, 6.3),
items = {
["weapon_pistol"] = {
label = "Pistolet",
description = "Un pistolet classique.",
craftTime = 15,
job = "police" -- if you don't use it remove the line
key = "water" -- if you don't use it remove the line
failure = "0" -- if you don't use it remove the line
ingredients = {
{item = "scrapmetal", label = "Feraille métallique", quantity = 5, image = "scrapmetal.png"},
{item = "aluminium", label = "Aluminium", quantity = 6, image = "aluminium.png"},
{item = "steel", label = "Acier", quantity = 3, image = "steel.png"}
}
},
["weapon_pistol50"] = {
label = "Calibre 50",
description = "Un cal50 prêt à en découdre.",
craftTime = 20,
ingredients = {
{item = "scrapmetal", label = "Feraille métallique", quantity = 8, image = "scrapmetal.png"},
{item = "aluminium", label = "Aluminium", quantity = 10, image = "aluminium.png"},
{item = "steel", label = "Acier", quantity = 5, image = "steel.png"}
}
},
}
},
Step 2 : Managing Item Images
If you want to add images for new items:
Place the images in the
kr_craft\html\images
folder.In
kr_craft\config\config.lua
, make sure the image name matches the item name. For example, for an item namedweapon_pistol
, name the imageweapon_pistol.png
.
Step 3 : Customizing Crafts
To modify the crafting time, label, description, or ingredients of an item, simply update the corresponding values in kr_craft\config\config.lua
. For example, to add an ingredient:
{item = "nom_de_l_item", label = "Nom de l'item", quantity = 8, image = "nom_de_l_image.png"},
Now, you,re ready to configure the script. It's your turn!
Last updated