fix for lean and meth missions
update lsd heroin tables
This commit is contained in:
1 parent
b56e585691
commit
79569a18b6
4 files changed
+42
-76
No files matched your search
+18
-23
@@ -1,14 +1,25 @@
|
||||
local tableout = false
|
||||
|
||||
local dirtylsd = false
|
||||
local function createLabKit(coord, head)
|
||||
local labkit = CreateObject("v_ret_ml_tablea", coord.x, coord.y, coord.z - 1, true, false)
|
||||
SetEntityHeading(labkit, head)
|
||||
PlaceObjectOnGroundProperly(labkit)
|
||||
local options = {
|
||||
{ event = "md-drugs:client:heatliquid", icon = "fa-solid fa-temperature-high", label = Lang.targets.lsd.heat, data = labkit },
|
||||
{ event = "md-drugs:client:refinequalityacid", icon = "fa-solid fa-temperature-high", label = Lang.targets.lsd.refine, data = labkit },
|
||||
{ event = "md-drugs:client:maketabpaper", icon = "fa-regular fa-note-sticky", label = Lang.targets.lsd.dab, data = labkit },
|
||||
{ event = "md-drugs:client:getlabkitback", icon = "fas fa-box-circle-check", label = Lang.targets.lsd.back, data = labkit, canInteract = function() return tableout end }
|
||||
{ event = "md-drugs:client:heatliquid", icon = "fa-solid fa-temperature-high", label = Lang.targets.lsd.heat, data = labkit, canInteract = function() if not dirtylsd then return true end end },
|
||||
{ event = "md-drugs:client:refinequalityacid", icon = "fa-solid fa-temperature-high", label = Lang.targets.lsd.refine, data = labkit,canInteract = function() if not dirtylsd then return true end end },
|
||||
{ event = "md-drugs:client:maketabpaper", icon = "fa-regular fa-note-sticky", label = Lang.targets.lsd.dab, data = labkit, canInteract = function() if not dirtylsd then return true end end },
|
||||
{ event = "md-drugs:client:getlabkitback", icon = "fas fa-box-circle-check", label = Lang.targets.lsd.back, data = labkit, canInteract = function() if not dirtylsd then return true end end },
|
||||
{icon = "fa-solid fa-hand-sparkles", label = Lang.targets.lsd.clean, data = labkit,
|
||||
action = function()
|
||||
if not ItemCheck('cleaningkit') then return end
|
||||
if not progressbar(Lang.lsd.clean, 4000, 'clean') then return end
|
||||
local check = lib.callback.await('md-drugs:server:removecleaningkit')
|
||||
if check then
|
||||
dirtylsd = false
|
||||
end
|
||||
end,
|
||||
canInteract = function() if dirtylsd then return true end end
|
||||
}
|
||||
}
|
||||
AddMultiModel(labkit, options, labkit)
|
||||
end
|
||||
@@ -54,26 +65,10 @@ RegisterNetEvent("md-drugs:client:heatliquid", function(data)
|
||||
if not ItemCheck('lysergic_acid') then return end
|
||||
if not ItemCheck('diethylamide') then return end
|
||||
if not minigame() then
|
||||
TriggerServerEvent("md-drugs:server:failheating")
|
||||
DeleteObject(data.data)
|
||||
local dirtylabkit = CreateObject("v_ret_ml_tablea", PedCoords.x, PedCoords.y, PedCoords.z-1, true, false)
|
||||
SetEntityHeading(dirtylabkit, head)
|
||||
dirtylsd = true
|
||||
loadParticle(dict)
|
||||
local exitPtfx = StartParticleFxLoopedOnEntity("scr_dst_cocaine", dirtylabkit, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.5, false, false, false)
|
||||
PlaceObjectOnGroundProperly(dirtylabkit)
|
||||
local exitPtfx = StartParticleFxLoopedOnEntity("scr_dst_cocaine", data.data, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.5, false, false, false)
|
||||
SetParticleFxLoopedAlpha(exitPtfx, 3.0)
|
||||
Wait(100)
|
||||
AddSingleModel(dirtylabkit, {icon = "fa-solid fa-hand-sparkles", label = Lang.targets.lsd.clean, data = dirtylabkit,
|
||||
action = function()
|
||||
if not ItemCheck('cleaningkit') then return end
|
||||
if not progressbar(Lang.lsd.clean, 4000, 'clean') then return end
|
||||
local check = lib.callback.await('md-drugs:server:removecleaningkit')
|
||||
if check then
|
||||
DeleteObject(dirtylabkit)
|
||||
createLabKit(PedCoords, head)
|
||||
end
|
||||
end
|
||||
}, nil )
|
||||
return end
|
||||
if not progressbar(Lang.lsd.heat, 7000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:heatliquid")
|
||||
|
||||
Reference in new issue
Block a user