diff --git a/client/animationsandfunctions.lua b/client/animationsandfunctions.lua index 521d52b..3365d58 100644 --- a/client/animationsandfunctions.lua +++ b/client/animationsandfunctions.lua @@ -373,7 +373,8 @@ end local hit = 0 function SpawnCarPedChase() local stoploc = vector3(-1157.63, -3056.71, 13.94) - local start = Config.StartLoc[math.random(1,#Config.StartLoc)] + local config = lib.callback.await('md-drugs:server:getLocs', false) + local start = config.StartLoc[math.random(1,#config.StartLoc)] if started then Notify(Lang.lean.act,'error') else @@ -434,7 +435,8 @@ end function SpawnMethCarPedChase() local ped = GetEntityCoords(PlayerPedId()) local stoploc = vector3(-1157.63, -3056.71, 13.94) -local start = Config.StartLoc[math.random(1,#Config.StartLoc)] +local config = lib.callback.await('md-drugs:server:getLocs', false) +local start = config.StartLoc[math.random(1,#config.StartLoc)] local startedmeth = false if startedmeth then diff --git a/client/oxyruns.lua b/client/oxyruns.lua index 9ad39a8..68e23c3 100644 --- a/client/oxyruns.lua +++ b/client/oxyruns.lua @@ -15,8 +15,9 @@ end) -RegisterNetEvent("md-drugs:client:getoxylocationroute", function() - local CurrentLocation = Config.oxylocations[math.random(#Config.oxylocations)] +RegisterNetEvent("md-drugs:client:getoxylocationroute", function() + local config = lib.callback.await('md-drugs:server:getLocs', false) + local CurrentLocation = config.oxylocations[math.random(#config.oxylocations)] if CurrentLocation ~= nil then SetNewWaypoint(CurrentLocation.x, CurrentLocation.y) local current = "g_m_y_famdnf_01" diff --git a/client/travellingmerchant.lua b/client/travellingmerchant.lua index d679f3a..45f698f 100644 --- a/client/travellingmerchant.lua +++ b/client/travellingmerchant.lua @@ -4,9 +4,8 @@ CreateThread(function() local current = "g_m_y_famdnf_01" lib.requestModel(current, Config.RequestModelTime) local num = lib.callback.await('md-drugs:server:GetMerchant', false) - local CurrentLocation = Config.Travellingmerchant[num] - local travellingmerchant = CreatePed(0, current,CurrentLocation.x,CurrentLocation.y,CurrentLocation.z-1, CurrentLocation.w, false, false) - Freeze(travellingmerchant, true, CurrentLocation.w) + local travellingmerchant = CreatePed(0, current,num.x,num.y,num.z-1, num.w, false, false) + Freeze(travellingmerchant, true, num.w) AddSingleModel(travellingmerchant, { label = Lang.targets.travel.travel, icon = "fas fa-eye", action = function() makeMenu('travellingMerchant') diff --git a/client/weed.lua b/client/weed.lua index b146111..1199399 100644 --- a/client/weed.lua +++ b/client/weed.lua @@ -57,7 +57,7 @@ end) CreateThread(function() local config = lib.callback.await('md-drugs:server:getLocs', false) - AddBoxZoneMulti('weeddry', Config.WeedDry, { + AddBoxZoneMulti('weeddry', config.WeedDry, { name = 'dryweed', icon = "fas fa-sign-in-alt", label = Lang.targets.weed.dry, diff --git a/server/cornerselling.lua b/server/cornerselling.lua index 02ad356..87e9be7 100644 --- a/server/cornerselling.lua +++ b/server/cornerselling.lua @@ -1,18 +1,138 @@ local QBCore = exports['qb-core']:GetCoreObject() +local Drugs = { + ["weed_white-widow"] = {rep = 1,min = 15, max = 24 }, + ["weed_og-kush"] = {rep = 1,min = 15, max = 28 }, + ["weed_skunk"] = {rep = 1,min = 15, max = 31 }, + ["weed_amnesia"] = {rep = 1,min = 18, max = 34 }, + ["weed_purple-haze"] = {rep = 1,min = 18, max = 37}, + ["weed_ak47"] = {rep = 1,min = 18, max = 40}, + ["crack_baggy"] = {rep = 1,min = 18, max = 34}, + ["cokebaggy"] = {rep = 1,min = 18, max = 37}, + ["cokebaggystagetwo"] = {rep = 1,min = 18, max = 40}, + ["cokebaggystagethree"] = {rep = 1,min = 18, max = 40}, + ["heroin_ready"] = {rep = 1,min = 18, max = 40}, + ["heroin_readystagetwo"] = {rep = 1,min = 18, max = 40}, + ["heroin_readystagethree"] = {rep = 1,min = 18, max = 40}, + ["baggedcracked"] = {rep = 1,min = 18, max = 40}, + ["baggedcrackedstagetwo"] = {rep = 1,min = 18, max = 40}, + ["baggedcrackedstagethree"] = {rep = 1,min = 18, max = 40}, + ["white_playboys"] = {rep = 1,min = 18, max = 40}, + ["white_playboys2"] = {rep = 1,min = 18, max = 40}, + ["white_playboys3"] = {rep = 1,min = 18, max = 40}, + ["white_playboys4"] = {rep = 1,min = 18, max = 40}, + ["blue_playboys"] = {rep = 1,min = 18, max = 40}, + ["blue_playboys2"] = {rep = 1,min = 18, max = 40}, + ["blue_playboys3"] = {rep = 1,min = 18, max = 40}, + ["blue_playboys4"] = {rep = 1,min = 18, max = 40}, + ["red_playboys"] = {rep = 1,min = 18, max = 40}, + ["red_playboys2"] = {rep = 1,min = 18, max = 40}, + ["red_playboys3"] = {rep = 1,min = 18, max = 40}, + ["red_playboys4"] = {rep = 1,min = 18, max = 40}, + ["orange_playboys"] = {rep = 1,min = 18, max = 40}, + ["orange_playboys2"] = {rep = 1,min = 18, max = 40}, + ["orange_playboys3"] = {rep = 1,min = 18, max = 40}, + ["orange_playboys4"] = {rep = 1,min = 18, max = 40}, + ["white_aliens"] = {rep = 1,min = 18, max = 40}, + ["white_aliens2"] = {rep = 1,min = 18, max = 40}, + ["white_aliens3"] = {rep = 1,min = 18, max = 40}, + ["white_aliens4"] = {rep = 1,min = 18, max = 40}, + ["blue_aliens"] = {rep = 1,min = 18, max = 40}, + ["blue_aliens2"] = {rep = 1,min = 18, max = 40}, + ["blue_aliens3"] = {rep = 1,min = 18, max = 40}, + ["blue_aliens4"] = {rep = 1,min = 18, max = 40}, + ["red_aliens"] = {rep = 1,min = 18, max = 40}, + ["red_aliens2"] = {rep = 1,min = 18, max = 40}, + ["red_aliens3"] = {rep = 1,min = 18, max = 40}, + ["red_aliens4"] = {rep = 1,min = 18, max = 40}, + ["orange_aliens"] = {rep = 1,min = 18, max = 40}, + ["orange_aliens2"] = {rep = 1,min = 18, max = 40}, + ["orange_aliens3"] = {rep = 1,min = 18, max = 40}, + ["orange_aliens4"] = {rep = 1,min = 18, max = 40}, + ["white_pl"] = {rep = 1,min = 18, max = 40}, + ["white_pl2"] = {rep = 1,min = 18, max = 40}, + ["white_pl3"] = {rep = 1,min = 18, max = 40}, + ["white_pl4"] = {rep = 1,min = 18, max = 40}, + ["blue_pl"] = {rep = 1,min = 18, max = 40}, + ["blue_pl2"] = {rep = 1,min = 18, max = 40}, + ["blue_pl3"] = {rep = 1,min = 18, max = 40}, + ["blue_pl4"] = {rep = 1,min = 18, max = 40}, + ["red_pl"] = {rep = 1,min = 18, max = 40}, + ["red_pl2"] = {rep = 1,min = 18, max = 40}, + ["red_pl3"] = {rep = 1,min = 18, max = 40}, + ["red_pl4"] = {rep = 1,min = 18, max = 40}, + ["orange_pl"] = {rep = 1,min = 18, max = 40}, + ["orange_pl2"] = {rep = 1,min = 18, max = 40}, + ["orange_pl3"] = {rep = 1,min = 18, max = 40}, + ["orange_pl4"] = {rep = 1,min = 18, max = 40}, + ["white_trolls"] = {rep = 1,min = 18, max = 40}, + ["white_trolls2"] = {rep = 1,min = 18, max = 40}, + ["white_trolls3"] = {rep = 1,min = 18, max = 40}, + ["white_trolls4"] = {rep = 1,min = 18, max = 40}, + ["blue_trolls"] = {rep = 1,min = 18, max = 40}, + ["blue_trolls2"] = {rep = 1,min = 18, max = 40}, + ["blue_trolls3"] = {rep = 1,min = 18, max = 40}, + ["blue_trolls4"] = {rep = 1,min = 18, max = 40}, + ["red_trolls"] = {rep = 1,min = 18, max = 40}, + ["red_trolls2"] = {rep = 1,min = 18, max = 40}, + ["red_trolls3"] = {rep = 1,min = 18, max = 40}, + ["red_trolls4"] = {rep = 1,min = 18, max = 40}, + ["orange_trolls"] = {rep = 1,min = 18, max = 40}, + ["orange_trolls2"] = {rep = 1,min = 18, max = 40}, + ["orange_trolls3"] = {rep = 1,min = 18, max = 40}, + ["orange_trolls4"] = {rep = 1,min = 18, max = 40}, + ["white_cats"] = {rep = 1,min = 18, max = 40}, + ["white_cats2"] = {rep = 1,min = 18, max = 40}, + ["white_cats3"] = {rep = 1,min = 18, max = 40}, + ["white_cats4"] = {rep = 1,min = 18, max = 40}, + ["blue_cats"] = {rep = 1,min = 18, max = 40}, + ["blue_cats2"] = {rep = 1,min = 18, max = 40}, + ["blue_cats3"] = {rep = 1,min = 18, max = 40}, + ["blue_cats4"] = {rep = 1,min = 18, max = 40}, + ["red_cats"] = {rep = 1,min = 18, max = 40}, + ["red_cats2"] = {rep = 1,min = 18, max = 40}, + ["red_cats3"] = {rep = 1,min = 18, max = 40}, + ["red_cats4"] = {rep = 1,min = 18, max = 40}, + ["orange_cats"] = {rep = 1,min = 18, max = 40}, + ["orange_cats2"] = {rep = 1,min = 18, max = 40}, + ["orange_cats3"] = {rep = 1,min = 18, max = 40}, + ["orange_cats4"] = {rep = 1,min = 18, max = 40}, + ["blunts"] = {rep = 1,min = 18, max = 40}, + ["leanblunts"] = {rep = 1,min = 18, max = 40}, + ["dextroblunts"] = {rep = 1,min = 18, max = 40}, + ["chewyblunt"] = {rep = 1,min = 18, max = 40}, + ["blunt"] = {rep = 1,min = 18, max = 40}, + ["specialchocolate"] = {rep = 1,min = 18, max = 40}, + ["specialbrownie"] = {rep = 1,min = 18, max = 40}, + ["specialcookie"] = {rep = 1,min = 18, max = 40}, + ["specialmuffin"] = {rep = 1,min = 18, max = 40}, + ["shatter"] = {rep = 1,min = 18, max = 40}, + ["ciggie"] = {rep = 1,min = 18, max = 40}, + ["methbags"] = {rep = 1,min = 18, max = 40}, + ["driedmescaline"] = {rep = 1,min = 18, max = 40}, + ["shrooms"] = {rep = 1,min = 18, max = 40}, + ["gratefuldead_tabs"] = {rep = 1,min = 18, max = 40}, + ["bart_tabs"] = {rep = 1,min = 18, max = 40}, + ["pineapple_tabs"] = {rep = 1,min = 18, max = 40}, + ["yinyang_tabs"] = {rep = 1,min = 18, max = 40}, + ["wildcherry_tabs"] = {rep = 1,min = 18, max = 40}, + ["smiley_tabs"] = {rep = 1,min = 18, max = 40}, + ["cupoflean"] = {rep = 1,min = 18, max = 40}, + ["cupofdextro"] = {rep = 1,min = 18, max = 40}, +} lib.callback.register('md-drugs:server:cornerselling:getAvailableDrugs', function(source, cb) local Player = getPlayer(source) local rep = getRep(source, 'cornerselling') if not Player then return nil end local type = 0 - for k, v in pairs(QBConfig.DrugsPrice) do + for k, v in pairs(Drugs) do local item = Player.Functions.GetItemByName(k) if item and type == 0 then type = type + 1 Log(GetName(source) .. ' Allowed To Sell ' .. item.name .. '!' , 'cornerselling') local amount = math.random(1,item.amount) if amount >= 15 then amount = 15 end - local price = math.random(QBConfig.DrugsPrice[k]['min'], QBConfig.DrugsPrice[k]['max']) * amount + local price = math.random(Drugs[k]['min'], Drugs[k]['max']) * amount local result = math.floor(price * rep.price) return item.name, amount, result end @@ -26,22 +146,27 @@ end) RegisterNetEvent('md-drugs:server:sellCornerDrugs', function(item, amount, price) local src = source local Player = getPlayer(src) + local isIn = false + for k, v in pairs (Drugs) do + if item == k then + isIn = true + end + end + if not isIn then return end if RemoveItem(src, item, amount) then - AddRep(src, 'cornerselling', QBConfig.DrugsPrice[item].rep * amount) - Log(GetName(src) .. ' Sold ' .. amount .. ' Of ' .. item .. ' For A Price Of ' .. price .. '!' , 'cornerselling') if QBConfig.MarkedBills then - if price >= QBConfig.DrugsPrice[item]['min'] * amount and price <= QBConfig.DrugsPrice[item]['max'] * amount then - local info = { - worth = price - } - Player.Functions.AddItem('markedbills', 1, false, info ) - end + local info = { + worth = price + } + Player.Functions.AddItem('markedbills', 1, false, info ) elseif QBConfig.CustomDirtyMoney then AddItem(src, QBConfig.CustomDirtyMoneyitem, price) else Player.Functions.AddMoney('cash', price) end - end + AddRep(src, 'cornerselling', Drugs[item].rep * amount) + Log(GetName(src) .. ' Sold ' .. amount .. ' Of ' .. item .. ' For A Price Of ' .. price .. '!' , 'cornerselling') + end end) lib.addCommand('cornersell', { diff --git a/server/deliveries.lua b/server/deliveries.lua index 6f17ca4..c1fbeb5 100644 --- a/server/deliveries.lua +++ b/server/deliveries.lua @@ -14,7 +14,7 @@ lib.callback.register('md-drugs:server:getDealers', function(data) return check end end) - + lib.callback.register('md-drugs:server:GetDeliveryItem', function(data) local src = source diff --git a/server/oxyruns.lua b/server/oxyruns.lua index 283c520..4dbff99 100644 --- a/server/oxyruns.lua +++ b/server/oxyruns.lua @@ -3,7 +3,7 @@ QBCore = exports['qb-core']:GetCoreObject() lib.callback.register('md-drugs:server:payfortruck', function() local src = source local Player = getPlayer(src) - if Player.Functions.RemoveMoney('cash', Config.TruckPrice ) or Player.Functions.RemoveMoney('bank', Config.TruckPrice ) then + if Player.Functions.RemoveMoney('cash', 500) or Player.Functions.RemoveMoney('bank', 500) then Log(GetName(src) .. ' Rented A Van For OxyRuns', 'oxy') return true else @@ -17,24 +17,26 @@ RegisterServerEvent('md-drugs:server:giveoxybox', function() local src = source local Player = getPlayer(src) local chance = math.random(1,100) - local cash = Config.OxyRunCompleteCash + local cash = 200 local itemchance = math.random(1,100) - local item = Config.OxyRandItems[math.random(1, #Config.OxyRandItems)] - - if chance <= Config.OxyRunDitchChance then + local itemList = { + {item = 'oxy', amount = 2}, + {item = 'lockpick', amount = 1}, + {item = 'cryptostick', amount = 1}, + } + local item = itemList[math.random(1, #itemList)] + if chance <= 30 then Notifys(src, Lang.oxy.hot, "error") Player.Functions.AddMoney("cash", cash * 0.5) - if itemchance <= Config.OxyItemChance then - AddItem(src, item, Config.OxyItemAmount) - Log(GetName(source) .. ' Got ' .. Config.OxyItemAmount .. ' Of ' .. item .. ' For This Drop Off', 'oxy') + if itemchance <= 30 then + AddItem(src, item.item, item.amount) end else Notifys(Lang.oxy.next, "success") TriggerClientEvent("md-drugs:client:getoxylocationroute", src) Player.Functions.AddMoney("cash", cash) - if itemchance <= Config.OxyItemChance then - AddItem(src, item, Config.OxyItemAmount) - Log(GetName(source) .. ' Got ' .. Config.OxyItemAmount .. ' Of ' .. item .. ' For This Drop Off', 'oxy') + if itemchance <= 30 then + AddItem(src, item.item, item.amount) end end diff --git a/server/targets.lua b/server/targets.lua index f5e6676..596fe59 100644 --- a/server/targets.lua +++ b/server/targets.lua @@ -1,83 +1,113 @@ local Target = { - MakePowder = { + MakePowder = { -- where you chop your coca leaves to make powder {loc = vector3(1086.20, -3195.30, -39.20), l = 1.0, w = 1.0, rot = 45.0, gang = ""}, {loc = vector3(1090.15, -3199.5, -39.18), l = 1.0, w = 1.0, rot = 45.0, gang = ""}, {loc = vector3(1093.09, -3199.53, -39.05), l = 1.0, w = 1.0, rot = 45.0, gang = ""}, }, - CuttingCoke = { + CuttingCoke = { -- only active if Config.FancyCokeAnims = false {loc = vector3(1095.61, -3195.62, -39.13), l = 1.0, w = 1.0, rot = 45.0, gang = ""}, }, - BaggingCoke = { + BaggingCoke = { -- only active if Config.FancyCokeAnims = false {loc = vector3(1095.61, -3195.62, -39.13), l = 1.0, w = 1.0, rot = 45.0, gang = ""}, }, - makecrack = { + makecrack = { -- make crack with baking soda with cut coke 1-3 {loc = vector3(2434.07, 4969.39, 42.35), l = 1.0, w = 1.0, rot = 45.0, gang = ""}, }, - bagcrack = { + bagcrack = { --- bag crack 1-3 stages {loc = vector3(2435.85, 4965.3, 42.35), l = 1.0, w = 1.0, rot = 45.0, gang = ""}, }, - lysergicacid = { + lysergicacid = { -- get lysergic acid {loc = vector3(-1381.21, -327.75, 39.85), l = 1.0, w = 1.0, rot = 45.0, gang = ""}, {loc = vector3(2405.53, 5008.39, 46.02), l = 1.0, w = 1.0, rot = 45.0, gang = ""}, }, - diethylamide = { + diethylamide = { -- get diethylamide {loc = vector3(-1371.71, -316.02, 39.53), l = 1.0, w = 1.0, rot = 45.0, gang = ""}, {loc = vector3(2408.38, 5011.18, 46.08), l = 1.0, w = 1.0, rot = 45.0, gang = ""}, }, - gettabs = { + gettabs = { -- buy tab paper {loc = vector3(-1370.77, -314.51, 39.58), l = 1.0, w = 1.0, rot = 45.0, gang = ""}, {loc = vector3(2409.59, 5012.45, 46.09), l = 1.0, w = 1.0, rot = 45.0, gang = ""}, }, - dryplant = { + dryplant = { -- turn resin into powder {loc = vector3(-1353.77, -335.58, 43.92), l = 1.0, w = 1.0, rot = 45.0, gang = ""}, }, - cutheroinone = { + cutheroinone = { -- cut heroin stage 1-3 with baking soda {loc = vector3(-1360.14, -337.03, 43.92), l = 1.0, w = 1.0, rot = 45.0, gang = ""}, }, - fillneedle = { + fillneedle = { -- fill needles with heroin {loc = vector3(-1366.32, -334.40, 44.44), l = 1.0, w = 1.0, rot = 45.0, gang = ""}, }, - isosafrole = { + isosafrole = { -- where to steal isosafrole {loc = vector3(844.39, -902.92, 25.42), l = 1.0, w = 1.0, rot = 45.0, gang = ""}, }, - mdp2p = { + mdp2p = { -- where to steal mdp2p {loc = vector3(844.4, -898.79, 25.23), l = 1.0, w = 1.0, rot = 45.0, gang = ""}, }, - rawxtcloc = { + rawxtcloc = { -- where to combine the 2 ingridents to make raw xtc {loc = vector3(844.71, -910.33, 25.37), l = 1.0, w = 1.0, rot = 45.0, gang = ""}, }, - stamp = { + stamp = { -- where to stamp pills {loc = vector3(844.71, -900.56, 25.43), l = 1.0, w = 1.0, rot = 45.0, gang = ""}, }, - FillPrescription = { + FillPrescription = { -- where to fill out your prescription {loc = vector3(2432.89, 4252.2, 36.35), l = 1.0, w = 1.0, rot = 45.0, gang = ""}, }, singleSpot = { cutcoke = vector3(1093.17, -3195.74, -39.19), bagcokepowder = vector3(1090.29, -3195.66, -39.13), - CokeTeleIn = vector3(198.16, -1276.92, 29.33), - CokeTeleOut = vector3(1088.81, -3187.57, -38.99), - buylsdlabkit = vector4(2598.47, 5033.06, 105.86, 283.51), - buyheroinlabkit = vector4(-1358.77, -339.12, 43.92, 302.13), - buypress = vector3(845.82, -884.79, 25.18), - DryOut = vector3(2638.22, 4237.93, 44.78), - SyrupVendor = vector4(365.21, -578.77, 39.30, 347.23), - weedTelein = vector3(244.74, 374.54, 105.74), - weedTeleout = vector3(1066.31, -3183.36, -39.16), - MakeButter = vector3(1045.48, -3198.49, -38.22), - MakeOil = vector3(1038.90, -3198.66, -38.17), - WeedSaleman = vector4(1030.77, -3203.18, -38.2, 262.37), - MethTeleIn = vector3(-2222.04, 303.99, 174.6), - MethTeleOut = vector3(996.91, -3200.83, -36.39), - MethHeistStart = vector3(-1102.93, -3066.76, 14.00), - truckspawn = vector4(1450.87, -1482.13, 63.22, 69.95), - Payfortruck = vector3(1437.64, -1491.91, 63.62) + CokeTeleIn = vector3(198.16, -1276.92, 29.33), -- where you target to go inside coke + CokeTeleOut = vector3(1088.81, -3187.57, -38.99), -- where you target to leave coke + buylsdlabkit = vector4(2598.47, 5033.06, 105.86, 283.51), -- buy lab kit for lsd + buyheroinlabkit = vector4(-1358.77, -339.12, 43.92, 302.13), -- buy lab kit for heroin + buypress = vector3(845.82, -884.79, 25.18), -- buy lab kit for xtc + DryOut = vector3(2638.22, 4237.93, 44.78), -- Place to dry out mescaline into usuable drug + SyrupVendor = vector4(365.21, -578.77, 39.30, 347.23), -- where the mission ped starts + weedTelein = vector3(244.74, 374.54, 105.74), -- where you target to tele in + weedTeleout = vector3(1066.31, -3183.36, -39.16), -- where you target to tele out + MakeButter = vector3(1045.48, -3198.49, -38.22), -- where you make cannabutter and baked edibles + MakeOil = vector3(1038.90, -3198.66, -38.17), -- where you make shatter + WeedSaleman = vector4(1030.77, -3203.18, -38.2, 262.37), -- where the weed saleman is + MethTeleIn = vector3(-2222.04, 303.99, 174.6), -- where you target to tele in meth + MethTeleOut = vector3(996.91, -3200.83, -36.39), -- where you target to tele out meth + MethHeistStart = vector3(-1102.93, -3066.76, 14.00), -- where you get the mission to get ingridients if meth heist = true + truckspawn = vector4(1450.87, -1482.13, 63.22, 69.95), --- where the truck will spawn when you pay for it + Payfortruck = vector3(1437.64, -1491.91, 63.62), --- where you pay for the truck }, - MethEph = { + MethEph = { -- get ephedrine {loc = vector3(3559.86, 3673.9, 28.13), l = 1.0, w = 1.0, rot = 45.0, gang = ""}, }, - Methace = { + Methace = { -- get acetone {loc = vector3(3535.41, 3661.05, 28.12), l = 1.0, w = 1.0, rot = 45.0, gang = ""}, + }, + StartLoc = { -- where truck spawns for lean and meth missions + vector3(-2307.22, 434.77, 174.47), + vector3(614.75, 1786.26, 199.39), + vector3(-224.89, 6388.32, 31.59) + }, + WeedDry = { + {loc = vector3(1043.0, -3191.59, -38.39),}, + {loc = vector3(1041.0, -3191.59, -38.39),}, + {loc = vector3(1045.0, -3191.59, -38.39),}, + {loc = vector3(1039.0, -3191.59, -38.39),}, + }, + Travellingmerchant = { -- where the travelling merchant can spawn + vector4(-119.66, -977.43, 304.25, 88.21), + vector4(-1522.93, 1476.01, 111.45, 41.25), + vector4(-3278.98, 973.38, 5.35, 101.53), + }, + oxylocations = { + vector4(-2352.32, 266.78, 165.3, 23.46), + vector4(-1467.49, 874.01, 183.59, 298.45), + vector4(-856.71, 874.26, 202.85, 205.3), + vector4(950.58, -128.49, 74.42, 205.3), + vector4(1152.71, -328.43, 69.21, 205.3), + vector4(112.66, -1955.67, 20.75, 37.94), + vector4(-544.4, -1684.8, 19.89, 252.07), + vector4(-1185.02, -1805.4, 3.91, 184.83), + vector4(-1641.4, -981.99, 7.58, 35.38), + vector4(-1827.93, 782.36, 138.29, 219.99), + vector4(-320.84, 2818.73, 59.45, 337.22), + vector4(474.88, 2609.56, 44.48, 357.0), } } diff --git a/server/travellingmerchant.lua b/server/travellingmerchant.lua index 427d561..78d3ba5 100644 --- a/server/travellingmerchant.lua +++ b/server/travellingmerchant.lua @@ -1,5 +1,6 @@ local QBCore = exports['qb-core']:GetCoreObject() -local loc = math.random(1, #Config.Travellingmerchant) +local config = lib.callback.await('md-drugs:server:getLocs', false) +local loc = config.Travellingmerchant[math.random(1, #config.Travellingmerchant)] local stores = { travel = { {name = "tab_paper", price = 50, amount = 50, }, diff --git a/server/wholesale.lua b/server/wholesale.lua index 21961f3..59c3f9e 100644 --- a/server/wholesale.lua +++ b/server/wholesale.lua @@ -5,6 +5,14 @@ local lsd = {'smiley_tabs', 'yinyang_tabs', 'wildcherry_tabs', 'pineapple_tabs', local heroin = {'heroin_ready', 'heroin_readystagetwo', 'heroin_readystagethree'} local xtc = {"white_playboys", "white_playboys2", "white_playboys3", "white_playboys4", "blue_playboys", "blue_playboys2", "blue_playboys3", "blue_playboys4", "red_playboys", "red_playboys2", "red_playboys3", "red_playboys4", "orange_playboys", "orange_playboy2s", "orange_playboys3", "orange_playboys4", "white_aliens", "white_aliens2", "white_aliens3", "white_aliens4", "blue_aliens", "blue_aliens2", "blue_aliens3", "blue_aliens4", "red_aliens", "red_aliens3", "red_aliens2", "red_aliens4", "orange_aliens", "orange_aliens2", "orange_aliens3", "orange_aliens4", "white_pl", "white_pl2", "white_pl3", "white_pl4", "blue_pl", "blue_pl2", "blue_pl3", "blue_pl4", "red_pl", "red_pl2", "red_pl3", "red_pl4", "orange_pl", "orange_pl2", "orange_pl3", "orange_pl4", "white_trolls", "white_trolls2", "white_trolls3", "white_trolls4", "blue_trolls", "blue_trolls2", "blue_trolls3", "blue_trolls4", "red_trolls", "red_trolls2", "red_trolls3", "red_trolls4", "orange_trolls", "orange_trolls2", "orange_trolls3", "orange_trolls4", "white_cats2", "white_cats3", "white_cats4", "white_cats", "blue_cats", "blue_cats3", "blue_cats2", "blue_cats4", "red_cats", "red_cats2", "red_cats3", "red_cats4", "orange_cats", "orange_cats2", "orange_cats3", "orange_cats4" } +local Price = { + coke = {min = 20, max = 60}, + crack = {min = 20, max = 60}, + lsd = {min = 20, max = 60}, + heroin = {min = 20, max = 60}, + xtc = {min = 20, max = 60}, + +} QBCore.Functions.CreateUseableItem("cokeburner", function(source, item) local src = source local Player = getPlayer(source) @@ -14,7 +22,7 @@ end) RegisterServerEvent('md-drugs:server:wholesalecoke', function() local src = source local Player = getPlayer(src) - local price = math.random(Config.Wcoke.min, Config.Wcoke.max) + local price = math.random(Price['coke'].min, Price['coke'].max) for k, v in pairs(coke) do local item = Player.Functions.GetItemByName(v) @@ -36,7 +44,7 @@ end) RegisterServerEvent('md-drugs:server:wholesalecrack', function() local src = source local Player = getPlayer(src) - local price = math.random(Config.Wcrack.min, Config.Wcrack.max) + local price = math.random(Price['crack'].min, Price['crack'].max) for k, v in pairs(crack) do local item = Player.Functions.GetItemByName(v) if item and item.amount > 0 then @@ -58,7 +66,7 @@ end) RegisterServerEvent('md-drugs:server:wholesalelsd', function() local src = source local Player = getPlayer(src) - local price = math.random(Config.Wlsd.min, Config.Wlsd.max) + local price = math.random(Price['lsd'].min, Price['lsd'].max) for k, v in pairs(lsd) do local item = Player.Functions.GetItemByName(v) @@ -82,7 +90,7 @@ end) RegisterServerEvent('md-drugs:server:wholesaleheroin', function() local src = source local Player = getPlayer(src) - local price = math.random(Config.WHeroin.min, Config.WHeroin.max) + local price = math.random(Price['heroin'].min, Price['heroin'].max) for k, v in pairs(heroin) do local item = Player.Functions.GetItemByName(v) @@ -104,7 +112,7 @@ end) RegisterServerEvent('md-drugs:server:wholesalextc', function() local src = source local Player = getPlayer(src) - local price = math.random(Config.WXTC.min, Config.WXTC.max) + local price = math.random(Price['xtc'].min, Price['xtc'].max) for k, v in pairs(xtc) do local item = Player.Functions.GetItemByName(v) diff --git a/shared/config.lua b/shared/config.lua index 64f3f57..d2127f5 100644 --- a/shared/config.lua +++ b/shared/config.lua @@ -34,90 +34,22 @@ Config.Minigames = { glpath = {gridSize = 19, lives = 3, timelimit = 10000}, glspot = {gridSize = 6, timeLimit = 999999, charSet = "alphabet", required = 10}, glmath = {timeLimit = 300000}, - } + Config.minigametype = 'ox' -- look above for options or choose none if you dont want any minigames -------------- you can either set a gang or leave it blank, if blank it will autopopulate data to not require it :) ----- ---- -------------- Cocaine -- new animations require to be in a certain spot or they get fucky. uses bob74 ipl if you turn Config.FancyCokeAnims you can put it anywhere :) + Config.FancyCokeAnims = false -- if you want multi location this needs to be false Config.tabcost = 100 -- price per piece of tab paper event does 10 at a time Config.lsdlabkitcost = 10000 -- price of the lsd lab kit Config.heroinlabkitprice = 10000 -- price of the lsd lab kit Config.Badtrip = 20 -- number means % chance to spawn a clone that chases and attacks while on mescaline --------------- lean - -Config.StartLoc = { - vector3(-2307.22, 434.77, 174.47), -- where the truck spawns - vector3(614.75, 1786.26, 199.39), - vector3(-224.89, 6388.32, 31.59) -} - ----------- Pharma Config.PharmaJob = "ems" -- what TYPE role you need to be on to get the command - --------------- weed -Config.WeedDry = { -- where you dry leaves - {loc = vector3(1043.0, -3191.59, -38.39),}, - {loc = vector3(1041.0, -3191.59, -38.39),}, - {loc = vector3(1045.0, -3191.59, -38.39),}, - {loc = vector3(1039.0, -3191.59, -38.39),}, -} - Config.Joblock = false -- if you want weed to be a job Config.weedjob = "" -- what the job name is ------------------ Wholesale Config.SuccessfulChance = 90 --- this is the chance of a Success wholesale 1-100 Config.AlertPoliceWholesale = 90 -- 1-100 of how often it will alert police Config.WholesaleTimeout = 600 -- time in seconds to get to the location Config.PoliceCount = 0 -- Amount of police required -Config.Wcoke = { min = 20, max = 60} -- pricings per item -Config.Wcrack = { min = 20, max = 60} -- pricings per item -Config.Wlsd = { min = 20, max = 60} -- pricings per item -Config.WXTC = { min = 20, max = 60} -- pricings per item - - ---- travelling merchant - -Config.Travellingmerchant = { ------------ these are the random locations the merchant can spawn on script start. whatever you want for the merchant is in Config.Items right below - vector4(-119.66, -977.43, 304.25, 88.21), - vector4(-1522.93, 1476.01, 111.45, 41.25), - vector4(-3278.98, 973.38, 5.35, 101.53), -} - ---------------------------------------- oxy runs ----- How oxyruns work. You pay for a truck, you get in it and it gives a route. There is a 20% chance that the car will be "hot" and you have to ditch it. No Routes will spawn if that pops up ------ when you get to the drop off point third eye the truck. You will carry a box to the ped. He will give you cash, some oxy and maybe a random item. Rinse and repeat -Config.TruckPrice = 500 -- amount the truck will cost to rent -Config.OxyRunCompleteCash = 200 -- base price you get for completeing a run. 50% if the car needs to be ditched -Config.OxyRunDitchChance = 20 -- % of a fail mission and having to ditch the car and not get a new order -Config.OxyItemChance = 50 -- chance to recieve an item from the OxyRandItems list below -Config.OxyItemAmount = 1 -- amount of the item you recieve when you get an item from OxyRandItems Config.PoliceAlertOxy = 90 -- This is a % out of 100 to alert police - -Config.oxylocations = { -- These are different locations where a ped spawns. - vector4(-2352.32, 266.78, 165.3, 23.46), - vector4(-1467.49, 874.01, 183.59, 298.45), - vector4(-856.71, 874.26, 202.85, 205.3), - vector4(950.58, -128.49, 74.42, 205.3), - vector4(1152.71, -328.43, 69.21, 205.3), - vector4(112.66, -1955.67, 20.75, 37.94), - vector4(-544.4, -1684.8, 19.89, 252.07), - vector4(-1185.02, -1805.4, 3.91, 184.83), - vector4(-1641.4, -981.99, 7.58, 35.38), - vector4(-1827.93, 782.36, 138.29, 219.99), - vector4(-320.84, 2818.73, 59.45, 337.22), - vector4(474.88, 2609.56, 44.48, 357.0), -} - -Config.OxyRandItems = { -- random items you get for completing the mission - "oxy", - "lockpick", - "cryptostick", -} - - ----------------------- Meth Config Config.MethHeist = false \ No newline at end of file diff --git a/shared/qbdrugsrewrite.lua b/shared/qbdrugsrewrite.lua index cc0e6dc..057c38d 100644 --- a/shared/qbdrugsrewrite.lua +++ b/shared/qbdrugsrewrite.lua @@ -7,139 +7,6 @@ QBConfig.MinimumDrugSalePolice = 0 QBConfig.MarkedBills = true -- if false on both options below then it auto converts selling to give cash QBConfig.CustomDirtyMoney = false QBConfig.CustomDirtyMoneyitem = '' - -QBConfig.DrugsPrice = { - -- base qb - ["weed_white-widow"] = {rep = 1,min = 15, max = 24 }, - ["weed_og-kush"] = {rep = 1,min = 15, max = 28 }, - ["weed_skunk"] = {rep = 1,min = 15, max = 31 }, - ["weed_amnesia"] = {rep = 1,min = 18, max = 34 }, - ["weed_purple-haze"] = {rep = 1,min = 18, max = 37}, - ["weed_ak47"] = {rep = 1,min = 18, max = 40}, - ["crack_baggy"] = {rep = 1,min = 18, max = 34}, - ["cokebaggy"] = {rep = 1,min = 18, max = 37}, - -- cokerep = 1, - ["cokebaggystagetwo"] = {rep = 1,min = 18, max = 40}, - ["cokebaggystagethree"] = {rep = 1,min = 18, max = 40}, - -- heroin rep = 1, - ["heroin_ready"] = {rep = 1,min = 18, max = 40}, - ["heroin_readystagetwo"] = {rep = 1,min = 18, max = 40}, - ["heroin_readystagethree"] = {rep = 1,min = 18, max = 40}, - -- crackrep = 1, - ["baggedcracked"] = {rep = 1,min = 18, max = 40}, - ["baggedcrackedstagetwo"] = {rep = 1,min = 18, max = 40}, - ["baggedcrackedstagethree"] = {rep = 1,min = 18, max = 40}, - -- xtc rep = 1, - ["white_playboys"] = {rep = 1,min = 18, max = 40}, - ["white_playboys2"] = {rep = 1,min = 18, max = 40}, - ["white_playboys3"] = {rep = 1,min = 18, max = 40}, - ["white_playboys4"] = {rep = 1,min = 18, max = 40}, - ["blue_playboys"] = {rep = 1,min = 18, max = 40}, - ["blue_playboys2"] = {rep = 1,min = 18, max = 40}, - ["blue_playboys3"] = {rep = 1,min = 18, max = 40}, - ["blue_playboys4"] = {rep = 1,min = 18, max = 40}, - ["red_playboys"] = {rep = 1,min = 18, max = 40}, - ["red_playboys2"] = {rep = 1,min = 18, max = 40}, - ["red_playboys3"] = {rep = 1,min = 18, max = 40}, - ["red_playboys4"] = {rep = 1,min = 18, max = 40}, - ["orange_playboys"] = {rep = 1,min = 18, max = 40}, - ["orange_playboys2"] = {rep = 1,min = 18, max = 40}, - ["orange_playboys3"] = {rep = 1,min = 18, max = 40}, - ["orange_playboys4"] = {rep = 1,min = 18, max = 40}, - ["white_aliens"] = {rep = 1,min = 18, max = 40}, - ["white_aliens2"] = {rep = 1,min = 18, max = 40}, - ["white_aliens3"] = {rep = 1,min = 18, max = 40}, - ["white_aliens4"] = {rep = 1,min = 18, max = 40}, - ["blue_aliens"] = {rep = 1,min = 18, max = 40}, - ["blue_aliens2"] = {rep = 1,min = 18, max = 40}, - ["blue_aliens3"] = {rep = 1,min = 18, max = 40}, - ["blue_aliens4"] = {rep = 1,min = 18, max = 40}, - ["red_aliens"] = {rep = 1,min = 18, max = 40}, - ["red_aliens2"] = {rep = 1,min = 18, max = 40}, - ["red_aliens3"] = {rep = 1,min = 18, max = 40}, - ["red_aliens4"] = {rep = 1,min = 18, max = 40}, - ["orange_aliens"] = {rep = 1,min = 18, max = 40}, - ["orange_aliens2"] = {rep = 1,min = 18, max = 40}, - ["orange_aliens3"] = {rep = 1,min = 18, max = 40}, - ["orange_aliens4"] = {rep = 1,min = 18, max = 40}, - ["white_pl"] = {rep = 1,min = 18, max = 40}, - ["white_pl2"] = {rep = 1,min = 18, max = 40}, - ["white_pl3"] = {rep = 1,min = 18, max = 40}, - ["white_pl4"] = {rep = 1,min = 18, max = 40}, - ["blue_pl"] = {rep = 1,min = 18, max = 40}, - ["blue_pl2"] = {rep = 1,min = 18, max = 40}, - ["blue_pl3"] = {rep = 1,min = 18, max = 40}, - ["blue_pl4"] = {rep = 1,min = 18, max = 40}, - ["red_pl"] = {rep = 1,min = 18, max = 40}, - ["red_pl2"] = {rep = 1,min = 18, max = 40}, - ["red_pl3"] = {rep = 1,min = 18, max = 40}, - ["red_pl4"] = {rep = 1,min = 18, max = 40}, - ["orange_pl"] = {rep = 1,min = 18, max = 40}, - ["orange_pl2"] = {rep = 1,min = 18, max = 40}, - ["orange_pl3"] = {rep = 1,min = 18, max = 40}, - ["orange_pl4"] = {rep = 1,min = 18, max = 40}, - ["white_trolls"] = {rep = 1,min = 18, max = 40}, - ["white_trolls2"] = {rep = 1,min = 18, max = 40}, - ["white_trolls3"] = {rep = 1,min = 18, max = 40}, - ["white_trolls4"] = {rep = 1,min = 18, max = 40}, - ["blue_trolls"] = {rep = 1,min = 18, max = 40}, - ["blue_trolls2"] = {rep = 1,min = 18, max = 40}, - ["blue_trolls3"] = {rep = 1,min = 18, max = 40}, - ["blue_trolls4"] = {rep = 1,min = 18, max = 40}, - ["red_trolls"] = {rep = 1,min = 18, max = 40}, - ["red_trolls2"] = {rep = 1,min = 18, max = 40}, - ["red_trolls3"] = {rep = 1,min = 18, max = 40}, - ["red_trolls4"] = {rep = 1,min = 18, max = 40}, - ["orange_trolls"] = {rep = 1,min = 18, max = 40}, - ["orange_trolls2"] = {rep = 1,min = 18, max = 40}, - ["orange_trolls3"] = {rep = 1,min = 18, max = 40}, - ["orange_trolls4"] = {rep = 1,min = 18, max = 40}, - ["white_cats"] = {rep = 1,min = 18, max = 40}, - ["white_cats2"] = {rep = 1,min = 18, max = 40}, - ["white_cats3"] = {rep = 1,min = 18, max = 40}, - ["white_cats4"] = {rep = 1,min = 18, max = 40}, - ["blue_cats"] = {rep = 1,min = 18, max = 40}, - ["blue_cats2"] = {rep = 1,min = 18, max = 40}, - ["blue_cats3"] = {rep = 1,min = 18, max = 40}, - ["blue_cats4"] = {rep = 1,min = 18, max = 40}, - ["red_cats"] = {rep = 1,min = 18, max = 40}, - ["red_cats2"] = {rep = 1,min = 18, max = 40}, - ["red_cats3"] = {rep = 1,min = 18, max = 40}, - ["red_cats4"] = {rep = 1,min = 18, max = 40}, - ["orange_cats"] = {rep = 1,min = 18, max = 40}, - ["orange_cats2"] = {rep = 1,min = 18, max = 40}, - ["orange_cats3"] = {rep = 1,min = 18, max = 40}, - ["orange_cats4"] = {rep = 1,min = 18, max = 40}, - -- weed stuffrep = 1, - ["blunts"] = {rep = 1,min = 18, max = 40}, - ["leanblunts"] = {rep = 1,min = 18, max = 40}, - ["dextroblunts"] = {rep = 1,min = 18, max = 40}, - ["chewyblunt"] = {rep = 1,min = 18, max = 40}, - ["blunt"] = {rep = 1,min = 18, max = 40}, - ["specialchocolate"] = {rep = 1,min = 18, max = 40}, - ["specialbrownie"] = {rep = 1,min = 18, max = 40}, - ["specialcookie"] = {rep = 1,min = 18, max = 40}, - ["specialmuffin"] = {rep = 1,min = 18, max = 40}, - ["shatter"] = {rep = 1,min = 18, max = 40}, - ["ciggie"] = {rep = 1,min = 18, max = 40}, - -- methrep = 1, - ["methbags"] = {rep = 1,min = 18, max = 40}, - -- mescalinerep = 1, - ["driedmescaline"] = {rep = 1,min = 18, max = 40}, - -- shroomsrep = 1, - ["shrooms"] = {rep = 1,min = 18, max = 40}, - -- LSDrep = 1, - ["gratefuldead_tabs"] = {rep = 1,min = 18, max = 40}, - ["bart_tabs"] = {rep = 1,min = 18, max = 40}, - ["pineapple_tabs"] = {rep = 1,min = 18, max = 40}, - ["yinyang_tabs"] = {rep = 1,min = 18, max = 40}, - ["wildcherry_tabs"] = {rep = 1,min = 18, max = 40}, - ["smiley_tabs"] = {rep = 1,min = 18, max = 40}, - -- lean - ["cupoflean"] = {rep = 1,min = 18, max = 40}, - ["cupofdextro"] = {rep = 1,min = 18, max = 40}, -} - QBConfig.Dealers = {} QBConfig.DeliveryItems = {