New Feature
Here’s how to configure my script.
Step 1 : Configuring Exportable Items
To add new craft items to the exports, edit the kr_craft_v2\config\config.lua
file. In the Config.ExportableItems
section, you can add crafts or assign them an ID, such as “food” or “weapons”:
Config.ExportableItems = {
["weapon_pistol"] = {
id = "arme",
label = "Pistolet",
description = "Un pistolet classique.",
craftTime = 15,
ingredients = {
{item = "scrapmetal", label = "Feraille métallique", quantity = 50, image = "scrapmetal.png"},
{item = "aluminium", label = "Aluminium", quantity = 6, image = "aluminium.png"},
{item = "steel", label = "Acier", quantity = 3, image = "steel.png"}
}
},
["weapon_carbinerifle"] = {
id = "food",
label = "Carabine",
description = "Une carabine puissante.",
craftTime = 30,
ingredients = {
{item = "scrapmetal", label = "Feraille métallique", quantity = 70, image = "scrapmetal.png"},
{item = "aluminium", label = "Aluminium", quantity = 10, image = "aluminium.png"},
{item = "steel", label = "Acier", quantity = 5, image = "steel.png"}
}
}
}
Step 2 : Export to a new, separate script
To do this, you'll need to include the following line in the client or server script:
exports['kr_craft_v2']:openExportableUI("test")
.
Additionally, add this line to your script's fxmanifest.lua
:
@kr_craft_v2/client/craft_cl.lua
.
Replace "test"
with the ID you configured beforehand.
Now, you,re ready to configure the script. It's your turn!
Last updated