Merge pull request #12 from RazerGhost/main

This commit is contained in:
Mustache Dom authored and GitHub committed 2024-01-02 15:03:00 -08:00
commit a7e4f8bf71
1 file changed
+157 -154
+157 -154
View File
@@ -5,20 +5,20 @@ local heated = nil
CreateThread(function() CreateThread(function()
BikerMethLab = exports['bob74_ipl']:GetBikerMethLabObject() BikerMethLab = exports['bob74_ipl']:GetBikerMethLabObject()
BikerMethLab.Style.Set(BikerMethLab.Style.upgrade) BikerMethLab.Style.Set(BikerMethLab.Style.upgrade)
BikerMethLab.Security.Set(BikerMethLab.Security.upgrade) BikerMethLab.Security.Set(BikerMethLab.Security.upgrade)
BikerMethLab.Details.Enable(BikerMethLab.Details.production, true) BikerMethLab.Details.Enable(BikerMethLab.Details.production, true)
RefreshInterior(BikerMethLab.interiorId) RefreshInterior(BikerMethLab.interiorId)
end) end)
CreateThread(function() CreateThread(function()
exports['qb-target']:AddBoxZone("methteleout",Config.MethTeleIn, 1.5, 1.75, { -- 963.37, .z-2122.95, 31.47 exports['qb-target']:AddBoxZone("methteleout", Config.MethTeleIn, 1.5, 1.75, { -- 963.37, .z-2122.95, 31.47
name = "methteleout", name = "methteleout",
heading = 11.0, heading = 11.0,
debugPoly = false, debugPoly = false,
minZ = Config.MethTeleIn.z-2, minZ = Config.MethTeleIn.z - 2,
maxZ = Config.MethTeleIn.z+2, maxZ = Config.MethTeleIn.z + 2,
}, { }, {
options = { options = {
{ {
@@ -26,19 +26,19 @@ exports['qb-target']:AddBoxZone("methteleout",Config.MethTeleIn, 1.5, 1.75, { --
icon = "fas fa-sign-in-alt", icon = "fas fa-sign-in-alt",
label = "Enter Building", label = "Enter Building",
action = function() action = function()
SetEntityCoords(PlayerPedId(),Config.MethTeleOut) SetEntityCoords(PlayerPedId(), Config.MethTeleOut)
end, end,
}, },
}, },
distance = 2.5 distance = 2.5
}) })
exports['qb-target']:AddBoxZone("methtelein",Config.MethTeleOut,1.5, 1.75, { -- 963.37, .z-2122.95, 31.47 exports['qb-target']:AddBoxZone("methtelein", Config.MethTeleOut, 1.5, 1.75, { -- 963.37, .z-2122.95, 31.47
name = "methtelein", name = "methtelein",
heading = 11.0, heading = 11.0,
debugPoly = false, debugPoly = false,
minZ = Config.MethTeleOut.z-2, minZ = Config.MethTeleOut.z - 2,
maxZ = Config.MethTeleOut.z+2, maxZ = Config.MethTeleOut.z + 2,
}, { }, {
options = { options = {
{ {
@@ -46,19 +46,19 @@ exports['qb-target']:AddBoxZone("methtelein",Config.MethTeleOut,1.5, 1.75, { --
icon = "fas fa-sign-in-alt", icon = "fas fa-sign-in-alt",
label = "Exit Building", label = "Exit Building",
action = function() action = function()
SetEntityCoords(PlayerPedId(),Config.MethTeleIn) SetEntityCoords(PlayerPedId(), Config.MethTeleIn)
end, end,
}, },
}, },
distance = 2.5 distance = 2.5
}) })
exports['qb-target']:AddBoxZone("maze",vector3(-95.55, -806.73, 44.04),1.5, 1.75, { -- 963.37, .z-2122.95, 31.47 exports['qb-target']:AddBoxZone("maze", vector3(-95.55, -806.73, 44.04), 1.5, 1.75, { -- 963.37, .z-2122.95, 31.47
name = "maze", name = "maze",
heading = 11.0, heading = 11.0,
debugPoly = false, debugPoly = false,
minZ = 44-2, minZ = 44 - 2,
maxZ = 44+2, maxZ = 44 + 2,
}, { }, {
options = { options = {
{ {
@@ -66,150 +66,153 @@ exports['qb-target']:AddBoxZone("maze",vector3(-95.55, -806.73, 44.04),1.5, 1.75
icon = "fas fa-sign-in-alt", icon = "fas fa-sign-in-alt",
label = "dont click this", label = "dont click this",
action = function() action = function()
SetEntityCoords(PlayerPedId(),vector3(-75.36, -837.24, 318.93)) SetEntityCoords(PlayerPedId(), vector3(-75.36, -837.24, 318.93))
end, end,
}, },
}, },
distance = 2.5 distance = 2.5
}) })
local itemreqcook = {"ephedrine", "acetone"} local itemreqcook = { "ephedrine", "acetone" }
exports['qb-target']:AddBoxZone("ingridientsmeth",vector3(1005.7, -3201.28, -39.55),1.5, 1.75, { -- 963.37, .z-2122.95, 31.47 exports['qb-target']:AddBoxZone("ingridientsmeth", vector3(1005.7, -3201.28, -39.55), 1.5, 1.75,
name = "ingridientsmeth", { -- 963.37, .z-2122.95, 31.47
heading = 11.0, name = "ingridientsmeth",
debugPoly = false, heading = 11.0,
minZ = -39-2, debugPoly = false,
maxZ = -39+2, minZ = -39 - 2,
}, { maxZ = -39 + 2,
}, {
options = { options = {
{ {
name = 'methcook', name = 'methcook',
icon = "fas fa-sign-in-alt", icon = "fas fa-sign-in-alt",
label = "Cook Meth", label = "Cook Meth",
item = itemreqcook, item = itemreqcook,
action = function() action = function()
if amonia == nil then if amonia == nil then
amonia = true amonia = true
TriggerServerEvent("md-drugs:server:startcook") TriggerServerEvent("md-drugs:server:startcook")
MethCooking() MethCooking()
exports['qb-target']:AddBoxZone("adjustdials",vector3(1007.89, -3201.17, -38.99),1.5, 1.75, { -- 963.37, .z-2122.95, 31.47 exports['qb-target']:AddBoxZone("adjustdials", vector3(1007.89, -3201.17, -38.99), 1.5, 1.75,
name = "adjustdials", { -- 963.37, .z-2122.95, 31.47
heading = 11.0, name = "adjustdials",
debugPoly = false, heading = 11.0,
minZ = -39-2, debugPoly = false,
maxZ = -39+2, minZ = -39 - 2,
}, { maxZ = -39 + 2,
options = { }, {
{ options = {
name = 'adjustdials', {
icon = "fas fa-sign-in-alt", name = 'adjustdials',
label = "Adjust Dials", icon = "fas fa-sign-in-alt",
distance = 5, label = "Adjust Dials",
action = function() distance = 5,
if amonia == true then action = function()
exports['ps-ui']:Circle(function(success) if amonia == true then
if success then exports['ps-ui']:Circle(function(success)
QBCore.Functions.Notify("Increasing Heat", "success") if success then
ClearPedTasks(PlayerPedId()) QBCore.Functions.Notify("Increasing Heat", "success")
heated = true ClearPedTasks(PlayerPedId())
exports['qb-target']:RemoveZone("adjustdials") heated = true
else exports['qb-target']:RemoveZone("adjustdials")
AddExplosion(1005.773, -3200.402, -38.524, 49, 10, true, false, true, true) else
ClearPedTasks(PlayerPedId()) AddExplosion(1005.773, -3200.402, -38.524, 49, 10, true, false, true, true)
amonia = nil ClearPedTasks(PlayerPedId())
exports['qb-target']:RemoveZone("adjustdials") amonia = nil
end exports['qb-target']:RemoveZone("adjustdials")
end, 2, 8) -- NumberOfCircles, end
else end, 2, 8) -- NumberOfCircles,
end else
end, end
}, end,
}, },
}) },
})
else else
QBCore.Functions.Notify("Theres Stuff Inside", "error") QBCore.Functions.Notify("Theres Stuff Inside", "error")
end end
end, end,
canInteract = function() canInteract = function()
if amonia == nil then if amonia == nil then
return true return true
end end
end, end,
}, },
{ {
name = 'grabtray', name = 'grabtray',
icon = "fas fa-sign-in-alt", icon = "fas fa-sign-in-alt",
label = "Grab Tray", label = "Grab Tray",
distance = 5, distance = 5,
action = function() action = function()
if amonia then if amonia then
local pos = GetEntityCoords(PlayerPedId(), true) local pos = GetEntityCoords(PlayerPedId(), true)
RequestAnimDict('anim@heists@box_carry@') RequestAnimDict('anim@heists@box_carry@')
while (not HasAnimDictLoaded('anim@heists@box_carry@')) do while (not HasAnimDictLoaded('anim@heists@box_carry@')) do
Wait(7) Wait(7)
end end
TaskPlayAnim(PlayerPedId(), 'anim@heists@box_carry@', 'idle', 5.0, -1, -1, 50, 0, false, false, false) TaskPlayAnim(PlayerPedId(), 'anim@heists@box_carry@', 'idle', 5.0, -1, -1, 50, 0, false, false,
RequestModel("bkr_prop_meth_tray_02a") false)
while not HasModelLoaded("bkr_prop_meth_tray_02a") do RequestModel("bkr_prop_meth_tray_02a")
Wait(0) while not HasModelLoaded("bkr_prop_meth_tray_02a") do
end Wait(0)
local trays = CreateObject("bkr_prop_meth_tray_02a", pos.x, pos.y, pos.z, true, true, true) end
AttachEntityToEntity(trays, PlayerPedId(), GetPedBoneIndex(PlayerPedId(), 28422), 0.01,-0.2, -0.2, 20.0, 0.0, 0.0, true, true, false, true, 1, true) local trays = CreateObject("bkr_prop_meth_tray_02a", pos.x, pos.y, pos.z, true, true, true)
tray = true AttachEntityToEntity(trays, PlayerPedId(), GetPedBoneIndex(PlayerPedId(), 28422), 0.01, -0.2,
exports['qb-target']:AddBoxZone("boxmeth",vector3(1012.04, -3194.96, -38.99),1.5, 1.75, { -- 963.37, .z-2122.95, 31.47 -0.2, 20.0, 0.0, 0.0, true, true, false, true, 1, true)
name = "boxmeth", tray = true
heading = 11.0, exports['qb-target']:AddBoxZone("boxmeth", vector3(1012.15, -3194.04, -39.20), 1.5, 1.75,
debugPoly = false, { -- 963.37, .z-2122.95, 31.47
minZ = -38-2, name = "boxmeth",
maxZ = -38+2, heading = 3.0,
}, { debugPoly = false,
options = { minZ = -39 - 2,
{ maxZ = -39 + 2,
name = 'boxmeth', }, {
icon = "fas fa-sign-in-alt", options = {
label = "Box Up Meth", {
distance = 5, name = 'boxmeth',
action = function() icon = "fas fa-sign-in-alt",
if tray then label = "Box Up Meth",
tray = false distance = 5,
DeleteObject(trays) action = function()
local bucket = CreateObject(`bkr_prop_meth_bigbag_03a`, vector3(1012.85, -3194.29, -39.2), true, true, true) if tray then
SetEntityHeading(bucket, 90.0) tray = false
SmashMeth() DeleteObject(trays)
exports['qb-target']:RemoveZone("boxmeth") local bucket = CreateObject(`bkr_prop_meth_bigbag_03a`, vector3(1012.85, -3194.29, -39.2), true, true, true)
exports['qb-target']:AddTargetEntity(bucket, { SetEntityHeading(bucket, 90.0)
options = { SmashMeth()
{ exports['qb-target']:RemoveZone("boxmeth")
name = 'bucket', exports['qb-target']:AddTargetEntity(bucket, {
icon = 'fa-solid fa-car', options = {
label = 'Bag Meth', {
action = function() name = 'bucket',
DeleteObject(bucket) icon = 'fa-solid fa-car',
amonia = nil label = 'Bag Meth',
heated = nil action = function()
tray = nil DeleteObject(bucket)
BagMeth() amonia = nil
TriggerServerEvent('md-drugs:server:getmeth') heated = nil
end, tray = nil
BagMeth()
TriggerServerEvent('md-drugs:server:getmeth')
end,
} }
}, },
}) })
end end
end, end,
canInteract = function() canInteract = function()
if tray then return true end if tray then return true end
end, end,
},
}, },
}, })
}) end
end end,
canInteract = function()
if heated and amonia and tray == nil then return true end
end, end,
canInteract = function()
if heated and amonia and tray == nil then return true end
end,
}, },
}, },
distance = 2.5 distance = 2.5
@@ -217,23 +220,23 @@ exports['qb-target']:AddBoxZone("ingridientsmeth",vector3(1005.7, -3201.28, -39.
end) end)
CreateThread(function() CreateThread(function()
local current = "g_m_y_famdnf_01" local current = "g_m_y_famdnf_01"
lib.requestModel(current, 1000) lib.requestModel(current, 1000)
local CurrentLocation = Config.MethHeistStart local CurrentLocation = Config.MethHeistStart
methdealer = CreatePed(0, current,CurrentLocation.x,CurrentLocation.y,CurrentLocation.z-1, false, false) methdealer = CreatePed(0, current, CurrentLocation.x, CurrentLocation.y, CurrentLocation.z - 1, false, false)
FreezeEntityPosition(methdealer, true) FreezeEntityPosition(methdealer, true)
SetEntityHeading(methdealer,220.0) SetEntityHeading(methdealer, 220.0)
SetEntityInvincible(methdealer, true) SetEntityInvincible(methdealer, true)
exports['qb-target']:AddTargetEntity(methdealer, { exports['qb-target']:AddTargetEntity(methdealer, {
options = { options = {
{ {
label = "Get Mission", label = "Get Mission",
icon = "fas fa-eye", icon = "fas fa-eye",
action = function() action = function()
SpawnMethCarPedChase() SpawnMethCarPedChase()
QBCore.Functions.Notify("Car Has Been Marked On Your Map", "success") QBCore.Functions.Notify("Car Has Been Marked On Your Map", "success")
end, end,
}, },
} }
}) })
end) end)