diff --git a/config.lua b/config.lua index 6612a8a..2e18592 100644 --- a/config.lua +++ b/config.lua @@ -9,13 +9,6 @@ Config.Delays = { thionylchlorideProcessing = 1000 * 10, } -Config.ChemicalsConvertionItems = { - hydrochloric_acid = 0, - sodium_hydroxide = 0, - sulfuric_acid = 0, - lsa = 0, -} - Config.CircleZones = { WeedField = {coords = vector3(2224.64, 5577.03, 53.85), name = ('Weed Farm'), radius = 100.0}, WeedProcessing = {coords = vector3(2329.12, 2571.86, 46.68), name = ('Weed Process'), radius = 100.0}, @@ -71,3 +64,42 @@ Config.WeedLab = { coords = vector4(1088.68, -3187.68, -38.99, 176.04), -- GTA DLC Biker Cocaine Lab -- vector3(1088.68, -3187.68, -38.99) },]]-- } + + +-------------------------------- +-- DRUG CONFIG AMOUNTS -- +-------------------------------- + +-------------------------------- +-- COKE PROCESSING AMOUNTS -- +-------------------------------- + +Config.CokeProcessing = { + CokeLeaf = 1, -- Amount of Leaf Needed to Process + ProcessCokeLeaf = math.random(2,7), -- Amount of Coke Received + -- Processing Small Bricks -- + Coke = 10, -- Amount of Coke Needed for Small Brick + BakingSoda = 5, -- Amount of Baking Soda Needed for Small Brick + SmallCokeBrick = math.random(2,7), + -- Process Small Bricks Into Large Brick -- + SmallBrick = 4, -- Amount of Small Bricks Required + LargeBrick = 1, -- Large Bricks Received +} + +-------------------------------- +-- METH PROCESSING AMOUNTS -- +-------------------------------- +Config.MethProcessing = { + -- Chemical Processing -- + SulfAcid = 1, -- Amount of Sulfuric Acid Needed for Liquid Mix + HydAcid = 1, -- Amount of Hydrochloric Acid Needed for Liquid Mix + SodHyd = 1, -- Amount of Sodium Hydroxide Needed for Liquid Mix + Meth = math.random(5,12), -- Amount of Meth Recevied From 1 Tray +} + +-------------------------------- +-- HEROIN PROCESSING AMOUNTS -- +-------------------------------- +Config.HeroinProcessing = { + Poppy = 2 -- Amount of Poppy Required for 1 Heroin +} \ No newline at end of file diff --git a/server/coke.lua b/server/coke.lua index 106b63c..039aa88 100644 --- a/server/coke.lua +++ b/server/coke.lua @@ -15,12 +15,11 @@ RegisterServerEvent('ps-drugprocessing:processCocaLeaf') AddEventHandler('ps-drugprocessing:processCocaLeaf', function() local src = source local Player = QBCore.Functions.GetPlayer(src) - local count = math.random(2,7) - Player.Functions.RemoveItem('coca_leaf', 1) - Player.Functions.AddItem('coke', count) - TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['coca_leaf'], "remove") - TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['coke'], "add", count) + Player.Functions.RemoveItem('coca_leaf', Config.CokeProcessing.CokeLeaf) + Player.Functions.AddItem('coke', Config.CokeProcessing.ProcessCokeLeaf) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['coca_leaf'], "remove", Config.CokeProcessing.CokeLeaf) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['coke'], "add", Config.CokeProcessing.ProcessCokeLeaf) TriggerClientEvent('QBCore:Notify', src, Lang:t("success.coke"), "success") end) @@ -28,14 +27,13 @@ RegisterServerEvent('ps-drugprocessing:processCocaPowder') AddEventHandler('ps-drugprocessing:processCocaPowder', function() local src = source local Player = QBCore.Functions.GetPlayer(src) - local count = math.random(1,2) - Player.Functions.RemoveItem('coke', 10) - Player.Functions.RemoveItem('bakingsoda', 5) - Player.Functions.AddItem('coke_small_brick', count) - TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['coke'], "remove", 10) - TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['bakingsoda'], "remove", 5) - TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['coke_small_brick'], "add", count) + Player.Functions.RemoveItem('coke', Config.CokeProcessing.Coke) + Player.Functions.RemoveItem('bakingsoda', Config.CokeProcessing.BakingSoda) + Player.Functions.AddItem('coke_small_brick', Config.CokeProcessing.SmallCokeBrick) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['coke'], "remove", Config.CokeProcessing.Coke) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['bakingsoda'], "remove", Config.CokeProcessing.BakingSoda) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['coke_small_brick'], "add", Config.CokeProcessing.SmallCokeBrick) TriggerClientEvent('QBCore:Notify', src, Lang:t("success.coke_small_brick"), "success") end) @@ -44,10 +42,10 @@ AddEventHandler('ps-drugprocessing:processCocaBrick', function() local src = source local Player = QBCore.Functions.GetPlayer(src) - Player.Functions.RemoveItem('coke_small_brick', 4) - Player.Functions.AddItem('coke_brick', 1) - TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['coke_small_brick'], "remove", 4) - TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['coke_brick'], "add", 1) + Player.Functions.RemoveItem('coke_small_brick', Config.CokeProcessing.SmallBrick) + Player.Functions.AddItem('coke_brick', Config.CokeProcessing.LargeBrick) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['coke_small_brick'], "remove", Config.CokeProcessing.SmallBrick) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['coke_brick'], "add", Config.CokeProcessing.LargeBrick) TriggerClientEvent('QBCore:Notify', src, Lang:t("success.coke_brick"), "success") end) diff --git a/server/heroin.lua b/server/heroin.lua index 5dab9cb..1c2aff9 100644 --- a/server/heroin.lua +++ b/server/heroin.lua @@ -16,9 +16,9 @@ AddEventHandler('ps-drugprocessing:processPoppyResin', function() local src = source local Player = QBCore.Functions.GetPlayer(src) - Player.Functions.RemoveItem('poppyresin', 1) + Player.Functions.RemoveItem('poppyresin', Config.HeroinProcessing.Poppy) Player.Functions.AddItem('heroin', 1) - TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['poppyresin'], "remove") + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['poppyresin'], "remove", Config.HeroinProcessing.Poppy) TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['heroin'], "add") TriggerClientEvent('QBCore:Notify', src, Lang:t("success.heroin"), "success") end) diff --git a/server/meth.lua b/server/meth.lua index 2c8dfc8..31d6b83 100644 --- a/server/meth.lua +++ b/server/meth.lua @@ -35,13 +35,13 @@ AddEventHandler('ps-drugprocessing:processChemicals', function() local Player = QBCore.Functions.GetPlayer(src) Player.Functions.AddItem("liquidmix", 1) - Player.Functions.RemoveItem("sulfuric_acid", 1) - Player.Functions.RemoveItem("hydrochloric_acid", 1) - Player.Functions.RemoveItem("sodium_hydroxide", 1) - TriggerClientEvent('inventory:client:ItemBox', src, QBCore.Shared.Items["liquidmix"], "add") - TriggerClientEvent('inventory:client:ItemBox', src, QBCore.Shared.Items["sulfuric_acid"], "remove") - TriggerClientEvent('inventory:client:ItemBox', src, QBCore.Shared.Items["hydrochloric_acid"], "remove") - TriggerClientEvent('inventory:client:ItemBox', src, QBCore.Shared.Items["sodium_hydroxide"], "remove") + Player.Functions.RemoveItem("sulfuric_acid", Config.MethProcessing.SulfAcid) + Player.Functions.RemoveItem("hydrochloric_acid", Config.MethProcessing.HydAcid) + Player.Functions.RemoveItem("sodium_hydroxide", Config.MethProcessing.SodHyd) + TriggerClientEvent('inventory:client:ItemBox', src, QBCore.Shared.Items["liquidmix"], "add", 1) + TriggerClientEvent('inventory:client:ItemBox', src, QBCore.Shared.Items["sulfuric_acid"], "remove", Config.MethProcessing.SulfAcid) + TriggerClientEvent('inventory:client:ItemBox', src, QBCore.Shared.Items["hydrochloric_acid"], "remove", Config.MethProcessing.HydAcid) + TriggerClientEvent('inventory:client:ItemBox', src, QBCore.Shared.Items["sodium_hydroxide"], "remove", Config.MethProcessing.SodHyd) end end) @@ -76,11 +76,10 @@ AddEventHandler('ps-drugprocessing:processMeth', function() if not playersProcessingMeth[source] then local src = source local Player = QBCore.Functions.GetPlayer(src) - local quantity = math.random(5, 12) - Player.Functions.AddItem("meth", quantity) + Player.Functions.AddItem("meth", Config.Meth) Player.Functions.RemoveItem("methtray", 1) - TriggerClientEvent('inventory:client:ItemBox', src, QBCore.Shared.Items["meth"], "add") + TriggerClientEvent('inventory:client:ItemBox', src, QBCore.Shared.Items["meth"], "add", Config.MethProcessing.Meth) TriggerClientEvent('inventory:client:ItemBox', src, QBCore.Shared.Items["methtray"], "remove") TriggerClientEvent('QBCore:Notify', src, Lang:t("success.meth"), "success") end