- adjust meth
This commit is contained in:
1 parent
4d51671d7d
commit
5032d561ff
1 file changed
+22
-23
+22
-23
@@ -3,7 +3,7 @@ local tray = false
|
|||||||
local heated = false
|
local heated = false
|
||||||
local active = false
|
local active = false
|
||||||
local trays = nil
|
local trays = nil
|
||||||
local smashing = false
|
|
||||||
local locations = ps.callback('md-drugs:server:GetMethLocs')
|
local locations = ps.callback('md-drugs:server:GetMethLocs')
|
||||||
--- meth heist
|
--- meth heist
|
||||||
local startedmeth = false
|
local startedmeth = false
|
||||||
@@ -94,6 +94,17 @@ local function loadParticle(dict)
|
|||||||
end
|
end
|
||||||
SetPtfxAssetNextCall(dict)
|
SetPtfxAssetNextCall(dict)
|
||||||
end
|
end
|
||||||
|
local function dialSuccess(coords)
|
||||||
|
ps.requestModel('hei_prop_heist_thermite', 2000)
|
||||||
|
loadParticle('scr_ornate_heist')
|
||||||
|
local thermite = CreateObject('hei_prop_heist_thermite', vector3(1006.09, -3201.29, -39.30), true, false, false)
|
||||||
|
FreezeEntityPosition(thermite, true)
|
||||||
|
SetEntityRotation(thermite, 190.0, 90.0, 140.0, 3, true )
|
||||||
|
Wait(1000)
|
||||||
|
local therm = StartParticleFxLoopedOnEntity('scr_heist_ornate_thermal_burn', thermite, 0.0, 1.4, 0.0, 0.0, 0.0, 0.0, 1.5, false, false, false)
|
||||||
|
Wait(math.random(10000, 20000))
|
||||||
|
StopParticleFxLooped(therm, true)
|
||||||
|
end
|
||||||
|
|
||||||
local function MethCooking(coords, offset, rotation)
|
local function MethCooking(coords, offset, rotation)
|
||||||
local animDict, animName = "anim@amb@business@meth@meth_monitoring_cooking@cooking@", "chemical_pour_short_cooker"
|
local animDict, animName = "anim@amb@business@meth@meth_monitoring_cooking@cooking@", "chemical_pour_short_cooker"
|
||||||
@@ -114,20 +125,10 @@ local function MethCooking(coords, offset, rotation)
|
|||||||
NetworkStopSynchronisedScene(netScene)
|
NetworkStopSynchronisedScene(netScene)
|
||||||
DeleteObject(sacid) DeleteObject(ammonia)
|
DeleteObject(sacid) DeleteObject(ammonia)
|
||||||
FreezeEntityPosition(PlayerPedId(), false)
|
FreezeEntityPosition(PlayerPedId(), false)
|
||||||
ps.requestModel('hei_prop_heist_thermite', 2000)
|
|
||||||
loadParticle('scr_ornate_heist')
|
|
||||||
local thermite = CreateObject('hei_prop_heist_thermite', vector3(1005.76, -3201.3, -39.25), true, false, false)
|
|
||||||
FreezeEntityPosition(thermite, true)
|
|
||||||
SetEntityRotation(thermite, 190.0, 90.0, 140.0, 3, true )
|
|
||||||
Wait(1000)
|
|
||||||
local therm = StartParticleFxLoopedOnEntity('scr_heist_ornate_thermal_burn', thermite, 0.0, 1.4, 0.0, 0.0, 0.0, 0.0, 1.5, false, false, false)
|
|
||||||
Wait(math.random(10000, 20000))
|
|
||||||
StopParticleFxLooped(therm, true)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
local function SmashMeth(coords, offset, rotation)
|
local function SmashMeth(coords, offset, rotation)
|
||||||
smashing = true
|
|
||||||
local ver = ""
|
local ver = ""
|
||||||
local animDict, animName = "anim@amb@business@meth@meth_smash_weight_check@", "break_weigh_"..ver.."char02"
|
local animDict, animName = "anim@amb@business@meth@meth_smash_weight_check@", "break_weigh_"..ver.."char02"
|
||||||
ps.requestAnim(animDict, 500)
|
ps.requestAnim(animDict, 500)
|
||||||
@@ -160,7 +161,6 @@ local function SmashMeth(coords, offset, rotation)
|
|||||||
end
|
end
|
||||||
RemoveAnimDict(animDict)
|
RemoveAnimDict(animDict)
|
||||||
FreezeEntityPosition(ped, false)
|
FreezeEntityPosition(ped, false)
|
||||||
smashing = false
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local function BagMeth(coords, offset, rotation)
|
local function BagMeth(coords, offset, rotation)
|
||||||
@@ -238,7 +238,6 @@ local function startcook(num, coords, offset, rotation)
|
|||||||
local adding = ps.callback('md-drugs:server:startcook', num)
|
local adding = ps.callback('md-drugs:server:startcook', num)
|
||||||
if not adding then return end
|
if not adding then return end
|
||||||
active = true
|
active = true
|
||||||
amonia = true
|
|
||||||
MethCooking(coords, offset, rotation)
|
MethCooking(coords, offset, rotation)
|
||||||
amonia = true
|
amonia = true
|
||||||
else
|
else
|
||||||
@@ -248,21 +247,22 @@ end
|
|||||||
|
|
||||||
|
|
||||||
local function dials(coords)
|
local function dials(coords)
|
||||||
if amonia == true then
|
if amonia then
|
||||||
if not minigame() then
|
if not minigame() then
|
||||||
AddExplosion(coords.x, coords.y,coords.z, 49, 10, true, false, true)
|
AddExplosion(coords.x, coords.y,coords.z, 49, 10, true, false, true)
|
||||||
amonia = false
|
amonia = false
|
||||||
active = false
|
active = false
|
||||||
return end
|
return end
|
||||||
ps.notify(ps.lang('meth.increaseHeat'), "success")
|
ps.notify(ps.lang('meth.increaseHeat'), "success")
|
||||||
|
dialSuccess(coords)
|
||||||
heated = true
|
heated = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local function smash(coords, offset, rotation, buckets, k)
|
local function smash(coords, offset, rotation, buckets, k)
|
||||||
if tray then
|
if active and tray and amonia and heated then
|
||||||
tray = false
|
|
||||||
DeleteObject(trays)
|
DeleteObject(trays)
|
||||||
|
tray = false
|
||||||
local bucket = CreateObject("bkr_prop_meth_bigbag_03a", buckets.x, buckets.y, buckets.z, true, true, true)
|
local bucket = CreateObject("bkr_prop_meth_bigbag_03a", buckets.x, buckets.y, buckets.z, true, true, true)
|
||||||
Freeze(bucket, true, buckets.w)
|
Freeze(bucket, true, buckets.w)
|
||||||
SmashMeth(coords, offset, rotation)
|
SmashMeth(coords, offset, rotation)
|
||||||
@@ -272,11 +272,6 @@ local function smash(coords, offset, rotation, buckets, k)
|
|||||||
name = 'bucket',
|
name = 'bucket',
|
||||||
icon = "fa-solid fa-sack-xmark",
|
icon = "fa-solid fa-sack-xmark",
|
||||||
label = ps.lang('meth.targetBag'),
|
label = ps.lang('meth.targetBag'),
|
||||||
canInteract = function()
|
|
||||||
if not active then return false end
|
|
||||||
if not smashing then return false end
|
|
||||||
return true
|
|
||||||
end,
|
|
||||||
action = function()
|
action = function()
|
||||||
DeleteObject(bucket)
|
DeleteObject(bucket)
|
||||||
active = false
|
active = false
|
||||||
@@ -286,13 +281,17 @@ local function smash(coords, offset, rotation, buckets, k)
|
|||||||
BagMeth(locations.BagMeth[k].loc, locations.BagMeth[k].offset, locations.BagMeth[k].rotation)
|
BagMeth(locations.BagMeth[k].loc, locations.BagMeth[k].offset, locations.BagMeth[k].rotation)
|
||||||
TriggerServerEvent('md-drugs:server:getmeth', k)
|
TriggerServerEvent('md-drugs:server:getmeth', k)
|
||||||
end,
|
end,
|
||||||
|
canInteract = function()
|
||||||
|
if not active then return false end
|
||||||
|
return true
|
||||||
|
end,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local function trayscarry()
|
local function trayscarry()
|
||||||
if amonia then
|
if amonia and heated then
|
||||||
local pos = GetEntityCoords(PlayerPedId(), true)
|
local pos = GetEntityCoords(PlayerPedId(), true)
|
||||||
ps.requestAnim('anim@heists@box_carry@')
|
ps.requestAnim('anim@heists@box_carry@')
|
||||||
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, false)
|
||||||
@@ -317,7 +316,7 @@ for k, v in pairs (locations.CookMeth) do
|
|||||||
label = ps.lang('meth.targetCook'),
|
label = ps.lang('meth.targetCook'),
|
||||||
icon = 'fa-solid fa-temperature-high',
|
icon = 'fa-solid fa-temperature-high',
|
||||||
action = function()
|
action = function()
|
||||||
startcook(k, v.loc, v.offset or vec3(0,0,0), v.rotation or vector3(0,0,180.0))
|
startcook(k, v.loc, v.offset or vec3(0,0,0), v.rotation or vector3(0,0,180.0))
|
||||||
end,
|
end,
|
||||||
canInteract = function()
|
canInteract = function()
|
||||||
if not handleGang(v.gang) then return false end
|
if not handleGang(v.gang) then return false end
|
||||||
|
|||||||
Reference in new issue
Block a user