BUTY SHOP
WebDiscord
  • 💜BUTY DOCUMENTATION
  • âš ī¸INFORMATION
    • LICENSES
    • OUR TERMS
    • SUPPORT
  • 📚GUIDES
    • ⭐Infinite JOBS
      • INSTALLATION
      • HOW TO DO
    • đŸŒŋGardener Job
      • INSTALLATION
    • ❗Infinite Activities
      • INSTALLATION
    • đŸ›Šī¸Flight School
      • INSTALLATION
    • 🚤Boat School
      • INSTALLATION
    • đŸ’ŗLicense System
      • INSTALLATION
      • EXPORT INTEGRATION
      • COMMANDS
    • 🚗Vehicle Shop
      • INSTALLATION
    • â›ī¸Advanced Miner
      • INSTALLATION
    • 🔄Progress Bar
      • INSTALLATION
    • 💊Advanced Sell Drugs
      • INSTALLATION
      • COMMON PROBLEMS
    • 🌊Rent Water Activities
      • INSTALLATION
    • đŸŽī¸Rent Kart Vehicles
      • INSTALLATION
    • 🧑‍đŸĻąAdvanced Identity
      • INSTALLATION
    • 🚚Advanced Trucker
      • INSTALLATION
    • đŸ›Šī¸Advanced Airplane
      • INSTALLATION
    • 🚌Advanced Bus
      • INSTALLATION
    • â™ģī¸Advanced Garbage
      • INSTALLATION
      • COMMON PROBLEMS
  • âš™ī¸COMMON ERRORS
Powered by GitBook
On this page
  • 1. DOWNLOAD
  • 2. DATABASE
  • 3. CONFIG
  • 4. ADD/CONFIGURE NEW DRUGS
  • EXPLANATION OF DRUG CONFIGURATION
  • CREATE A NEW DRUG
  • CHANGE NOTIFICATIONS
  1. GUIDES
  2. Advanced Sell Drugs

INSTALLATION

Read very well and follow all the steps below. If you find any error or have any doubt open a ticket.

PreviousAdvanced Sell DrugsNextCOMMON PROBLEMS

Last updated 2 years ago

1. DOWNLOAD

The first step is to download the product we have just purchased. To do this we will go to our account and search for "BCall_SellToNPC".

2. DATABASE

3. CONFIG

The following will explain all the settings, one of the most important things that I recommend you spend a few minutes to understand in order to offer your users the best possible experience.

The following file is located at: Buty-SellDrugs\configs\config.lua

Configuration = {
    [1] = {
        framework = 'esx',                    -- framework "esx", "oldesx" or "qbcore"

        ESXtrigger = 'es_extended',

        QBtrigger = 'qb-core'
    },

    [2] = {
        Mysql = 'oxmysql'  -- oxmysql, mysql-async or ghmattisql
    }, 

    [3] = {
        alertpolice = true, 

        MinPoliceToSell = 0,

        WithCommand = false, 

        SellCommand = "selldrugs", 

        CancelSellCommand = 'cancelselldrugs'
    },
    
    [4] = {
        UseTarget = false, 

        TargetExport = 'bt-target',

        Text = 'SELL DRUGS', 

        Icon = 'fa fa-shopping-cart'
    },

    [5] = {
        DrawText = true, 
        
        custompolicealert = false
    },

    [6] = {
        BattlePass = false,
        EXP = 10
    }
}

Policejob = { -- Here all the police jobs you use, such as FBI, Sheriffs etc.
    "police", 
    --"police", 
    --"police",
}

BlacklistPed = {
	"u_m_m_jewelsec_01",
}

ByZone = {
    
    SellByZone = false,                     -- You will activate the sale by zone, you can add as many zones as you want.
    
    {
        x = 192.8, y = -2274.44, z = 32.72, -- Coords
        SizeZone = 50.0,                    -- Size
    },

    {
        x = -1201.24, y = -1568.88, z = 4.6, 
        SizeZone = 50.0,                    
    },
}

Street = {
    {[1] = {name = "Bay City Avenue", moneyextra = 300}},
    {[1] = {name = "Palomino Avenue", moneyextra = 400}},
}

