# Config

```lua
Config = {}

------------
-- Zones
------------
Config.CoreName = "qb-core" -- Your qb-core folder name
Config.PoliceOnline = true -- Need's police oline to sell drugs?
Config.JobPolice = 'police' -- Job Police
Config.AmountPolice = 0 -- Amount of police needed to sell drugs
Config.Dispatch = "ps-dispatch" -- "ps-dispatch" or "cd_dispatch"
Config.Inventory = "qb" -- "qb" or "ox"

------------
-- Commands
------------

Config.CommandSellWeed  = { Enable = true, Command = 'sellweed'}  
Config.CommandSellCoke  = { Enable = true, Command = 'sellcoke'}
Config.CommandSellOpium = { Enable = true, Command = 'sellopium'}
Config.CommandSellMeta  = { Enable = true, Command = 'sellmeta'}

------------
-- Zones
------------
-- ====== Weed
Config.BlipWeed = {
    Enable = true,
    Icon = 437,
    Scale = 0.8,
    Colour = 2,
    Name = "Sell Weed",
}

Config.SellingWeed = {
    Enable = true, -- Enable selling Weed?
    zona = vector3(99.4, -1936.57, 20.8), -- Zone
    distance = 150, -- Distance
    percentageIgnore = 10, -- 10% Buyer ignore the sell and call cops
    RewardType = "cash", -- "cash" or "markedbills"
    AmountOfSellWeed = {
        Min = 1,
        Max = 5,
    },
    ItemsWeed = {
        [1] = {item = 'package-weed-bad-ql', price = math.random(5,10)}, 
        [2] = {item = 'package-weed-med-ql', price = math.random(25,50)},
        [3] = {item = 'package-weed-max-ql', price = math.random(75,180)},
        -- You can add more here
    }
}

-- ====== Coke
Config.BlipCoke = {
    Enable = true,
    Icon = 437,
    Scale = 0.8,
    Colour = 5,
    Name = "Sell Coke",
}

Config.SellingCoke = {
    Enable = true,  -- Enable selling Coke?
    zona = vector3(328.21, -2035.65, 20.92), -- Zone
    distance = 150, -- Distance
    percentageIgnore = 10, -- 10% Buyer ignore the sell and call cops
    RewardType = "cash", -- "cash" or "markedbills"
    AmountOfSellCoke = {
        Min = 1,
        Max = 5,
    },
    ItemsCoke = {
        [1] = {item = 'package-coke-bad-ql', price = math.random(5,10)}, 
        [2] = {item = 'package-coke-med-ql', price = math.random(25,50)},
        [3] = {item = 'package-coke-max-ql', price = math.random(75,180)},
    }
}

-- ====== Opium
Config.BlipOpium = {
    Enable = true,
    Icon = 437,
    Scale = 0.8,
    Colour = 56,
    Name = "Sell Opium",
}

Config.SellingOpium = {
    Enable = true, -- Enable selling Opium?
    zona = vector3(1281.97, -1733.7, 52.53), -- Zone
    distance = 150, -- Distance
    percentageIgnore = 10, -- 10% Buyer ignore the sell and call cops
    RewardType = "cash", -- "cash" or "markedbills"
    AmountOfSellOpium = {
        Min = 1,
        Max = 5,
    },
    ItemsOpium = {
        [1] = {item = 'package-opium-bad-ql', price = math.random(5,10)}, 
        [2] = {item = 'package-opium-med-ql', price = math.random(25,50)},
        [3] = {item = 'package-opium-max-ql', price = math.random(75,180)},
    }
}

-- ====== Meth
Config.BlipMeth = {
    Enable = true,
    Icon = 437,
    Scale = 0.8,
    Colour = 58,
    Name = "Sell Meth",
}

Config.SellingMeta = {
    Enable = true, -- Enable selling Meth?
    zona = vector3(1373.52, -1534.22, 56.18), -- Zone
    distance = 350, -- Distance
    percentageIgnore = 10, -- 10% Buyer ignore the sell and call cops
    RewardType = "cash", -- "cash" or "markedbills"
    AmountOfSellMeta = {
        Min = 1,
        Max = 5,
    },
    ItemsMeta = {
        [1] = {item = 'package-meth-bad-ql', price = math.random(5,10)}, 
        [2] = {item = 'package-meth-med-ql', price = math.random(25,50)},
        [3] = {item = 'package-meth-max-ql', price = math.random(75,180)},
    }
}

------------
-- Language
------------

Config["Language"] = {
    ["Notificaction"] = {
        ["Longe"] = "You are far way.",
        ["VendaErva"] = "Active weed sale.",
        ["VendaCoca"] = "Active cocaine sale.",
        ["VendaOpio"] = "Active opium sales.",
        ["VendaMeta"] = "Active methamphetamine sales.",
        ["EsPolicia"] = "The buyer has seen you before, they know you're a cop!",
        ["SaisteZona"] = "You moved far away and the buyer was no longer interested.",
        ["SemInteresse"] = "The buyer was not interested.",
        ["AlreadyInteracted"] = "You already interacted with him",
        ["NadaParaVender"] = "You have nothing to sell.",
        ["NotEnough"] = "You don't have enough quantity of %s", -- %s is the item name
        ["ChamarPolicia"] = "The buyer is calling the police!",
        ["YouGot"] = "You got: $",
        ["NoPolice"] = "There are not enough police.",
        ["VendaErvaDesligada"] = "Disabled weed sale.",
        ["VendaCocaDesligada"] = "Disabled cocaine sale.",
        ["VendaOpioDesligada"] = "Disabled opium sales.",
        ["VendaMetaDesligada"] = "Disabled methamphetamine sales.",
    },
    ["ProgressBars"] ={
        ["Selling"] = "Selling drugs...",
    },
    ["HelpText"] = {
        ["SellWeed"] = "[E] - Sell Weed",
        ["SellCoke"] = "[E] - Sell Coke",
        ["SellOpium"] = "[E] - Sell Opium",
        ["SellMeta"] = "[E] - Sell Meta",
    }
}



function AlertCops()
    if Config.Dispatch == 'cd_dispatch' then
        local data = exports['cd_dispatch']:GetPlayerInfo()
        TriggerServerEvent('cd_dispatch:AddNotification', {
            job_table = {'police'}, 
            coords = data.coords,
            title = '10-15 - Selling Drugs',
            message = 'A '..data.sex..' selling drugs '..data.street, 
            flash = 0,
            unique_id = tostring(math.random(0000000,9999999)),
            blip = {
                sprite = 156, 
                scale = 1.2, 
                colour = 1,
                flashes = false, 
                text = '911 - Mugging In Progress',
                time = (5*60*1000),
                sound = 1,
            }
        })
    elseif Config.Dispatch == 'ps-dispatch' then
        local playerPos = GetEntityCoords(PlayerPedId(), true)
        exports["ps-dispatch"]:CustomAlert({
            coords = playerPos,
            message = "911 - Selling Drugs",
            dispatchCode = "10-15 Mugging",
            description = "Selling Drugs",
            gender = true,
            radius = 0,
            sprite = 156,
            color = 1,
            scale = 1.2,
            length = 3,
        })
    end
end
```


---

# 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://mscripts.gitbook.io/docs/qbcore/illegal/qb-drug-selling/config.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.
