# Accessible files

<details>

<summary>config.lua</summary>

```lua
----------------------------------------------------------------------------------------------
-------------------------------------| BRUTAL DRUGS :) |--------------------------------------
----------------------------------------------------------------------------------------------

--[[
Hi, thank you for buying our script, We are very grateful!

For help join our Discord server:     https://discord.gg/85u2u5c8q9
More informations about the script:   https://docs.brutalscripts.com
--]]

Config = {
    Core = 'ESX',  -- 'ESX' / 'QBCORE' | Other core setting on the 'core' folder.
    TextUI = 'brutal_textui', -- false / 'brutal_textui' / 'ox_lib' / 'okokTextUI' / 'ESXTextUI' / 'QBDrawText' // Custom can be add in the cl_utils.lua!!!
    Target = 'false', -- false / 'oxtarget' / 'qb-target' | set it to false if you use TextUI.
    ProgressBar = 'ox_lib', -- 'progressBars' / 'pogressBar' / 'mythic_progbar' / 'ox_lib' // Custom can be add in the cl_utils.lua!!!
    HousingSystem = "", -- "brutal_housing" - Buy: https://store.brutalscripts.com/product/6798150 OR "quasar_housing" / "sn_properties" / "0r-pixelhouse" / "nolag_properties"
    BrutalNotify = true, -- Buy here: (4€+VAT) https://store.brutalscripts.com | Or set up your own notify >> cl_utils.lua
    BrutalGangs = false, -- Buy here: https://store.brutalscripts.com
    LocallyInvisible = true, -- true or false | If your ANTICHEAT ban the player with 'Invisible' reason, set to false! | If it is false the character will walk out of the camera

    DataStorage = {
        --[[
        optimized = Saves the data when the script is restarted, the server is shut down or restarted, or during a scheduled server restart.
            events: "txAdmin:events:serverShuttingDown" & "txAdmin:events:scheduledRestart" or fixed restart times.
        resource_heavy = all data will be saved immediately, this is very stressful for the server so we don't recommend using this, but the choice is up to you.
        ]]--

        Type = "resource_heavy", -- "optimized" / "resource_heavy"
        Restarts = {}, -- example: "11:59" | Save the data 1 minute before restart. Save data at 15:59 instead of 16:00
    },

    MaxObjectsPerPlayer = 20, -- Per player maximum that number of any objects can be placed.
    SpamBlock = true, -- true / false | Blocks intentional server load.

    Zones = {
        WhitelistedZones = {
            "*", -- "*" means: -- All locations are allowed except those on the blacklist.

            -- { coords = vector3(289.1322, 6787.8447, 15.6967), size = 30.0 },
        },

        BlacklistedZones = {
            --{ coords = vector3(289.1322, 6787.8447, 15.6967), size = 50.0 },
        },
    },

    Commands = {  -- to turn off a command just simply leave empty the command line, like this: Command = '',
        Plant = {
            Command = 'plant', -- command name
            Suggestion = 'Open Plant Menu' -- command suggestion
        },

        Table = {
            Command = 'table',
            Suggestion = 'Open Table Menu'
        },

        DryingRack = {
            Command = 'drying_rack',
            Suggestion = 'Open Drying Rack Menu'
        },

        BigSaleOff = {
            Command = 'bigsaleoff',
            Suggestion = 'To disable the big sales'
        },
    },

    GrowShops = {
        ["shop_1"] = {
            ShopName = "Grow Shop",
            NPC = {model = "ig_ortega", coords = vector4(-1137.1124, -1544.0078, 4.3760, 125.4632)},
            Blip = {use = true, sprite = 52, color = 43, size = 0.75},
            WhitelistedGangs = {"gang1"}, -- WhitelistedGangs = false means everyone allowed | Use the Brutal Gangs for better connection and you do not need to add the gangs here. | -- Buy here: https://store.brutalscripts.com

            MaximumDiscount = 30, -- 30 = 30% | Meaning: Maximum available discount through continuous purchases in the store.
            SpendAmountForMaximumDiscount = 10000, -- Amount the player must spend within 14 days to receive the maximum discount
            DiscountDays = 14, -- Your discounts are valid for X days before resetting.

            ShopItems = {
                {item = "pot", label = "Pot", price = 10},
                {item = "potting_soil", label = "Potting Soil", price = 5},
                {item = "drug_lamp", label = "Lamp", price = 30},
                {item = "drug_table", label = "Table", price = 50},
                {item = "water", label = "Water", price = 1},
                {item = "fertilizer", label = "Fertilizer", price = 6},
            },
        },

        ["shop_2"] = {
            ShopName = "Dealer",
            NPC = {model = "s_m_y_dealer_01", coords = vector4(-228.9504, -1664.8406, 34.4606, 354.5814)},
            Blip = {use = true, sprite = 52, color = 43, size = 0.75},
            WhitelistedGangs = {"gang1"}, -- Use the Brutal Gangs for better connection and you do not need to add the gangs here. | -- Buy here: https://store.brutalscripts.com

            MaximumDiscount = 40, -- 40 = 30% | Meaning: Maximum available discount through continuous purchases in the store.
            SpendAmountForMaximumDiscount = 100000, -- Amount the player must spend within 14 days to receive the maximum discount
            DiscountDays = 30, -- Your discounts are valid for X days before resetting.

            ShopItems = {
                {item = "lsd", label = "LSD", price = 100},
                {item = "heroin", label = "Heroin", price = 200},
            },
        },

        -- you can add more...
    },

    DrugEffects = {
        ["joint"] = {
            duration = 90, -- in second

            useAnimation = "smoke_joint",
            timecycle = "drug_wobbly",
            screenEffect = "DrugsTrevorClownsFightIn",
            movementClipset = "move_m@buzzed",

            healthChange = 20, -- + 20 HP | If it's -1, then the HP will be reduced every 3 seconds.
            armorChange = 25, -- between 0-100
            sprintMultiplier = 0.8,
            damageMultiplier = 1.0,
        },

        ["cocaine"] = {
            duration = 90, -- in second

            useAnimation = "basic",
            timecycle = "REDMIST_blend",
            screenEffect = "Rampage",
            movementClipset = "move_m@quick",

            healthChange = -2, -- If it's -1, then the HP will be reduced by 1 every 3 seconds.
            armorChange = 0, -- between 0-100
            sprintMultiplier = 1.30,
            damageMultiplier = 1.50,
        },

        ["meth"] = {
            duration = 90, -- in second

            useAnimation = "swallow_pill",
            timecycle = "drug_drive_blend01",
            screenEffect = "Dont_tazeme_bro",
            movementClipset = "move_m@hurry_butch@a",

            healthChange = -1, -- If it's -1, then the HP will be reduced by 1 every 3 seconds.
            armorChange = 10, -- between 0-100
            sprintMultiplier = 1.5,
            damageMultiplier = 1.25,
        },

        ["lsd"] = {
            duration = 150, -- in second

            useAnimation = "swallow_pill",
            timecycle = "spectator5",
            screenEffect = "DrugsMichaelAliensFight",
            movementClipset = "move_m@drunk@slightlydrunk",

            healthChange = 0, -- If it's -1, then the HP will be reduced by 1 every 3 seconds.
            armorChange = 0, -- between 0-100
            sprintMultiplier = 1.5,
            damageMultiplier = 1.0,
        },

        ["heroin"] = {
            duration = 120, -- in second

            useAnimation = "basic",
            timecycle = "drug_wobbly",
            screenEffect = "DrugsMichaelTorture",
            movementClipset = "move_m@injured",

            healthChange = 100, -- If it's -1, then the HP will be reduced by 1 every 3 seconds.
            armorChange = 0, -- between 0-100
            sprintMultiplier = 0.5,
            damageMultiplier = 1.0,
        },
        
    }, 

    Planting = {
        Weed = {
            Seed = {item = {name = "weed_seed", label = "Weed Seed"}},
            WateringFrequency = 60*60*2,
            FertilisationFrequency = 60*60*2.5,
            FertilizationBoost = 20, -- 20% more wet weed per fertilisation
            LampBoost = 1.5, -- 1.5 = 1.5x, 2 = 2x, 3 = 3x boost 
            GrowthStages = {
                [1] = {
                    model = "bkr_prop_weed_01_small_01c", -- Optional: prop name
                    driedModel = "bzzz_growing_freepot_b",
                    growTime = 60 * 30, -- Time in seconds to reach next stage
                },
                [2] = { 
                    model = "bkr_prop_weed_med_01a",
                    driedModel = "prop_weed_med_dry",
                    growTime = 60 * 90
                },
                [3] = {        
                    model = "bkr_prop_weed_lrg_01a",
                    driedModel = "prop_weed_lrg_dry",
                    growTime = 60 * 300 -- After this, it's ready to harvest
                },
            },

            HarvestItems = { -- A chance is rolled separately for each item, so it's possible to receive multiple items.
                {item = {name = 'wet_weed', label = "Wet Weed"}, amount = {min = 3, max = 8}, chance = 100},
                {item = {name = 'weed_seed', label = "Weed Seed"}, amount = {min = 1, max = 2}, chance = 50},
            }
        },

        Cocaine = {
            Seed = {item = {name = "coca_seed", label = "Coca Seed"}},
            WateringFrequency = 60*60*2,
            FertilisationFrequency = 60*60*2.5,
            FertilizationBoost = 20, -- 20% more coca leaf per fertilisation
            LampBoost = 1.5, -- 1.5 = 1.5x, 2 = 2x, 3 = 3x boost 
            GrowthStages = {
                [1] = {
                    model = "bkr_prop_weed_01_small_01c",
                    driedModel = "bkr_prop_weed_med_01a_bs",
                    growTime = 10, -- Time in seconds to reach next stage
                },
                [2] = {       
                    model = "bkr_prop_weed_med_01a",
                    driedModel = "bkr_prop_weed_med_01a_bs",
                    growTime = 30
                },
                [3] = {     
                    model = "bkr_prop_weed_lrg_01a",
                    driedModel = "bkr_prop_weed_med_01a_bs",
                    growTime = 60 * 300 -- After this, it's ready to harvest
                },
            },

            HarvestItems = { -- A chance is rolled separately for each item, so it's possible to receive multiple items.
                {item = {name = 'coca_leaf', label = "Coca Leaf"}, amount = {min = 3, max = 10}, chance = 100},
                {item = {name = 'coca_seed', label = "Coca Seed"}, amount = {min = 1, max = 2}, chance = 50},
            }
        },

        Others = {
            Pot = {command = "pot", item = {name = "pot", label = "Pot"}, obj = "bzzz_growing_freepot_a"},
            Lamp = {command = "drug_lamp", item = {name = "drug_lamp", label = "Lamp"}, obj = "xm_prop_base_tripod_lampb"},
            Table = {command = "drug_table", item = {name = "drug_table", label = "Table"}, obj = "bkr_prop_weed_table_01b"},
            DryingRack = {command = "drug_drying", item = {name = "drying_rack", label = "Drying Rack"}, obj = "prop_weed_rack"},
            Oven = {command = "drug_oven", item = {name = "drug_oven", label = "Oven"}, obj = "meth_chiller", obj2 = "door_meth_chiller"},

            PottingSoil = {item = {name = "potting_soil", label = "Potting Soil"}, obj = "bzzz_growing_freepot_b"},
            Water = {item = {name = "water", label = "Water"}},
            Fertilizer  = {item = {name = "fertilizer", label = "Fertilizer"}},
        }
    },

    Drying = {
        ["coca_leaf"] = {-- item that will be removed
            time = 30, -- in minutes
            drieditem = {name = "dried_coca_leaf", label = "Dried Coca Leaf"}, -- new item that will be added after drying
        },

        ["wet_weed"] = {
            time = 30, -- in minutes
            drieditem = {name = "dried_weed", label = "Dried Wet Weed"},
        },
    },

    Table = {
        CocaCooking = {
            consumedItems = { -- items that will be removed.
                ["dried_coca_leaf"] = 3, 
                ["water"] = 1,
                ["acetone"] = 1,
            },

            neededItems = { -- items that just needed won't be removed.
                ["cooking_pot"] = 1, 
            },

            cookingObjects = { -- ingame "minigame" setting
                {model = 'p_cs_leaf_s', amount = 3},
                {model = 'bkr_prop_weed_bud_02b', amount = 1},
            },

            minigame = {
                time = 50, -- between 0-100
                hardness = 80, -- between 0-100
                temperature = {min = 23, max = 250}, 
            },

            newItem = {item = "cocaine", amount = 1}
        },

        CocaPress = {
            consumedItems = {
                ["cocaine"] = 6,
                ["plastic_wrap"] = 1,
            },
 
            neededItems = {
                ["cocaine_press"] = 1,
            },

            newItem = {item = "cocaine_brick", amount = 1}
        },

        WeedBagging = {
            consumedItem1 = {name = "dried_weed", amount = 1},
            consumedItem2 = {name = "baggie", amount = 1},

            neededItems = {
                
            },

            newItem = {item = "packaged_weed", amount = 1}
        },

        MethCooking = {
            consumedItems = {
                ["ephedrine"] = 5,
                ["acetone"] = 2,
                ["sodium"] = 1,
                ["lithium"] = 1,
                ["hydrochloric_acid"] = 3,
                ["water"] = 2,
            },

            neededItems = {
                ["bunsen_burner"] = 1,
            },

            cookingObjects = {
                {model = 'xm3_prop_xm3_lsd_bottle_03a', amount = 2},
                {model = 'prop_cs_script_bottle_01', amount = 1},
                {model = 'prop_cs_script_bottle', amount = 2},
                {model = 'xm3_prop_xm3_product_bottle_01', amount = 1},
                {model = 'v_ind_cfbottle', amount = 1},
            },

            minigame = {
                time = 50, -- between 0-100
                hardness = 80, -- between 0-100
                temperature = {min = 23, max = 250}, 
            },

            newItem = {item = "uncooked_meth", amount = 6}
        },

        MethOven = {
            consumedItems = {
               ["uncooked_meth"] = 6,
            },

            neededItems = {
                ["hammer"] = 1,
            },

            minigame = {
                temperature = {min = 100, max = 250},
            },

            newItem = {item = "meth_pure", amount = 2}

            -- Minigame reward multiplier:
            -- 3x for excellent, 2x for good, 1x for average, 0x for fail.
        },

        MethBagging = {
            consumedItem1 = {name = "meth_pure", amount = 1},
            consumedItem2 = {name = "baggie", amount = 1},

            neededItems = {
                
            },

            newItem = {item = "meth", amount = 1}
        },
    },

    UnpackableItems = {
        ["cocaine_brick"] = {
            result = "cocaine",
            removeItems = {"cocaine_brick"},
            count = 6,
        },

        ["rolling_paper"] = {
            result = "joint",
            removeItems = {"rolling_paper", "packaged_weed"},
            count = 1,
        },
    },

    Sale = {
        MaxPopularityPoint = 10000, -- Selling 10 000 items grants the player the maximum popularity level.
        Zones = {
            ["zone_1"] = {
                Name = "Drug Sell",
                Blip = {sprite = 500, color = 2, size = 0.7, radiusBlip = true},
                MainCoords = vector3(108.4995, -1941.0608, 20.8037),
                WhitelistedGangs = {"gang1"}, -- Use the Brutal Gangs for better connection and you do not need to add the gangs here. | -- Buy here: https://store.brutalscripts.com
                BrutalGangData = {color1 = "#9affa249", color2 = "#9affa2dc", icon = "assets/wet_weed.png"}, -- if BrutalGangs is true then the script will be integrated.
                Size = 50.0,

                Drugs = {
                    {item = "cocaine", price = {min = 60, max = 120}, amount = {min = 1, max = 12}},
                    {item = "cocaine_brick", price = {min = 360, max = 720}, amount = {min = 1, max = 2}},
                    {item = "packaged_weed", price = {min = 10, max = 20}, amount = {min = 1, max = 12}},
                    {item = "meth", price = {min = 30, max = 100}, amount = {min = 1, max = 12}},
                },

                SpawnTime = {min = 5, max = 10},
                WantsDrugsChance = 90, -- 90 = 90% chance to npc wants any drug
                AttackChange = 20, -- 20 = 20% chance to attack
                CustomerBlip = {label = "Customer", sprite = 280, color = 0, size = 0.75},
                Positions = {
                    {coords = vector4(84.4091, -1955.7448, 20.7474, 320.4725), model = "a_m_o_tramp_01", animation = {"amb@world_human_leaning@female@wall@back@holding_elbow@idle_a", "idle_a"}},
                    {coords = vector4(100.6643, -1959.5251, 20.8150, 355.7230), model = "a_m_y_skater_01", animation = {"amb@world_human_leaning@male@wall@back@foot_up@idle_a", "idle_a"}},
                    {coords = vector4(118.2732, -1928.0225, 20.7416, 141.3412), model = "a_m_y_downtown_01", animation = {"amb@world_human_leaning@female@wall@back@hand_up@idle_a", "idle_a"}},
                    {coords = vector4(120.1756, -1943.7565, 20.7513, 359.6439), model = "a_f_m_tramp_01", animation = {"amb@prop_human_bum_shopping_cart@male@idle_a", "idle_c"}},
                    {coords = vector4(88.3943, -1945.6005, 20.7454, 337.0382), model = "a_m_o_tramp_01", walking = vector3(100.7816, -1955.8450, 20.7497)},
                    {coords = vector4(85.6870, -1910.9893, 21.0146, 225.0027), model = "a_m_m_socenlat_01", walking = vector3(112.9783, -1954.6952, 20.7470)},
                    {coords = vector4(81.9103, -1971.2239, 20.8836, 329.4786), model = "a_m_y_genstreet_01", walking = vector3(115.5743, -1926.7819, 20.7414)},
                    {coords = vector4(69.4281, -1924.2622, 21.1962, 239.6679), model = "a_f_y_soucent_01", walking = vector3(110.2789, -1956.1741, 20.7515)},
                },
            },
        },

        BigSale = {
            Use = true, -- true / false
            Blip = {label = "Big Deal", sprite = 615, color = 16, size = 0.8},

            Positions = {
                [1] = {
                    peds = {
                        {model = "csb_paige", coords = vector4(123.2304, -2578.6299, 6.0046, 187.3926)},
                        {model = "csb_ortega", coords = vector4(123.6107, -2577.7983, 6.0046, 180.8534)},
                        {model = "csb_oscar", coords = vector4(122.6553, -2577.9141, 6.0046, 186.1028)},
                    },

                    vehicle = {model = "speedo", coords = vector4(119.2757, -2579.2058, 5.7430, 133.7378)}
                },

                [2] = {
                    peds = {
                        {model = "csb_paige", coords = vector4(-1853.2344, -623.4021, 11.1709, 69.3240)},
                        {model = "csb_ortega", coords = vector4(-1852.6241, -624.4400, 11.1742, 89.0115)},
                        {model = "csb_oscar", coords = vector4(-1852.6735, -623.1409, 11.1660, 93.3555)},
                    },

                    vehicle = {model = "speedo", coords = vector4(-1853.0543, -621.1390, 10.8875, 69.5990)}
                },

                -- more can be set up...
            },

            Drugs = {
                {item = "cocaine", price = 100, amount = {min = 50, max = 100}},
                {item = "cocaine_brick", price = 600, amount = {min = 10, max = 20}},
                {item = "packaged_weed", price = 17, amount = {min = 50, max = 100}},
                {item = "meth", price = 80, amount = {min = 50, max = 100}},
            },
        }
    },

    -----------------------------------------------------------
    -----------------------| TRANSLATE |-----------------------
    -----------------------------------------------------------

    MoneyForm = '$', -- Money form

    Locales = {
        IncreasedSprint = "Increased Sprint Speed",
        HealthRegen = "Health Regeneration",
        ExtraArmor = "Increased Armor",
        DamageBoost = "Increased Damage",

        AddingPottingSoil = "Adding potting soil...",
        Watering = "Watering...",
        Fertilizing = "Fertilizing...",
        
        -- item names --
        meth = "Meth",
        packaged_weed = "Packaged Weed",
        cocaine = "Cocaine",
        cocaine_brick = "Cocaine Brick",
        dried_coca_leaf = "Dried Coca Leaf",
        water = "Water",
        acetone = "Acetone",
        cooking_pot = "Cooking Pot",
        plastic_wrap = "Plastic Wrap",
        cocaine_press = "Cocaine Press",
        dried_weed = "Dried Weed",
        baggie = "Baggie",
        ephedrine = "Ephedrine",
        sodium = "Sodium", 
        lithium = "Lithium",
        hydrochloric_acid = "Hydrochloric Acid",
        bunsen_burner = "Bunsen Burner",
        uncooked_meth = "Uncooked Meth", 
        hammer = "Hammer",
        meth_pure = "Meth Pure",
    },

    TargetTexts = {
        [1] = {'Plant Menu', 'fa-solid fa-seedling'}, 
        [2] = {'Table Menu', 'fa-solid fa-chalkboard-user'},
        [3] = {'Drying Rack Menu', 'fa-solid fa-arrow-up-from-bracket'},
        [4] = {'[E] -', 38, 'fa-solid fa-cart-shopping'},
        [5] = {'[E] - Talk To NPC', 38, 'Talk To NPC', 'fa-solid fa-people-arrows'},
        [6] = {'[E] - Get Stuff Back', 38, 'Get Stuff Back', 'fa-solid fa-shuffle'},
        [7] = {'[E] - Big Sale', 38, 'Big Sale', 'fa-solid fa-money-bill-trend-up'},
    },
    
    -- Notify function EDITABLE >> cl_utils.lua
    Notify = { 
        [1] = {"Drugs", "You can't put one so close to the other!", 5000, "error"},
        [2] = {"Drugs", "You need an item:", 5000, "error"},
        [3] = {"Drugs", "No more grow pots allowed – you’ve hit the limit!", 5000, "error"},
        [4] = {"Drugs", "You can only use it when the plant needs it!", 5000, "error"},
        [5] = {"Drugs", "You can water it again below 80% water level!", 5000, "error"},
        [6] = {"Drugs", "You can't put it that far away!", 5000, "error"},
        [7] = {"Drugs", "The plant is fully grown and ready to harvest!", 5000, "error"},
        [8] = {"Drugs", "You got:", 5000, "success"},
        [9] = {"Drugs", "The plant is being harvested!", 5000, "error"},
        [10] = {"Drugs", "No drug activity allowed here!", 5000, "error"},
        [11] = {"Drugs", "You don't have enough money!", 5000, "error"},
        [12] = {"Drugs", "You cannot be in vehicle!", 5000, "error"},
        [13] = {"Drugs", "You don't have any drugs to sell!", 5000, "error"},
        [14] = {"Drugs", "Successful deal!", 5000, "success"},
        [15] = {"Drugs", "Deal failed!", 5000, "error"},
        [16] = {"Drugs", "You have reached the maximum amount!", 5000, "error"},
        [17] = {"Drugs", "Successful drying. You got:", 5000, "success"},
        [18] = {"Drugs", "You got back the item!", 5000, "info"},
        [19] = {"Drugs", "You've done it successfully!", 5000, "success"},
        [20] = {"Drugs", "Spam is not allowed! Try again later!", 5000, "error"},
        [21] = {"Drugs", "They stole your stuff! Hunt them down!", 5000, "info"},
        [22] = {"Drugs", "You got your stuff back!", 5000, "success"},
        [23] = {"Drugs", "You have successfully made it.", 5000, "success"},
        [24] = {"Drugs", "Go to the designated place where you can sell in larger quantities!", 5000, "info"},
        [25] = {"Drugs", "You can turn off the big sale: /bigsaleoff", 5000, "info"},
        [26] = {"Drugs", "Success big deal! You got:", 5000, "success"},
        [27] = {"Drugs", "No drug needed!", 5000, "error"},
        [28] = {"Drugs", "An item missing to do this.", 5000, "error"},
        [29] = {"Drugs", "Using another type of drug before the first wore off caused damage.", 5000, "error"},
        [30] = {"Drugs", "Cooking failed!", 5000, "error"},
        [31] = {"Drugs", "There is a player near you!", 5000, "error"},
        [32] = {"Drugs", "Big Sale: OFF", 5000, "error"},
        [33] = {"Drugs", "Big Sale: ON", 5000, "success"},
    },
}

```

