diff --git a/client/functions.lua b/client/functions.lua index bf93d47..7463b07 100644 --- a/client/functions.lua +++ b/client/functions.lua @@ -358,17 +358,17 @@ function AddBoxZoneMulti(name, table, data) end end end - -function AddBoxZoneMultiOptions(name, loc, data) - - if Config.Target == 'qb' then - exports['qb-target']:AddBoxZone(name .. k, v.loc, 1.5, 1.75, {name = name..k, minZ = v.loc.z-1.50,maxZ = v.loc.z +1.5}, - { options = data, distance = 2.5}) - elseif Config.Target == 'ox' then - exports.ox_target:addBoxZone({coords = v.loc, size = vec3(1,1,1), options = data }) - end - end - + +function AddBoxZoneMultiOptions(name, loc, data) + + if Config.Target == 'qb' then + exports['qb-target']:AddBoxZone(name , loc, 1.5, 1.75, {name = name, minZ = loc.z-1.50,maxZ = loc.z +1.5}, + { options = data, distance = 2.5}) + elseif Config.Target == 'ox' then + exports.ox_target:addBoxZone({coords = loc, size = vec3(1,1,1), options = data }) + end + end + function AddSingleModel(model, data, num) if Config.Target == 'qb' then diff --git a/client/meth.lua b/client/meth.lua index 0d3666a..a96aec5 100644 --- a/client/meth.lua +++ b/client/meth.lua @@ -74,25 +74,23 @@ end) CreateThread(function() - AddBoxZoneSingle("methTeleOut",Config.MethTeleIn, {name = 'teleout', icon = "fas fa-sign-in-alt", label = "Enter Building", action = function() SetEntityCoords(PlayerPedId(), Config.MethTeleIn) end} ) - AddBoxZoneSingle("methtelein",Config.MethTeleOut, {name = 'teleout', icon = "fas fa-sign-in-alt", label = "Enter Building", action = function() SetEntityCoords(PlayerPedId(), Config.MethTeleOut) end} ) + AddBoxZoneSingle("methTeleOut",Config.MethTeleIn, {name = 'teleout', icon = "fas fa-sign-in-alt", label = "Enter Building", action = function() SetEntityCoords(PlayerPedId(), Config.MethTeleOut) end} ) + AddBoxZoneSingle("methtelein",Config.MethTeleOut, {name = 'teleout', icon = "fas fa-sign-in-alt", label = "Exit Building", action = function() SetEntityCoords(PlayerPedId(), Config.MethTeleIn) end} ) local options = { - { name = 'methcook', icon = "fas fa-sign-in-alt", label = "Cook Meth", - action = function() startcook() end, - onSelect = function() startcook() end, - canInteract = function() + { name = 'methcook', icon = "fas fa-sign-in-alt", label = "Cook Meth", distance = 2.5, action = function() startcook() end, onSelect = function() startcook() end, + canInteract = function() if amonia == nil and active == nil then return true end end, }, - { name = 'grabtray', icon = "fas fa-sign-in-alt", label = "Grab Tray", action = function() trayscarry() end, + { name = 'grabtray', icon = "fas fa-sign-in-alt", label = "Grab Tray", distance = 2.5, onSelect = function() trayscarry() end, action = function() trayscarry() end, canInteract = function() if heated and amonia and tray == nil then return true end end, }, } - AddBoxZoneMultiOptions("cookmeth",vector3(1005.7, -3201.28, -39.55), options ) + AddBoxZoneMultiOptions("cookmeth",vector3(1005.72, -3200.33, -38.52), options ) AddBoxZoneSingle('boxmeth', vector3(1012.15, -3194.04, -39.20), {name = 'boxmeth',icon = "fas fa-sign-in-alt",label = "Box Up Meth",action = function() smash()end, canInteract = function() if tray then return true end diff --git a/items_install/item_names/ox_inventory.txt b/items_install/item_names/ox_inventory.md similarity index 99% rename from items_install/item_names/ox_inventory.txt rename to items_install/item_names/ox_inventory.md index df45868..ae6540e 100644 --- a/items_install/item_names/ox_inventory.txt +++ b/items_install/item_names/ox_inventory.md @@ -1,4 +1,5 @@ --md-drugs copy and paste below items to ox_inventory/data/items.lua + ``` ["coke"] = { label = "Raw Cocaine", weight = 1000, @@ -2169,3 +2170,4 @@ image = "dextrobluntwrap.png", } }, +``` diff --git a/items_install/item_names/qb-inventory.txt b/items_install/item_names/qb-inventory.md similarity index 99% rename from items_install/item_names/qb-inventory.txt rename to items_install/item_names/qb-inventory.md index af77b31..6695933 100644 --- a/items_install/item_names/qb-inventory.txt +++ b/items_install/item_names/qb-inventory.md @@ -1,4 +1,7 @@ ------------------- md-drugs Add the following Items to qb-core/shared/items.lua and - Add item images to your inventory script +------------------ + +### md-drugs Add the following Items to qb-core/shared/items.lua and - Add item images to your inventory script +``` coke = {name = "coke", label = "Raw Cocaine", weight = 1000, type = "item", image = "coke.png", unique = false, useable = false, shouldClose = false, combinable = nil, description = "Raw Cocaine"}, coca_leaf = {name = "coca_leaf", label = "Cocaine leaves", weight = 1500, type = "item", image = "coca_leaf.png", unique = false, useable = false, shouldClose = false, combinable = nil, description = "Cocaine leaves that must be processed !"}, poppyresin = {name = "poppyresin", label = "Poppy resin", weight = 2000, type = "item", image = "poppyresin.png", unique = false, useable = false, shouldClose = false, combinable = nil, description = "It sticks to your fingers when you handle it."}, @@ -224,4 +227,5 @@ leancup = {name = "leancup", label = "Empty Cup", weight = 100, type = "item", image = "leancup.png", unique = false, useable = true, shouldClose = true, combinable = nil, description = ""}, cupoflean = {name = "cupoflean", label = "Lean Cup", weight = 100, type = "item", image = "cupoflean.png", unique = false, useable = true, shouldClose = true, combinable = nil, description = ""}, cupofdextro = {name = "cupofdextro", label = "Dextro Cup", weight = 100, type = "item", image = "cupofdextro.png", unique = false, useable = true, shouldClose = true, combinable = nil, description = ""}, - xtcburner = {name = "xtcburner", label = "XTC Burner", weight = 100, type = "item", image = "gta5phone.png", unique = false, useable = true, shouldClose = true, combinable = nil, description = ""}, \ No newline at end of file + xtcburner = {name = "xtcburner", label = "XTC Burner", weight = 100, type = "item", image = "gta5phone.png", unique = false, useable = true, shouldClose = true, combinable = nil, description = ""}, + ``` \ No newline at end of file diff --git a/patchnotes.txt b/patchnotes.txt index b67b5b2..543cb64 100644 --- a/patchnotes.txt +++ b/patchnotes.txt @@ -99,5 +99,5 @@ its what you imagine, about 80-90% of the recipes for md-drugs Is there bugs, probably. But im tired of beta testing it over and over so please report bugs to my discord where i can see them and patch them quickly. - - +3.7.0 -> 3.7.1 +slight bug fixes with ox items meth targeting diff --git a/server/functions.lua b/server/functions.lua index 375a056..5e71cf2 100644 --- a/server/functions.lua +++ b/server/functions.lua @@ -111,7 +111,9 @@ function Itemcheck(source, item, amount) end end end - +RegisterCommand('testitem', function(source) +if not Itemcheck(source,'lockpick', 10) then return end +end) function GetCoords(source) local ped = GetPlayerPed(source) local playerCoords = GetEntityCoords(ped) @@ -207,7 +209,7 @@ function getRep(source, type) dealerrep = Player.PlayerData.metadata.dealerrep or 0, }) MySQL.insert('INSERT INTO drugrep SET cid = ?, drugrep = ?, name = ?', {Player.PlayerData.citizenid, table, GetName(source)}) - return false + return 0 else local rep = json.decode(sql[1].drugrep) if type == 'coke' then @@ -237,7 +239,7 @@ function GetAllRep(source) }) MySQL.insert('INSERT INTO drugrep SET cid = ?, drugrep = ?, name = ?', {Player.PlayerData.citizenid, table, GetName(source)}) Wait(1000) - return false + return 0 else local rep = json.decode(sql[1].drugrep) return rep diff --git a/shared/config.lua b/shared/config.lua index a52d539..b00af17 100644 --- a/shared/config.lua +++ b/shared/config.lua @@ -1,6 +1,6 @@ Config = {} --Ignore. -Config.Target = 'qb' -- qb or ox +Config.Target = 'ox' -- qb or ox Config.respawnTime = 150 -- Seconds Config.Fuel = "LegacyFuel" -- type the name of script you use i.e. ps-fuel, cdn-fuel, LegacyFuel Config.TierSystem = true -- allows for three tiers of certain drugs ( coke, heroin, crack, lsd)