> For the complete documentation index, see [llms.txt](https://theftdev.gitbook.io/theftdev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://theftdev.gitbook.io/theftdev/theftdev-scripts/resources/crafting-v2/configuration.md).

# Configuration

```lua
Config = Config or {}

Config.Command = "opencrafting"     -- Only admins
Config.Distance = 1.5
Config.CraftingRadius = 20.0
Config.Persistence = {
    UpdateInterval = 1000,        -- ms between server persistence ticks
    ResumeNotify = true,          -- show a notification when a session is restored on login
}

Config.CraftingLocations = {
    [1] = {
        Location = vector3(1208.44, -3115.11, 5.54),
        Radius = 20.0,
        WhiteList = false,
        WhiteListGang = false,
        WhiteListJob = { "police", "sheriff", "mechanic", },
        WhiteListGangName = { "ballas", "vagos", },
    },
    -- Add as many locations as you want / Copy Paste
}

Config.PedModelCoords = {
    {x = 1208.74, y = -3116.09, z = 5.54, h = 56.82},
}

Config.CraftingExtras = {
    ShowPedModel = true,
    ShowMarker = true,
    PedModel = "a_m_m_og_boss_01",
    MarkerId = 1,
    MarkerColor = { r= 50, g= 200, b= 160 },
}

Config.UseCustomNotify = false
Config.CustomNotify = function()
    -- Use your own custom export
end

Config.Lang = {
    ["openmenu"] = "Press ~INPUT_CONTEXT~ to open Crafting Menu",
    ["successful"] = "You successfully crafted ",
    ["missing_items"] = "You do not have enough materials! Missing: ",
    ["already_crafting"] = "You are already crafting an item.",
    ["invalid_location"] = "You are not at a valid crafting station.",
    ["ready_to_collect"] = "Your crafting is complete. Collect it at the station.",
    ["nothing_to_collect"] = "There is nothing ready to collect.",
    ["session_restored"] = "Your crafting session has been restored.",
}

Config.WeaponList = {
    [1] = {
        Label = "Assault Rifle",                    -- Item Label
        CraftingItem = "weapon_assaultrifle",       -- Item name
        Amount = 1,                                 -- Amount of how much you get after crafting
        Duration = 2*10000,                         -- 20sek
        RequiredItems = {                           -- Add as many as you want
            { Item = "metalscrap", Label = "Metalscrap", Amount = 30 },
            { Item = "steel", Label = "Steel", Amount = 15 },
            { Item = "rubber", Label = "Rubber", Amount = 15 },
            { Item = "plastic", Label = "Plastic", Amount = 15 },
            { Item = "iron", Label = "Iron", Amount = 15 },
            { Item = "electronickit", Label = "Electronickit", Amount = 15 },
            { Item = "cryptostick", Label = "Cryptostick", Amount = 15 },
            { Item = "copper", Label = "Copper", Amount = 30 },
            { Item = "lockpick", Label = "Lockpick", Amount = 15 },
            { Item = "aluminum", Label = "Aluminum", Amount = 15 },
            { Item = "glass", Label = "Glass", Amount = 15 },
        }
    },
    [2] = {
        Label = "Pistol",
        CraftingItem = "weapon_pistol", Amount = 1,
        Duration = 2*10000,
        RequiredItems = {
            { Item = "metalscrap", Label = "Metalscrap", Amount = 30 },
            -- { Item = "steel", Label = "Steel", Amount = 15 },
            -- { Item = "rubber", Label = "Rubber", Amount = 15 },
        }
    },
    [3] = {
        Label = "AP Pistol",
        CraftingItem = "weapon_appistol", Amount = 1,
        Duration = 2*10000,
        RequiredItems = {
            { Item = "metalscrap", Label = "Metalscrap", Amount = 30 },
            { Item = "steel", Label = "Steel", Amount = 15 },
            { Item = "rubber", Label = "Rubber", Amount = 15 },
            { Item = "plastic", Label = "Plastic", Amount = 15 },
            { Item = "iron", Label = "Iron", Amount = 15 },
            { Item = "electronickit", Label = "Electronickit", Amount = 15 },
        }
    },
    -- Add more weapon items here
}

-- Extras List
Config.ExtraList = {
    [1] = {
        Label = "Pistol Ammo",
        CraftingItem = "pistol_ammo", Amount = 10,
        Duration = 2*10000,
        RequiredItems = {
            { Item = "metalscrap", Label = "Metalscrap", Amount = 10 },
            { Item = "plastic", Label = "Plastic", Amount = 5 }
        }
    },
    [2] = {
        Label = "SMG Ammo",
        CraftingItem = "smg_ammo", Amount = 10,
        Duration = 2*10000,
        RequiredItems = {
            { Item = "metalscrap", Label = "Metalscrap", Amount = 10 },
            { Item = "plastic", Label = "Plastic", Amount = 5 }
        }
    },
    [3] = {
        Label = "Shotgun Ammo",
        CraftingItem = "shotgun_ammo", Amount = 5,
        Duration = 2*10000,
        RequiredItems = {
            { Item = "metalscrap", Label = "Metalscrap", Amount = 10 },
            { Item = "plastic", Label = "Plastic", Amount = 5 }
        }
    },
    -- Add more extra items here
}

```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://theftdev.gitbook.io/theftdev/theftdev-scripts/resources/crafting-v2/configuration.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