</details>

<details>

<summary>client-utils.lua</summary>

```lua
ESX = Core
QBCore = Core

-- Buy here: (4€+VAT) https://store.brutalscripts.com
function notification(title, text, time, type)
    if Config.BrutalNotify then
        exports['brutal_notify']:SendAlert(title, text, time, type)
    else
        -- Put here your own notify and set the Config.BrutalNotify to false

        -- Default ESX Notify:
        --TriggerEvent('esx:showNotification', text)

        -- Default QB Notify:
        --TriggerEvent('QBCore:Notify', text, 'info', 5000)

        -- OKOK Notify:
        -- exports['okokNotify']:Alert('GANG ACTIONS', text, time, type, false)

    end
end

function TextUIFunction(type, text)
    if type == 'open' then
        if Config.TextUI:lower() == 'ox_lib' then
            lib.showTextUI(text)
        elseif Config.TextUI:lower() == 'okoktextui' then
            exports['okokTextUI']:Open(text, 'darkblue', 'right')
        elseif Config.TextUI:lower() == 'esxtextui' then
            ESX.TextUI(text)
        elseif Config.TextUI:lower() == 'qbdrawtext' then
            exports['qb-core']:DrawText(text,'left')
        elseif Config.TextUI:lower() == 'brutal_textui' then
            exports['brutal_textui']:Open(text, "blue")
        end
    elseif type == 'hide' then
        if Config.TextUI:lower() == 'ox_lib' then
            lib.hideTextUI()
        elseif Config.TextUI:lower() == 'okoktextui' then
            exports['okokTextUI']:Close()
        elseif Config.TextUI:lower() == 'esxtextui' then
            ESX.HideUI()
        elseif Config.TextUI:lower() == 'qbdrawtext' then
            exports['qb-core']:HideText()
        elseif Config.TextUI:lower() == 'brutal_textui' then
            exports['brutal_textui']:Close()
        end
    end
end

function ProgressBarFunction(time, text)
    if Config.ProgressBar:lower() == 'progressbars' then --LINK: https://github.com/EthanPeacock/progressBars/releases/tag/1.0
        exports['progressBars']:startUI(time, text)
        Citizen.Wait(time)
    elseif Config.ProgressBar:lower() == 'pogressbar' then -- LINK: https://github.com/SWRP-PUBLIC/pogressBar
        exports['pogressBar']:drawBar(time, text)
        Citizen.Wait(time)
    elseif Config.ProgressBar:lower() == 'ox_lib' then
        lib.progressBar({
            duration = time,
            label = text,
            useWhileDead = false,
            canCancel = true,
        })
    end
end

function isPlayerInProperty()
    local propertyID = nil

    -- custom housing system exports can be added if you modify this part.
    
    if Config.HousingSystem:lower() == "brutal_housing" then
        propertyID = exports.brutal_housing:getPropertyID()
    elseif Config.HousingSystem:lower() == "quasar_housing" then
        local currentHouse = exports['qs-housing']:getCurrentHouse()

        if currentHouse then
            propertyID = currentHouse
        end
    elseif Config.HousingSystem:lower() == "sn_properties" then
        propertyID = exports.sn_properties:getPropertyID()
    elseif Config.HousingSystem:lower() == "nolag_properties" then
        propertyID = exports.nolag_properties:GetCurrentPropertyId()
    elseif Config.HousingSystem:lower() == "0r-pixelhouse" then
        propertyID = exports["0r-pixelhouse"]:GetPlayerHouseId()
    end

    return propertyID
end

function isPlayerInGangJob()
    local whitelisted = false

    if Config.BrutalGangs and GetResourceState('brutal_gangs') == "started" then
        if exports.brutal_gangs:isPlayerInGangJob() then
            whitelisted = true
        end
    end

    return whitelisted
end

function OpenMenuUtil(invisibility, freeze)
    -- Here you can add a trigger to hide your HUD system

    InMenu = true
    SetNuiFocus(true, true)

    Citizen.CreateThread(function()
        while InMenu do
            N_0xf4f2c0d4ee209e20() -- it's disable the AFK camera zoom
            Citizen.Wait(15000)
        end
    end)

    if invisibility ~= nil and invisibility then
        Citizen.CreateThread(function()
            local entity = PlayerPedId()

            if freeze ~= nil and freeze then
                FreezeEntityPosition(entity, true)
            end

            while InMenu and Config.LocallyInvisible do
                Wait(0)
                SetEntityLocallyInvisible(entity)
            end
        end)
    end

    DisplayRadar(false)
end

function CloseMenuUtil()
    -- Here you can add a trigger to enable your HUD system

    DisplayRadar(true)
end

```

