m-Scripts
  • m-Scripts Documentation
  • QBCore
    • Jobs
      • 🚗[QB] TunerJob
        • 🛠️Installation
        • ❓Common Questions
        • 🗒️Config
      • 🍞[QB] BeanMachine
        • 🛠️Installation
        • 🗒️Config
      • 🍔[QB] Burgershot
        • 🛠️Installation
        • 🗒️Config
      • 🍈[QB] CoolBeans
        • 🛠️Installation
        • 🗒️Config
      • 🚚[QB] Deliveries
        • 🛠️Installation
        • 📃Config
          • 📃config_functions
      • 🍎[QB] Farming
        • 🛠️Installation
        • 🗒️Config
      • 🐟[QB] Fishing
        • 🛠️Installation
        • 🗒️Config
          • 📄config_diving
          • 📄config_fishingnet
          • 📄config_fishingrod
          • 📄config_functions
          • 📄config_language
          • 📄config_seashells
          • 📄config_tournament
          • 📄config_upgrades
      • 🚛[QB] Garbage
        • 🛠️Installation
        • 🗒️Config
      • 🗝️[QB] GoldRush
        • 🛠️Installation
        • 🗒️Config
      • ⛰️[QB] Hunting
        • 🛠️Installation
        • 🗒️Config
      • 🪵[QB] Lumberjack
        • 🛠️Installation
        • 🗒️Config
      • ⛏️[QB] Mining
        • 🛠️Installation
        • 🗒️Config
      • 🛢️[QB] Oil Factory
        • 🛠️Installation
        • ❓Common Questions
        • 🗒️Config
      • ☕[QB] Pond Coffee
        • 🛠️Installation
        • ❓Common Questions
        • 🗒️Config
      • 🚚[QB] Trucker
        • 🛠️Installation
        • 🗒️Config
          • 📄Functions
          • 📄Language
      • 🥃[QB] Vanilla
        • 🛠️Installation
        • 🗒️Config
      • 🛻[QB] Mechanic Run
        • 🛠️Installation
        • 🗒️Config
      • 🥃[QB] Bahamas
        • 🛠️Installation
        • 📄Config
      • 🔫[QB] Ammunation
        • 🛠️Installation
        • 📄Config
      • 🐟[QB] Pearls
        • 🛠️Installation
        • 📄Config
      • 🔓[QB] Impound
        • 🛠️Installation
        • 📄Config
        • ✅Garages
      • 🚘[QB] Vehicleshop
        • 🛠️Installation
        • 📄Config
          • Functions
          • Job
          • Language
        • ❓Common Questions
    • General
      • 🏕️[QB] Camping
        • 🛠️Installation
        • 🗒️Config
          • Consumables
          • Language
      • 🎄[QB] Christmas
        • 🛠️Installation
        • 🗒️Config
      • 🎃[QB] Halloween
        • 🛠️Installation
        • 🗒️Config
      • 📔[QB] Insurance
        • 🛠️Installation
        • 🖥️Compatibilities
        • 🗒️Config
        • 🔁Server-Exports
      • 🏘️[QB] Vespucci
        • 🛠️Installation
        • 🗒️Config
          • Brewery
          • Digital Den
          • Masquerade
          • Pro Bikes
      • 🏖️[QB] Beach Activities
        • 🛠️Installation
        • 🗒️Config
      • 🚘[QB] Car Rental
        • 🛠️Installation
        • 📄Config
        • 🖥️Compatibilities
      • ✈️[QB] Sky Racing
        • 🛠️Installation
        • 📄Config
      • 🚘[QB] Car Wash
        • 🛠️Installation
        • 📄Config
      • 🪨[QB] Grinder
        • 🛠️Installation
        • 📄Config
      • 📹[QB] SpyCams & CCTV's
        • 🛠️Installation
        • 📄Config
      • 🏠[QB] Motel
        • 🛠️Installation
        • 📄Config
        • 🖥️Compatibilities
      • 🏚️[QB] Job Center
        • 📄Config
      • 🛠️[QB] Crafting
        • 🛠️Installation
        • 📄Config
          • Functions
          • Language
    • Illegal
      • 🔫[QB] Gangs
        • 🛠️Installation
        • 🗒️Config
      • 🔔[QB] Drug Selling
        • 🗒️Config
      • 🌱[QB] Drugs
        • 🛠️Installation
        • 🗒️Config
      • 🍯[QB] Craft Potion
        • 🛠️Installation
        • 🗒️Config
      • 🅱️[QB] Blackmarket
        • 🛠️Installation
        • 🗒️Config
          • config_functions
          • config_language
      • 🚗[QB] Car Thief
        • 🗒️Config
      • 🏠[QB] House Robbery
        • 🛠️Installation
        • 🗒️Config
      • 💎[QB] Jewelry
        • 🛠️Installation
        • 🗒️Config
          • Functions
          • Language
      • ®️[QB] Mini Robberys
        • 🛠️Installation
        • 🗒️Config
      • 💰[QB] MoneyWash
        • 🛠️Installation
        • 🗒️Config
          • Functions
          • Language
      • 🔫[QB] Rob NPC
        • 🛠️Installation
        • 🗒️Config
      • 🏃‍♂️[QB] Runs
        • 🛠️Installation
        • 🗒️Config
          • Functions
          • Language
      • ⛽[QB] Steal Fuel
        • 🛠️Installation
        • 🗒️Config
          • Functions
          • Language
      • 🏬[QB] Store Robbery
        • 🛠️Installation
        • 🗒️Config
          • Functions
          • Language
      • 🪛[QB] Scrapyard
        • 🛠️Installation
        • 🗒️Config
          • Functions
          • Language
      • 👾[QB] Territories
        • 🛠️Installation
        • 📄Config
          • Functions
      • 🏨[QB] GoPostal
        • 🛠️Installation
        • 📄Config
          • Functions
          • Language
          • S_utils
  • ESX
    • Jobs
      • 🚗[ESX] Tunerjob
        • ❗Dependencies
        • 🛠️Installation
          • ℹ️OX-Inventory
          • ℹ️QS-Inventory
        • 🗒️Config
          • BlacklistVehicles
          • Craft
          • Functions
          • Language
          • Targets
          • Wraps
          • Events
        • ❓Common Questions
      • 🚚[ESX] Trucker
        • 🛠️Installation
        • 🗒️Config
          • 📄Functions
          • 📄Language
      • 🪵[ESX] Lumberjack
        • 🛠️Installation
        • 🗒️Config
      • 🛻[ESX] Mechanic Run
        • 🛠️Installation
        • 🗒️Config
      • ⛏️[ESX] Mining
        • 🛠️Installation
        • 🗒️Config
      • 🎣[ESX] Fishing
        • 🛠️Installation
        • 📄Config
          • Functions
          • Language
          • Diving
          • Fishingnet
          • Fishingrod
          • Seashells
          • Tournament
          • Upgrades
    • General
      • 🚘[ESX] Car Rental
        • 🛠️Installation
        • 🗒️Config
      • 📃[ESX] Insurance
        • 🛠️Installation
        • 🖥️Compatibilities
        • 📄Config
        • 🔁 Server-Exports
      • 🚘[ESX] Car Wash
        • 🛠️Installation
        • 📄Config
      • 📹[ESX] SpyCams & CCTV's
        • 🛠️Installation
        • 📄Config
        • 🏠[ESX] Motel
          • 🛠️Installation
          • 📄Config
          • 🖥️Compatibilities
      • 🛠️[ESX] Crafting
        • 🛠️Installation
        • 📄Config
          • Functions
          • Language
      • 🎄[ESX] Christmas
        • 🛠️Installation
        • 📄Configs
    • Illegal
      • 🔫[ESX] Gangs
        • 🛠️Installation
        • 📄Config
        • ❓Common Questions
      • 🅱️[ESX] Blackmarket
        • 🛠️Installation
        • 🗒️Config
          • config_functions
          • config_language
      • 🏨[ESX] GoPostal
        • 🛠️Installation
        • 📄Config
          • Functions
          • Language
          • S_utils
  • Both Framework
    • Scripts
      • 🚗Car Rebuild
        • 🛠️Installation
        • 🗒️Config
      • 🗺️City Guide
        • 🛠️Installation
        • 📄Config
          • Functions
          • Language
      • 🛒Shops
        • 📄Config
        • 🛠️Installation
      • 🔁Reputation
        • 📄Config
        • 🛠️Installation
        • ⁉️Exports & Commands
          • Server Exports
          • Commands
      • 💤AFK System
        • 📄Configs
        • 🛠️Installation
      • 🚗Garages
        • 🛠️Installation
        • 📑User Guide
          • Create Garages
          • Create Private Garage
          • Impound & Auctions
          • Add vehicle to gang/job
          • Commands
        • 🔁Compatibilities
      • ✈️Airplane Job
        • 🛠️Installation
        • 📃Configs
        • ℹ️Exports
      • 📋Scoreboard
        • 📃Config
      • 📦StorageUnits
        • 🛠️Installation
        • 📃Config
Powered by GitBook
On this page
  1. QBCore
  2. Illegal
  3. [QB] Drug Selling

Config

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
Previous[QB] Drug SellingNext[QB] Drugs

Last updated 1 year ago

🔔
🗒️