# Configuration

## Static Blackmarkets

You can easily add new static blackmarket by following this template

{% code title="config.lua \[49-123]" fullWidth="false" %}

```lua
Config.Locations = {
    ["*PED NAME*"] = {
        password = "*PASSWORD*", -- Set to nil if no password is preffered
        ped = {
            pos = vector3(320.6819763183594, -1028.0440673828125, 29.228120803833),
            heading = 180.0,
            model = "a_m_m_genfat_01",
            animation = {
                dict = "mini@strip_club@idles@bouncer@base",
                anim = "base",
            }
        },
        text = ("[~b~%s~s~]"):format("E"),
        startTab = 'pistols',
        key = "E",
        tabs = {
            {
                name = 'pistols',
                label = 'Pistoler'
            },
            {
                name = 'rifles',
                label = 'Gevär'
            },
            {
                name = 'smg',
                label = 'SMG'
            }
        },
        items = {
            {
                tab = 'pistols',
                name = 'pistol',
                tag = 'Pistol',
                level = 0,
                label = 'Glock 45',
                price = 2000,
                desc = 'Glock 45, wäw coolt',
                image = 'https://upload.wikimedia.org/wikipedia/commons/thumb/b/b4/Glock_17_MOD_45154998_%28Transparent%29.png/1200px-Glock_17_MOD_45154998_%28Transparent%29.png'
            },

            {
                tab = 'pistols',
                name = 'pistol2',
                tag = 'Pistol2',
                level = 1,
                label = 'Glock 45',
                price = 2000,
                desc = 'Glock 45, wäw coolt!!!',
                image = 'https://upload.wikimedia.org/wikipedia/commons/thumb/b/b4/Glock_17_MOD_45154998_%28Transparent%29.png/1200px-Glock_17_MOD_45154998_%28Transparent%29.png'
            },

            {
                tab = 'rifles',
                name = 'ak47',
                tag = 'Gevär',
                label = 'AK-47',
                level = 0,
                price = 5000,
                desc = 'Stort gevär...',
                image = 'https://upload.wikimedia.org/wikipedia/commons/thumb/f/f8/AK-47.png/1024px-AK-47.png'
            },

            {
                tab = 'smg',
                name = 'uzi',
                tag = 'SMG',
                level = 0,
                label = 'UZI',
                price = 4000,
                desc = 'EW',
                image = 'https://upload.wikimedia.org/wikipedia/commons/8/8c/Uzi-nobg.png'
            }
        }
    },
}
```

{% endcode %}

## Blackmarket Skill/Level

To enable or disable the build in level system you can easily change the `UseBuiltInSystem` variable.

When the built system is enabled it will not use the GetSkill and AddLevel functions but it's own functions.

{% code title="config.lua \[13-21]" %}

```lua
Config.GetBlackmarketSkill = {
    UseBuiltInSystem = true, -- If you want everything purchasable put level = 0 on every item
    GetSkill = function()
        return exports['skillsystem']:GetCurrentSkill('Crime').Current
    end,
    AddLevel = function()
        return exports['skillsystem']:AddCurrentSkill('Crime').Current + 33.0
    end
}
```

{% endcode %}

## Discord Logs

To configure the logs you can easily do so by only changing the Webhooks. If you wan't to change anything more advanced you can do so in my [library](https://github.com/Force-Developing/force_lib/releases) on the Server/`lib.Funcs:SendDiscordMessage` function

{% code title="config.lua \[4-11]" %}

```
Config.Logs = {
    Webhooks = {
        Market = "",
        Darkweb = "",
        Darkchat = "",
        CheatingLogs = ""
    },
}
```

{% endcode %}

## Combined Menus

Combined menu is where you can access the Darkchat and Darkweb(Dynamic Blackmarket) at the same time.

{% code title="config.lua \[31-47]" %}

```lua
Config.CombinedMenu = {
    Command = {
        Use = true,
        CommandName = "darkweb",
        restricted = function()
            return true -- Return true if no restriction otherwise use export etc
        end
    },

    Positions = {
        Use = true,
        InteractKey = "E",
        Locations = {
            vector3(314.5265808105469, -1031.9354248046875, 29.20723724365234)
        }
    },
}
```

{% endcode %}

## Darkweb/Dynamic Blackmarket

Configure interactions, props, uploadable items, positions and alot more here!

{% code title="config.lua \[201-277]" %}

```lua
Config.Market = {
    Command = {
        Use = true,
        CommandName = "blackmarket",
        restricted = function()
            return true -- Return true if no restriction otherwise use export etc
        end
    },

    Positions = {
        Use = true,
        InteractKey = "E",
        Locations = {
            vector3(310.339111328125, -1029.554931640625, 29.20805549621582)
        }
    },

    UploadAbleItems = {
        {
            label = 'Glock 45',
            item = 'pistol'
        },
        {
            label = 'AK-47',
            item = 'ak47'
        },
        {
            label = 'Dyrknings kit',
            item = 'lockpick'
        }
    },

    Objects = {
        ["small"] = {
            before = "prop_cs_box_step",
            after = "prop_cs_clothes_box"
        },
        ["medium"] = {
            before = "prop_cs_rub_box_01",
            after = "prop_horo_box_02"
        },
        ["large"] = {
            before = "prop_box_wood05a",
            after = "prop_box_wood05b"
        },
    },

    Destinations = {
        vector3(315.869384765625, -1032.1666259765625, 29.20696640014648)
    },

    PickUpKey = "E", -- Choose from client/keys.lua in my LIB
    TimeBeforeRemoval = 60, -- Seconds
    PickupInfo = {
        Animation = {
            dict = "mini@repair",
            anim = "fixing_a_ped"
        },
        Time = 5000 -- This value multiplies by the amount of items the player buys
    },

    SendProps = {
        "prop_news_disp_02a_s",
        "prop_news_disp_01a",
        "prop_news_disp_02a",
        "prop_news_disp_02b",
        "prop_news_disp_02c",
        "prop_news_disp_02d",
        "prop_news_disp_02e",
        "prop_news_disp_03a",
        "prop_news_disp_03c",
        "prop_news_disp_05a",
        "prop_news_disp_06a",
        "prop_postbox_01a",
        "prop_postbox_ss_01a",
    }
}
```

{% endcode %}

## Darkchat

{% code title="config.lua \[279-309]" %}

```
Config.Encro = {
    PoliceTracking = {
        Enable = false,
        WhitelistedJobs = {
            "police"
        }
    },
    Command = {
        Use = true,
        CommandName = "encro",
        restricted = function()
            return true -- Return true if no restriction otherwise use export etc
        end
    },

    Positions = {
        Use = true,
        InteractKey = "E",
        Locations = {
            vector3(312.24285888671875, -1028.7650146484375, 29.20768928527832)
        }
    },

    UseRandomDigitsAfter = true,
    RandomStartNames = {
        "Anonymous",
        "ForceOnTop"
    },
    MessageRemoval = 86400, -- Seconds (Time before message automatically removes itself from the chat)
    NameChangeCooldown = 259200 -- Seconds (259200 == 3 days)
}
```

{% endcode %}


---

# Agent Instructions: 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:

```
GET https://docs.forcedevelopments.com/resources/force-blackmarket/configuration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