</details>

<details>

<summary>server-utils.lua</summary>

```lua
-- Brutal Gangs Connection --> https://store.brutalscripts.com/product/6510604
function AddGangReputation(type, gang)
    if type == "HarvestPlant" then
        exports['brutal_gangs']:AddGangReputation(gang, 5)
    elseif type == "GrowShopPurchase" then
        exports['brutal_gangs']:AddGangReputation(gang, 2)
    elseif type == "ItemsBackAfterAttack" then
        exports['brutal_gangs']:AddGangReputation(gang, 10)
    elseif type == "BigDeal" then
        exports['brutal_gangs']:AddGangReputation(gang, 10)
    end
end
```

</details>

<details>

<summary>client-core.lua</summary>

```lua
Core = nil

if Config['Core']:upper() == 'ESX' then
    local _esx_ = 'new' -- 'new' / 'old'

    if _esx_ then
        Core = exports['es_extended']:getSharedObject()
    else
        while Core == nil do
            TriggerEvent('esx:getSharedObject', function(obj) Core = obj end)
            Citizen.Wait(0)
        end
    end

    LoadedEvent = 'esx:playerLoaded'
    onPlayerDeath = 'esx:onPlayerDeath'
    JobUpdateEvent = 'esx:setJob'
    TSCB = Core.TriggerServerCallback

    function GetPlayersFunction()
        return Core.Game.GetPlayers()
    end

    function GetPlayerJobDatas()
        return Core.GetPlayerData().job
    end

    function GetClosestPlayerFunction()
        return Core.Game.GetClosestPlayer()
    end

    function GetClosestVehicleFunction(coords, modelFilter)
        return Core.Game.GetClosestVehicle(coords, modelFilter)
    end

elseif Config['Core']:upper() == 'QBCORE' then
    Core = exports['qb-core']:GetCoreObject()

    LoadedEvent = 'QBCore:Client:OnPlayerLoaded'
    JobUpdateEvent = 'QBCore:Client:OnJobUpdate'
    TSCB = Core.Functions.TriggerCallback

     function GetPlayersFunction()
        return Core.Functions.GetPlayers()
    end
    
    function GetPlayerJobDatas()
        return Core.Functions.GetPlayerData().gang
    end

    function GetClosestPlayerFunction()
        return Core.Functions.GetClosestPlayer()
    end

    function GetClosestVehicleFunction(coords, modelFilter)
        return Core.Functions.GetClosestVehicle(coords, modelFilter)
    end
    
end
```

