diff --git a/client/functions.lua b/client/functions.lua index c2dc04b..8204e5c 100644 --- a/client/functions.lua +++ b/client/functions.lua @@ -641,21 +641,12 @@ function StartRay2() until run == false end - -RegisterNetEvent('QBCore:Client:OnPlayerLoaded', function() - Wait(3000) - LoadModel('prop_plant_01b') LoadModel('prop_plant_01a') LoadModel('prop_cactus_03') LoadModel('bkr_prop_weed_lrg_01b') - local check = lib.callback.await('md-drugs:server:GetRep', false) - return -end) - -AddEventHandler('onResourceStart', function(resource) - if resource == GetCurrentResourceName() then - LoadModel('prop_plant_01b') LoadModel('prop_plant_01a') LoadModel('prop_cactus_03') LoadModel('bkr_prop_weed_lrg_01b') - end -end) - CreateThread(function() + LoadModel('prop_plant_01b') + LoadModel('prop_plant_01a') + LoadModel('prop_cactus_03') + LoadModel('prop_weed_01') + TriggerEvent('weed:init') TriggerEvent('heroin:init') TriggerEvent('coke:init') TriggerEvent('Mescaline:init') diff --git a/client/weed.lua b/client/weed.lua index 4f93edb..9541254 100644 --- a/client/weed.lua +++ b/client/weed.lua @@ -33,9 +33,10 @@ end) RegisterNetEvent("weed:init", function() for k, v in pairs (GlobalState.WeedPlant) do local hash = GetHashKey(v.model) - if not HasModelLoaded(hash) then LoadModel(hash) end + lib.requestModel('prop_weed_01', 1000) if not v.taken then WeedPlant[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z-3.5, false, true, true) + print(WeedPlant[k]) Freeze(WeedPlant[k],true, v.heading) AddSingleModel(WeedPlant[k], {icon = "fas fa-hand",label = Lang.targets.weed.pick, action = function() pick(k) end}, k) end diff --git a/server/cocaine.lua b/server/cocaine.lua index e34859c..de14b02 100644 --- a/server/cocaine.lua +++ b/server/cocaine.lua @@ -128,11 +128,12 @@ for k, v in pairs (cokecut) do CUI(k, function(source, item) local src = source local Player = getPlayer(src) + if not Player.Functions.GetItemByName('bakingsoda') then Notifys(src, 'You Need Baking Soda For this', 'error') return end if Player.Functions.GetItemByName(item.name) then if not Itemcheck(src, 'bakingsoda', 1) then return end local check = lib.callback.await('md-drugs:client:uncuff', src, 'Cutting It Further') if not check then return end - if RemoveItem(src, k, 1) and RemoveItem(src, k, 1) then + if RemoveItem(src, k, 1) and RemoveItem(src, 'bakingsoda', 1) then AddItem(src, 'loosecoke', v) end end diff --git a/server/deliveries.lua b/server/deliveries.lua index d39b8b8..b62d4aa 100644 --- a/server/deliveries.lua +++ b/server/deliveries.lua @@ -79,7 +79,6 @@ local dloc = { {coords = vector4(106.24, -1280.32, 29.24, 350.89)}, {coords = vector4(223.98, 121.53, 102.76, 259.68)}, {coords = vector4(102.19, -255.02, 50.05, 83.59)}, - } lib.callback.register('md-drugs:server:getDealers', function(data) local check = MySQL.query.await('SELECT * FROM dealers', {}) diff --git a/server/pharma.lua b/server/pharma.lua index 62ea2d3..3949ddf 100644 --- a/server/pharma.lua +++ b/server/pharma.lua @@ -2,10 +2,11 @@ local QBCore = exports['qb-core']:GetCoreObject() local function GetJob(source) local src = source - local Player = getPlayer(src) + local Player = getPlayer(src) if Player.PlayerData.job.type == 'ems' then return true else + Notifys(src, 'You Must Be EMS To Do This', 'error') return false end end diff --git a/server/recipes.lua b/server/recipes.lua index bf0fae3..fc7ce8b 100644 --- a/server/recipes.lua +++ b/server/recipes.lua @@ -48,7 +48,7 @@ local recipe = { }, fillneedle = { tier1 = {take = {heroinvial = 1, needle = 1}, give = {heroin_ready = 1}}, - tier2 = {take = {heroin_readystagetwo = 1, needle = 1}, give = {heroin_readystagetwo = 1}}, + tier2 = {take = {heroinvialstagetwo = 1, needle = 1}, give = {heroin_readystagetwo = 1}}, tier3 = {take = {heroinvialstagethree = 1, needle = 1}, give = {heroin_readystagethree = 1}}, } }, diff --git a/server/weed.lua b/server/weed.lua index 27f04a8..8e87e36 100644 --- a/server/weed.lua +++ b/server/weed.lua @@ -1,38 +1,38 @@ local QBCore = exports['qb-core']:GetCoreObject() local weedPlant = { - { location = vector3(1049.63, -3202.12, -39.15), heading = 334.49, model = "bkr_prop_weed_lrg_01b"}, - { location = vector3(1050.85, -3202.15, -39.15), heading = 329.56, model = "bkr_prop_weed_lrg_01b"}, - { location = vector3(1052.01, -3202.22, -39.13), heading = 25.16, model = "bkr_prop_weed_lrg_01b"}, - { location = vector3(1052.99, -3202.15, -39.15), heading = 21.52, model = "bkr_prop_weed_lrg_01b"}, - { location = vector3(1053.08, -3201.11, -39.13), heading = 202.97, model = "bkr_prop_weed_lrg_01b"}, - { location = vector3(1052.91, -3199.99, -39.14), heading = 202.97, model = "bkr_prop_weed_lrg_01b"}, - { location = vector3(1053.02, -3198.97, -39.11), heading = 202.97, model = "bkr_prop_weed_lrg_01b"}, - { location = vector3(1051.95, -3198.93, -39.11), heading = 202.97, model = "bkr_prop_weed_lrg_01b"}, - { location = vector3(1051.96, -3199.86, -39.12), heading = 202.97, model = "bkr_prop_weed_lrg_01b"}, - { location = vector3(1051.93, -3201.17, -39.12), heading = 202.97, model = "bkr_prop_weed_lrg_01b"}, - { location = vector3(1050.98, -3201.13, -39.14), heading = 202.97, model = "bkr_prop_weed_lrg_01b"}, - { location = vector3(1050.89, -3200.07, -39.12), heading = 202.97, model = "bkr_prop_weed_lrg_01b"}, - { location = vector3(1050.89, -3198.95, -39.15), heading = 202.97, model = "bkr_prop_weed_lrg_01b"}, - { location = vector3(1049.72, -3198.95, -39.15), heading = 202.97, model = "bkr_prop_weed_lrg_01b"}, - { location = vector3(1049.98, -3200.1, -39.14), heading = 202.97, model = "bkr_prop_weed_lrg_01b"}, - { location = vector3(1049.82, -3201.01, -39.15), heading = 202.97, model = "bkr_prop_weed_lrg_01b"}, - { location = vector3(1053.07, -3194.51, -39.15), heading = 334.49, model = "bkr_prop_weed_lrg_01b"}, - { location = vector3(1052.97, -3195.55, -39.15), heading = 329.56, model = "bkr_prop_weed_lrg_01b"}, - { location = vector3(1052.82, -3196.58, -39.15), heading = 25.16, model = "bkr_prop_weed_lrg_01b"}, - { location = vector3(1052.94, -3197.59, -39.15), heading = 21.52, model = "bkr_prop_weed_lrg_01b"}, - { location = vector3(1051.92, -3197.54, -39.14), heading = 202.97, model = "bkr_prop_weed_lrg_01b"}, - { location = vector3(1051.88, -3196.61, -39.15), heading = 202.97, model = "bkr_prop_weed_lrg_01b"}, - { location = vector3(1051.82, -3195.52, -39.15), heading = 202.97, model = "bkr_prop_weed_lrg_01b"}, - { location = vector3(1051.95, -3194.38, -39.15), heading = 202.97, model = "bkr_prop_weed_lrg_01b"}, - { location = vector3(1050.88, -3194.31, -39.15), heading = 202.97, model = "bkr_prop_weed_lrg_01b"}, - { location = vector3(1050.78, -3195.29, -39.15), heading = 202.97, model = "bkr_prop_weed_lrg_01b"}, - { location = vector3(1050.76, -3196.49, -39.15), heading = 202.97, model = "bkr_prop_weed_lrg_01b"}, - { location = vector3(1050.77, -3197.62, -39.15), heading = 202.97, model = "bkr_prop_weed_lrg_01b"}, - { location = vector3(1049.64, -3197.61, -39.14), heading = 202.97, model = "bkr_prop_weed_lrg_01b"}, - { location = vector3(1049.64, -3196.59, -39.15), heading = 202.97, model = "bkr_prop_weed_lrg_01b"}, - { location = vector3(1049.62, -3195.51, -39.15), heading = 202.97, model = "bkr_prop_weed_lrg_01b"}, - { location = vector3(1049.66, -3194.36, -39.15), heading = 202.97, model = "bkr_prop_weed_lrg_01b"}, + { location = vector3(1049.63, -3202.12, -36.75), heading = 334.49, model = "prop_weed_01"}, + { location = vector3(1050.85, -3202.15, -36.75), heading = 329.56, model = "prop_weed_01"}, + { location = vector3(1052.01, -3202.22, -36.75), heading = 25.16, model = "prop_weed_01"}, + { location = vector3(1052.99, -3202.15, -36.75), heading = 21.52, model = "prop_weed_01"}, + { location = vector3(1053.08, -3201.11, -36.75), heading = 202.97, model = "prop_weed_01"}, + { location = vector3(1052.91, -3199.99, -36.75), heading = 202.97, model = "prop_weed_01"}, + { location = vector3(1053.02, -3198.97, -36.75), heading = 202.97, model = "prop_weed_01"}, + { location = vector3(1051.95, -3198.93, -36.75), heading = 202.97, model = "prop_weed_01"}, + { location = vector3(1051.96, -3199.86, -36.75), heading = 202.97, model = "prop_weed_01"}, + { location = vector3(1051.93, -3201.17, -36.75), heading = 202.97, model = "prop_weed_01"}, + { location = vector3(1050.98, -3201.13, -36.75), heading = 202.97, model = "prop_weed_01"}, + { location = vector3(1050.89, -3200.07, -36.75), heading = 202.97, model = "prop_weed_01"}, + { location = vector3(1050.89, -3198.95, -36.75), heading = 202.97, model = "prop_weed_01"}, + { location = vector3(1049.72, -3198.95, -36.75), heading = 202.97, model = "prop_weed_01"}, + { location = vector3(1049.98, -3200.1, -36.75), heading = 202.97, model = "prop_weed_01"}, + { location = vector3(1049.82, -3201.01, -36.75), heading = 202.97, model = "prop_weed_01"}, + { location = vector3(1053.07, -3194.51, -36.75), heading = 334.49, model = "prop_weed_01"}, + { location = vector3(1052.97, -3195.55, -36.75), heading = 329.56, model = "prop_weed_01"}, + { location = vector3(1052.82, -3196.58, -36.75), heading = 25.16, model = "prop_weed_01"}, + { location = vector3(1052.94, -3197.59, -36.75), heading = 21.52, model = "prop_weed_01"}, + { location = vector3(1051.92, -3197.54, -36.75), heading = 202.97, model = "prop_weed_01"}, + { location = vector3(1051.88, -3196.61, -36.75), heading = 202.97, model = "prop_weed_01"}, + { location = vector3(1051.82, -3195.52, -36.75), heading = 202.97, model = "prop_weed_01"}, + { location = vector3(1051.95, -3194.38, -36.75), heading = 202.97, model = "prop_weed_01"}, + { location = vector3(1050.88, -3194.31, -36.75), heading = 202.97, model = "prop_weed_01"}, + { location = vector3(1050.78, -3195.29, -36.75), heading = 202.97, model = "prop_weed_01"}, + { location = vector3(1050.76, -3196.49, -36.75), heading = 202.97, model = "prop_weed_01"}, + { location = vector3(1050.77, -3197.62, -36.75), heading = 202.97, model = "prop_weed_01"}, + { location = vector3(1049.64, -3197.61, -36.75), heading = 202.97, model = "prop_weed_01"}, + { location = vector3(1049.64, -3196.59, -36.75), heading = 202.97, model = "prop_weed_01"}, + { location = vector3(1049.62, -3195.51, -36.75), heading = 202.97, model = "prop_weed_01"}, + { location = vector3(1049.66, -3194.36, -36.75), heading = 202.97, model = "prop_weed_01"}, } GlobalState.WeedPlant = weedPlant diff --git a/shared/config.lua b/shared/config.lua index 2448a44..ea659b4 100644 --- a/shared/config.lua +++ b/shared/config.lua @@ -6,7 +6,7 @@ Config.TierSystem = true -- allows for three tiers of certain drugs ( coke, hero Config.StupidassNewQbItemName = true -- true if you have updated your items.lua from base qb after november 2023 because changing item names this far in a framework is 3 IQ points total Config.RequestModelTime = 30000 -- if you need more time than this, uhhhh wow Config.FancyCokeAnims = true -- if you want multi location this needs to be false -Config.Inventory = 'qb' -- qb or ox, other if you dont use ox just mark as qb + Config.Joblock = false -- if you want weed to be a job Config.weedjob = "" -- what the job name is Config.Badtrip = 20 -- number means % chance to spawn a clone that chases and attacks while on mescaline @@ -14,7 +14,7 @@ Config.MethHeist = false 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 = 2 -- Amount of police required +Config.PoliceCount = 0 -- Amount of police required Config.PoliceAlertOxy = 90 -- This is a % out of 100 to alert police ----------------------------------- TierSystem levels ** ONLY IN USE IF CONFIG.TIERSYTEM IS TRUE @@ -27,6 +27,7 @@ Config.Notify = 'ox' -- -- either 'qb' or 'ox' or 'okok' Config.Phone = 'qb' -- either 'qb' or 'yflip' or 'qs' Config.Dispatch = 'ps' -- either 'ps', 'cd', 'core', 'aty' Config.Target = 'ox' -- qb or ox +Config.Inventory = 'ox' -- qb or ox, other if you dont use ox just mark as qb Config.Minigames = { ps_circle = {amount = 2, speed = 8,}, ps_maze = {timelimit = 15}, @@ -45,7 +46,7 @@ Config.Minigames = { glspot = {gridSize = 6, timeLimit = 999999, charSet = "alphabet", required = 10}, glmath = {timeLimit = 300000}, } -Config.minigametype = 'blrapidlines' -- look above for options or choose none if you dont want any minigames +Config.minigametype = 'ox' -- look above for options or choose none if you dont want any minigames -------- Woah Where did like all the locations go? --- read the readme to find out \ No newline at end of file