update to fix

should fix ox items issues
This commit is contained in:
Mustache Dom committed 2024-09-28 18:17:25 -07:00
1 parent 85fc0a4b67
commit 388c32939b
7 files changed
+23 -17

No files matched your search

+2 -2
View File
@@ -362,10 +362,10 @@ 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},
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 = v.loc, size = vec3(1,1,1), options = data })
exports.ox_target:addBoxZone({coords = loc, size = vec3(1,1,1), options = data })
end
end
+6 -8
View File
@@ -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
@@ -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",
}
},
```
@@ -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."},
@@ -225,3 +228,4 @@
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 = ""},
```
+2 -2
View File
@@ -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
+5 -3
View File
@@ -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
+1 -1
View File
@@ -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)