4. ADD/CONFIGURE NEW DRUGS

Now I will show you how to add new drugs and explain each configuration.

The following file is located at: Buty-SellDrugs\configs\drugs.lua

EXPLANATION OF DRUG CONFIGURATION

Drugs = {
    {
        [1] = {
        ItemLabel = "COCAINE", -- Item label 
        ItemName = "cocaine", -- Item name
        ItemImg = "./img/cocaine_cut.png" }, -- Item Image (You must add the image to the Buty-SellDrugs\html\img folder.)
        
        [2] = {
        Pricerandom = false, -- Do you want the price to be random?
        PriceRandomMin = 100, -- Random amount MIN on the number you add
        PriceRandomMax = 400, -- Random amount MAX on the number you add
        PriceDrug = 1001, -- Price per drug
        exp = 5,  -- Experience per drug
        TypeAccount = "black_money", -- Type of account where payment is made
        MaxSellDrug = 50 -- Maximum amount of drugs that can be sold to each npc.
        },

        [3] = {
        SellForItem = false, -- Is your money an item?
        SellForItemName = "money" -- Name Item
        }, 

        [4] = {
        Steal = true, -- Do you want the npc to be able to steal from you?
        StealProbability = 50, -- Probability of being robbed (The lower the number, the more likely you are to be robbed).
        PoliceMin = 1, -- Minimal police for this drug to be shown in the UI
        Probabilitycallpolice = 20,  -- Probability of calling the police (The lower the number, the more likely they are to call).
        TimeDecision = 5000, -- Time it will take the NPC to decide
        BuyProbability = 40 -- Probability that the NPC will buy you (The lower the number, the more likely it is that he/she will not buy you).
        },  

        [5] = {
        IncreasePerLVL = 200, -- Increase money per LVL
        IncreasePerPolice = 10, -- Increase money per LVL
        IncreasePerLVLEXP = 10, -- Increase experience per LVL
        IncreasePerPoliceEXP = 5 -- Increase experience per LVL
        },
    },
}

CREATE A NEW DRUG

To create a new drug we will only have to copy one of the ones we have already created and paste it below in the following way:

Drugs = {
    {
        [1] = {ItemLabel = "COCAINE", ItemName = "water", ItemImg = "./img/cocaine_cut.png" },
        
        [2] = {Pricerandom = false, PriceRandomMin = 100, PriceRandomMax = 400, PriceDrug = 1001, exp = 5, TypeAccount = "black_money", MaxSellDrug = 50},

        [3] = {SellForItem = false, SellForItemName = "money"}, 

        [4] = {Steal = true, StealProbability = 50, PoliceMin = 0, Probabilitycallpolice = 20, TimeDecision = 5000, BuyProbability = 40},  

        [5] = {IncreasePerLVL = 200, IncreasePerPolice = 10, IncreasePerLVLEXP = 10, IncreasePerPoliceEXP = 5},
    },

    {
        [1] = {ItemLabel = "WEED", ItemName = "bread", ItemImg = "./img/weed.png"},

        [2] = {Pricerandom = false, PriceRandomMin = 100, PriceRandomMax = 400, PriceDrug = 1001, exp = 5, TypeAccount = "black_money", MaxSellDrug = 210},

        [3] = {SellForItem = false, SellForItemName = "money"}, 

        [4] = {Steal = true, StealProbability = 50, PoliceMin = 0, Probabilitycallpolice = 20, TimeDecision = 5000, BuyProbability = 40},  

        [5] = {IncreasePerLVL = 200, IncreasePerPolice = 10, IncreasePerLVLEXP = 10, IncreasePerPoliceEXP = 5},
    },
}

CHECK THAT ALL THE ITEMS YOU PUT IN THE DRUGS.LUA EXIST ON YOUR SERVER. OTHERWISE, THE WHOLE SCRIPT WILL FAIL.

CHANGE NOTIFICATIONS

If you use a different notification system, you can configure it in the following folder: Buty-SellDrugs\configs\function.lua

You must insert in your database the SQL, in order to save the experience of each player.

📚
💊
KEYMASTER
Page cover image