</details>

<details>

<summary>server-core.lua</summary>

```lua
Core = nil

if Config['Core']:upper() == 'ESX' then
    local _esx_ = 'new' -- 'new' / 'old'
    
    if _esx_ == 'new' then
        Core = exports['es_extended']:getSharedObject()
    else
        Core = nil
        TriggerEvent('esx:getSharedObject', function(obj) Core = obj end)
        while Core == nil do
            Citizen.Wait(0)
        end
    end

    RESCB = Core.RegisterServerCallback
    GETPFI = Core.GetPlayerFromId
    RUI = Core.RegisterUsableItem
    SQLData = {
        users = 'users',
        identifier = 'identifier'
    }

    function GetIdentifier(source)
        local xPlayer = GETPFI(source)
        while xPlayer == nil do
            Citizen.Wait(1000)
            xPlayer = GETPFI(source) 
        end
        return xPlayer.identifier
    end

    function GetPlayerByIdentifier(identifier)
        return Core.GetPlayerFromIdentifier(identifier)
    end

    function RemoveItem(source, item, amount)
        local xPlayer = GETPFI(source)
        if item ~= '' then 
            if _esx_ == 'new' then
                xPlayer.removeInventoryItem(item, amount)
            else
                if string.sub(item, 0, 6):lower() == 'weapon' then
                    xPlayer.removeWeapon(item)
                else
                    xPlayer.removeInventoryItem(item, amount)
                end
            end
        end    
    end

    function AddItem(source, item, count)
        local xPlayer = GETPFI(source)
        if item ~= '' then 
            if _esx_ == 'new' then
                xPlayer.addInventoryItem(item, count)
            else
                if string.sub(item, 0, 6):lower() == 'weapon' then
                    xPlayer.addWeapon(item, 90)
                else
                    xPlayer.addInventoryItem(item, count)
                end
            end
        end    
    end

    function GetItemCount(source, item)
        local xPlayer = GETPFI(source)

        if _esx_ == 'new' then
            return xPlayer.getInventoryItem(item).count
        else
            if string.sub(item, 0, 6):lower() == 'weapon' then
                local loadoutNum, weapon = xPlayer.getWeapon(item:upper())

                if weapon then
                    return true
                else
                    return false
                end
            else
                return xPlayer.getInventoryItem(item).count
            end
        end
    end

    function GetAccountMoney(source,account)
        local xPlayer = GETPFI(source)
        if account == 'bank' then
            return xPlayer.getAccount(account).money
        elseif account == 'money' then
            return xPlayer.getMoney()
        end
    end

    function AddMoneyFunction(source, account, amount)
        local xPlayer = GETPFI(source)
        if account == 'bank' then
            xPlayer.addAccountMoney('bank', amount)
        elseif account == 'money' then
            xPlayer.addMoney(amount)
        end
    end

    function RemoveAccountMoney(source, account, amount)
        local xPlayer = GETPFI(source)
        if account == 'bank' then
            xPlayer.removeAccountMoney('bank', amount)
        elseif account == 'money' then
            xPlayer.removeMoney(amount)
        end
    end

elseif Config['Core']:upper() == 'QBCORE' then

    Core = exports['qb-core']:GetCoreObject()
    
    RESCB = Core.Functions.CreateCallback
    GETPFI = Core.Functions.GetPlayer
    RUI = Core.Functions.CreateUseableItem
    SQLData = {
        users = 'players',
        identifier = 'citizenid'
    }

    function GetIdentifier(source)
        local xPlayer = GETPFI(source)
        while xPlayer == nil do
            Citizen.Wait(1000)
            xPlayer = GETPFI(source) 
        end
        return xPlayer.PlayerData.citizenid
    end

    function GetPlayerByIdentifier(identifier)
        return Core.Functions.GetPlayerByCitizenId(identifier)
    end

    function RemoveItem(source, item, amount)
        local xPlayer = GETPFI(source)
        if item ~= '' then 
            xPlayer.Functions.RemoveItem(item, amount)
        end    
    end

    function AddItem(source, item, count)
        local xPlayer = GETPFI(source)
        if item ~= '' then 
            xPlayer.Functions.AddItem(item, count)
        end    
    end

    function GetItemCount(source, item)
        local xPlayer = GETPFI(source)
        local items = xPlayer.Functions.GetItemByName(item)
        local item_count = 0
        if items ~= nil then
            item_count = items.amount
        else
            item_count = 0
        end
        return item_count
    end

    function SetHandCuffMetadata(source, isHandcuffed)
        local xPlayer = GETPFI(source)
        xPlayer.Functions.SetMetaData('ishandcuffed', isHandcuffed)
    end

    
    function GetPlayerDeathMetaData(source)
        local xPlayer = GETPFI(source)
        return xPlayer.PlayerData.metadata['isdead']
    end

    function GetAccountMoney(source, account)
        local xPlayer = GETPFI(source)
        if account == 'bank' then
            return xPlayer.PlayerData.money.bank
        elseif account == 'money' then
            return xPlayer.PlayerData.money.cash
        end
    end

    function AddMoneyFunction(source, account, amount)
        local xPlayer = GETPFI(source)
        if account == 'bank' then
            xPlayer.Functions.AddMoney('bank', amount)
        elseif account == 'money' then
            xPlayer.Functions.AddMoney('cash', amount)
        end
    end

    function RemoveAccountMoney(source, account, amount)
        local xPlayer = GETPFI(source)
        if account == 'bank' then
            xPlayer.Functions.RemoveMoney('bank', amount)
        elseif account == 'money' then
            xPlayer.Functions.RemoveMoney('cash', amount)
        end
    end

end
```

</details>


---

# 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.brutalscripts.com/site/scripts/drugs/accessible-files.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.
