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
@@ -377,7 +377,7 @@ function SpawnCarPedChase()
|
|||||||
lib.requestModel("pounder", Config.RequestModelTime)
|
lib.requestModel("pounder", Config.RequestModelTime)
|
||||||
lib.requestModel("ig_priest", Config.RequestModelTime)
|
lib.requestModel("ig_priest", Config.RequestModelTime)
|
||||||
lib.requestModel("cargobob3", Config.RequestModelTime)
|
lib.requestModel("cargobob3", Config.RequestModelTime)
|
||||||
local leancar = CreateVehicle("pounder", start.x+3, start.y-2, start.z-1, 52.0, false, false)
|
local leancar = CreateVehicle("pounder", start.x+3, start.y-2, start.z-1, 52.0, true, false)
|
||||||
local driver = CreatePed(26, "ig_priest", start.x, start.y, start.z, 268.9422, false, false)
|
local driver = CreatePed(26, "ig_priest", start.x, start.y, start.z, 268.9422, false, false)
|
||||||
local pilot2 = CreatePed(26, "ig_priest", stoploc.x-3, stoploc.y-3, stoploc.z-1, 268.9422, false, false)
|
local pilot2 = CreatePed(26, "ig_priest", stoploc.x-3, stoploc.y-3, stoploc.z-1, 268.9422, false, false)
|
||||||
FreezeEntityPosition(pilot2, true)
|
FreezeEntityPosition(pilot2, true)
|
||||||
@@ -407,22 +407,7 @@ function SpawnCarPedChase()
|
|||||||
end
|
end
|
||||||
end}, nil)
|
end}, nil)
|
||||||
else
|
else
|
||||||
repeat
|
DeleteVehicle(leancar) DeleteEntity(driver) DeleteEntity(pilot2)
|
||||||
Wait(1000)
|
|
||||||
until #(GetEntityCoords(driver) - GetEntityCoords(pilot2)) < 25.0
|
|
||||||
Wait( 3 * 1000)
|
|
||||||
local heli = CreateVehicle("cargobob3", stoploc.x-20, stoploc.y-20, stoploc.z-1, 80, false,false)
|
|
||||||
Wait(1000)
|
|
||||||
if DoesEntityExist(heli) then
|
|
||||||
SetEntityInvincible(pilot2, false)
|
|
||||||
DeleteVehicle(leancar)
|
|
||||||
DeleteEntity(driver)
|
|
||||||
SetEntityAsMissionEntity(heli)
|
|
||||||
SetPedIntoVehicle(pilot2, heli, -1)
|
|
||||||
TaskHeliMission(pilot2, heli, 0, 0, -3362.05, 589.45, -13.04, 4, 150.0, 20.0, -1.0, 10, 10, 5.0, 0)
|
|
||||||
else
|
|
||||||
heli = CreateVehicle("cargobob3", stoploc.x-20, stoploc.y-20, stoploc.z-1, 80, false,false)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -441,7 +426,7 @@ else
|
|||||||
lib.requestModel("journey", Config.RequestModelTime)
|
lib.requestModel("journey", Config.RequestModelTime)
|
||||||
lib.requestModel("a_m_m_hillbilly_02", Config.RequestModelTime)
|
lib.requestModel("a_m_m_hillbilly_02", Config.RequestModelTime)
|
||||||
lib.requestModel("cargobob3", Config.RequestModelTime)
|
lib.requestModel("cargobob3", Config.RequestModelTime)
|
||||||
local methcar = CreateVehicle("journey", start.x+3, start.y-2, start.z-1, 52.0, false, false)
|
local methcar = CreateVehicle("journey", start.x+3, start.y-2, start.z-1, 52.0, true, false)
|
||||||
local methdriver = CreatePed(26, "a_m_m_hillbilly_02", start.x, start.y, start.z, 268.9422, false, false)
|
local methdriver = CreatePed(26, "a_m_m_hillbilly_02", start.x, start.y, start.z, 268.9422, false, false)
|
||||||
local methpilot = CreatePed(26, "a_m_m_hillbilly_02", stoploc.x-3, stoploc.y-3, stoploc.z-1, 268.9422, false, false)
|
local methpilot = CreatePed(26, "a_m_m_hillbilly_02", stoploc.x-3, stoploc.y-3, stoploc.z-1, 268.9422, false, false)
|
||||||
FreezeEntityPosition(methpilot, true)
|
FreezeEntityPosition(methpilot, true)
|
||||||
@@ -472,23 +457,9 @@ else
|
|||||||
end,
|
end,
|
||||||
}, nil )
|
}, nil )
|
||||||
else
|
else
|
||||||
repeat
|
DeleteVehicle(methcar)
|
||||||
Wait(1000)
|
DeleteEntity(methdriver)
|
||||||
until #(GetEntityCoords(methdriver) - GetEntityCoords(methpilot)) < 25.0
|
DeleteEntity(methpilot)
|
||||||
Wait( 3 * 1000)
|
|
||||||
local methheli = CreateVehicle("cargobob3", stoploc.x-20, stoploc.y-20, stoploc.z-1, 80, false,false)
|
|
||||||
Wait(1000)
|
|
||||||
if DoesEntityExist(methheli) then
|
|
||||||
SetEntityInvincible(methpilot, false)
|
|
||||||
CreatePickUpRopeForCargobob(methheli, 1)
|
|
||||||
AttachVehicleToCargobob(methheli, methcar, GetEntityBoneIndexByName(methcar, 'bodyshell'), 0.0, 0.0, 0.0)
|
|
||||||
DeleteEntity(methdriver)
|
|
||||||
SetEntityAsMissionEntity(methheli)
|
|
||||||
SetPedIntoVehicle(methpilot, methheli, -1)
|
|
||||||
TaskHeliMission(methpilot, methheli, 0, 0, -3362.05, 589.45, -13.04, 4, 150.0, 20.0, -1.0, 10, 10, 5.0, 0)
|
|
||||||
else
|
|
||||||
methheli = CreateVehicle("cargobob3", stoploc.x-20, stoploc.y-20, stoploc.z-1, 80, false,false)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
+9
-11
@@ -1,14 +1,15 @@
|
|||||||
local PoppyPlants = {}
|
local PoppyPlants = {}
|
||||||
local herointable = false
|
local herointable = false
|
||||||
|
local dirty = false
|
||||||
|
|
||||||
local function createLabKit(coord, head)
|
local function createLabKit(coord, head)
|
||||||
local heroinlabkit = CreateObject("v_ret_ml_tablea", coord.x, coord.y, coord.z - 1, true, false,false)
|
local heroinlabkit = CreateObject("v_ret_ml_tablea", coord.x, coord.y, coord.z - 1, true, false,false)
|
||||||
SetEntityHeading(heroinlabkit, head)
|
SetEntityHeading(heroinlabkit, head)
|
||||||
PlaceObjectOnGroundProperly(heroinlabkit)
|
PlaceObjectOnGroundProperly(heroinlabkit)
|
||||||
AddMultiModel(heroinlabkit, {
|
AddMultiModel(heroinlabkit, {
|
||||||
{ event = "md-drugs:client:heatliquidheroin", icon = "fa-solid fa-temperature-high", label = Lang.targets.heroin.cook, data = heroinlabkit},
|
{data = heroinlabkit, event = "md-drugs:client:heatliquidheroin", icon = "fa-solid fa-temperature-high", label = Lang.targets.heroin.cook, canInteract = function() if not dirty then return true end end},
|
||||||
{ event = "md-drugs:client:getheroinkitback", icon = "fas fa-box-circle-check", label = Lang.targets.heroin.up, data = heroinlabkit, canInteract = function() if herointable then return true end end}},
|
{data = heroinlabkit, event = "md-drugs:client:getheroinkitback", icon = "fas fa-box-circle-check", label = Lang.targets.heroin.up, canInteract = function() if not dirty then return true end end},
|
||||||
heroinlabkit)
|
{data = heroinlabkit, event = "md-drugs:client:cleanheroinlabkit",icon = "fa-solid fa-hand-sparkles",label = Lang.targets.heroin.clean,canInteract = function() if dirty then return true end end}},heroinlabkit)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function pickher(loc)
|
local function pickher(loc)
|
||||||
@@ -88,16 +89,12 @@ RegisterNetEvent("md-drugs:client:heatliquidheroin", function(data)
|
|||||||
local loc, head = GetEntityCoords(data.data), GetEntityHeading(data.data)
|
local loc, head = GetEntityCoords(data.data), GetEntityHeading(data.data)
|
||||||
if not ItemCheck('emptyvial') then return end
|
if not ItemCheck('emptyvial') then return end
|
||||||
if not minigame() then
|
if not minigame() then
|
||||||
|
dirty = true
|
||||||
TriggerServerEvent("md-drugs:server:failheatingheroin")
|
TriggerServerEvent("md-drugs:server:failheatingheroin")
|
||||||
DeleteObject(data.data)
|
|
||||||
local dirtylabkitheroin = CreateObject("v_ret_ml_tablea", loc.x, loc.y, loc.z-1, true, false)
|
|
||||||
SetEntityHeading(dirtylabkitheroin, head)
|
|
||||||
PlaceObjectOnGroundProperly(dirtylabkitheroin)
|
|
||||||
loadParticle("core")
|
loadParticle("core")
|
||||||
local heroinkit = StartParticleFxLoopedOnEntity("exp_air_molotov", dirtylabkitheroin, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.5, false, false, false)
|
local heroinkit = StartParticleFxLoopedOnEntity("exp_air_molotov", data.data, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.5, false, false, false)
|
||||||
SetParticleFxLoopedAlpha(heroinkit, 3.0)
|
SetParticleFxLoopedAlpha(heroinkit, 3.0)
|
||||||
SetPedToRagdoll(PlayerPedId(), 1300, 1300, 0, 0, 0, 0)
|
SetPedToRagdoll(PlayerPedId(), 1300, 1300, 0, 0, 0, 0)
|
||||||
AddMultiModel(dirtylabkitheroin, {{event = "md-drugs:client:cleanheroinlabkit",icon = "fa-solid fa-hand-sparkles",label = Lang.targets.heroin.clean, data = dirtylabkitheroin}}, nil )
|
|
||||||
return end
|
return end
|
||||||
if not progressbar(Lang.Heroin.success, 4000, 'uncuff') then return end
|
if not progressbar(Lang.Heroin.success, 4000, 'uncuff') then return end
|
||||||
TriggerServerEvent("md-drugs:server:heatliquidheroin")
|
TriggerServerEvent("md-drugs:server:heatliquidheroin")
|
||||||
@@ -106,7 +103,8 @@ end)
|
|||||||
RegisterNetEvent("md-drugs:client:cleanheroinlabkit", function(data)
|
RegisterNetEvent("md-drugs:client:cleanheroinlabkit", function(data)
|
||||||
if not ItemCheck('cleaningkit') then return end
|
if not ItemCheck('cleaningkit') then return end
|
||||||
if not progressbar(Lang.Heroin.clean, 4000, 'clean') then return end
|
if not progressbar(Lang.Heroin.clean, 4000, 'clean') then return end
|
||||||
TriggerServerEvent("md-drugs:server:removecleaningkitheroin", data.data)
|
local done = lib.callback.await('removeCleaningkit', false)
|
||||||
|
if done then dirty = false end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
RegisterNetEvent("md-drugs:client:deletedirtyheroin", function(data)
|
RegisterNetEvent("md-drugs:client:deletedirtyheroin", function(data)
|
||||||
|
|||||||
+18
-23
@@ -1,14 +1,25 @@
|
|||||||
local tableout = false
|
local tableout = false
|
||||||
|
local dirtylsd = false
|
||||||
local function createLabKit(coord, head)
|
local function createLabKit(coord, head)
|
||||||
local labkit = CreateObject("v_ret_ml_tablea", coord.x, coord.y, coord.z - 1, true, false)
|
local labkit = CreateObject("v_ret_ml_tablea", coord.x, coord.y, coord.z - 1, true, false)
|
||||||
SetEntityHeading(labkit, head)
|
SetEntityHeading(labkit, head)
|
||||||
PlaceObjectOnGroundProperly(labkit)
|
PlaceObjectOnGroundProperly(labkit)
|
||||||
local options = {
|
local options = {
|
||||||
{ event = "md-drugs:client:heatliquid", icon = "fa-solid fa-temperature-high", label = Lang.targets.lsd.heat, data = labkit },
|
{ 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 },
|
{ 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 },
|
{ 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() return tableout 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)
|
AddMultiModel(labkit, options, labkit)
|
||||||
end
|
end
|
||||||
@@ -54,26 +65,10 @@ RegisterNetEvent("md-drugs:client:heatliquid", function(data)
|
|||||||
if not ItemCheck('lysergic_acid') then return end
|
if not ItemCheck('lysergic_acid') then return end
|
||||||
if not ItemCheck('diethylamide') then return end
|
if not ItemCheck('diethylamide') then return end
|
||||||
if not minigame() then
|
if not minigame() then
|
||||||
TriggerServerEvent("md-drugs:server:failheating")
|
dirtylsd = true
|
||||||
DeleteObject(data.data)
|
|
||||||
local dirtylabkit = CreateObject("v_ret_ml_tablea", PedCoords.x, PedCoords.y, PedCoords.z-1, true, false)
|
|
||||||
SetEntityHeading(dirtylabkit, head)
|
|
||||||
loadParticle(dict)
|
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)
|
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)
|
||||||
PlaceObjectOnGroundProperly(dirtylabkit)
|
|
||||||
SetParticleFxLoopedAlpha(exitPtfx, 3.0)
|
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
|
return end
|
||||||
if not progressbar(Lang.lsd.heat, 7000, 'uncuff') then return end
|
if not progressbar(Lang.lsd.heat, 7000, 'uncuff') then return end
|
||||||
TriggerServerEvent("md-drugs:server:heatliquid")
|
TriggerServerEvent("md-drugs:server:heatliquid")
|
||||||
|
|||||||
+9
-7
@@ -37,14 +37,15 @@ function heroinCooldown(loc)
|
|||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
RegisterServerEvent('md-drugs:server:removecleaningkitheroin', function(data)
|
lib.callback.register('removeCleaningkit', function(source)
|
||||||
local src = source
|
local Player = getPlayer(source)
|
||||||
if RemoveItem(src,"cleaningkit", 1) then
|
for k, v in pairs(heroinLabKits) do
|
||||||
TriggerClientEvent("md-drugs:client:deletedirtyheroin", src, data)
|
if v.ownerid == Player.PlayerData.citizenid then
|
||||||
Log(GetName(src) .. ' Wiped Down Their Heroin Lab Kit!' , 'heroin')
|
RemoveItem(source, 'cleaningkit', 1)
|
||||||
else
|
return true
|
||||||
Notifys(src, "You cant clean it with spit alone", "error")
|
end
|
||||||
end
|
end
|
||||||
|
return false
|
||||||
end)
|
end)
|
||||||
|
|
||||||
RegisterServerEvent("heroin:pickupCane", function(loc)
|
RegisterServerEvent("heroin:pickupCane", function(loc)
|
||||||
@@ -151,6 +152,7 @@ CUI('heroinlabkit', function(source, item)
|
|||||||
})
|
})
|
||||||
Notifys(src, Lang.Heroin.placed, "success")
|
Notifys(src, Lang.Heroin.placed, "success")
|
||||||
end
|
end
|
||||||
|
print(json.encode(heroinLabKits))
|
||||||
end)
|
end)
|
||||||
|
|
||||||
RegisterServerEvent('md-drugs:server:heatliquidheroin', function()
|
RegisterServerEvent('md-drugs:server:heatliquidheroin', function()
|
||||||
|
|||||||
Reference in new issue
Block a user