Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1e3264bb9a | ||
|
|
be0dd02166 | ||
|
|
a5246ad55b | ||
|
|
9520c88d58 | ||
|
|
aca346cc1c | ||
|
|
79569a18b6 | ||
|
|
b56e585691 | ||
|
|
3043ecd924 | ||
|
|
a07118d0cb | ||
|
|
bf1471e238 | ||
|
|
fc5b1f5164 | ||
|
|
26fd63d750 | ||
|
|
65597810c7 | ||
|
|
f9bc39fc1d | ||
|
|
cc33ecb7e2 | ||
|
|
9d04b359c1 | ||
|
|
0b943d8154 | ||
|
|
c37b777748 | ||
|
|
c349563ef3 | ||
|
|
5b6fef2d49 | ||
|
|
001378704c | ||
|
|
cf5cfba909 | ||
|
|
f1ed2c0860 | ||
|
|
e83cddd96f | ||
|
|
5c5f454207 | ||
|
|
cdd26ab465 | ||
|
|
c2fddd6144 | ||
|
|
6df0983273 | ||
|
|
b7353b4e97 | ||
|
|
c81d113494 | ||
|
|
07481651b8 | ||
|
|
e04d91e79e | ||
|
|
07c84ff640 | ||
|
|
8df50c0417 | ||
|
|
abb1bba3fe | ||
|
|
9d828a2b15 | ||
|
|
31ee7f88c0 | ||
|
|
5bc0e9f4e0 | ||
|
|
bcdf71b17a | ||
|
|
c6d8556c12 | ||
|
|
aa015ba757 | ||
|
|
52224ab097 | ||
|
|
b486a28a4a | ||
|
|
adcd5d7c2b | ||
|
|
bb4d05373e | ||
|
|
b1ac95f959 | ||
|
|
3db581ac1e | ||
|
|
c7479b44ff | ||
|
|
11e3b5efe6 | ||
|
|
b1bcb7ce56 | ||
|
|
502677054c | ||
|
|
025cd2884b | ||
|
|
7978cc0b90 | ||
|
|
7c45cbaec4 | ||
|
|
3c80fbfbb8 | ||
|
|
70c3d9ae15 | ||
|
|
99d0ae58be | ||
|
|
24877e6447 | ||
|
|
83f2749101 | ||
|
|
1224133815 | ||
|
|
73af37c00a | ||
|
|
dbed6b3c47 | ||
|
|
b796b6eff9 | ||
|
|
d2fdf7298d | ||
|
|
e9f722a140 | ||
|
|
9df44f726d | ||
|
|
d3e99d6440 | ||
|
|
fefd53857e | ||
|
|
ca2a9205b0 | ||
|
|
6dca2d36a7 | ||
|
|
48fedf0b48 | ||
|
|
000a5b29a2 | ||
|
|
2d3ca8a361 | ||
|
|
6e7fd5441f | ||
|
|
9a24682aac | ||
|
|
e79d7fd6f5 | ||
|
|
2c112c8927 | ||
|
|
41b66a45e4 | ||
|
|
9b69d6306c | ||
|
|
6dad9f70a9 | ||
|
|
4938821793 | ||
|
|
88bf966b91 | ||
|
|
57de95f880 | ||
|
|
798ad3cd97 | ||
|
|
f2068806cb | ||
|
|
e4c5abed63 | ||
|
|
388c32939b | ||
|
|
85fc0a4b67 | ||
|
|
39b8ebc42d | ||
|
|
861a210dfe | ||
|
|
37ba74a700 | ||
|
|
5c88857368 | ||
|
|
20c24f7424 | ||
|
|
472eba3c0c | ||
|
|
ca494fc88d | ||
|
|
018bc15419 | ||
|
|
ff810f1379 | ||
|
|
5a392fe0fe | ||
|
|
df7804c2de | ||
|
|
cbadec6e25 | ||
|
|
028c5f771f | ||
|
|
009b0a4f4a | ||
|
|
ed5221f318 | ||
|
|
d7c06ac006 | ||
|
|
4db34e5f50 | ||
|
|
a8633c2884 | ||
|
|
3981e92b3c | ||
|
|
8baa05a5ea | ||
|
|
3eb4cd35dc | ||
|
|
bf40a0e864 | ||
|
|
07fb3caf24 | ||
|
|
e07ab23761 | ||
|
|
c9f4e8114b | ||
|
|
7e2b23b9bd | ||
|
|
4d5bb1fa86 | ||
|
|
fd7cb1d201 | ||
|
|
60f3f6aa75 | ||
|
|
7bffb7b3b5 | ||
|
|
ba89fd2aaf | ||
|
|
2523e0a596 | ||
|
|
cd7a6fb8bd | ||
|
|
d1c8cc6b96 | ||
|
|
de028bffc9 | ||
|
|
48d5c6928a | ||
|
|
1070a3d1a8 | ||
|
|
1af114dd24 | ||
|
|
5c8076c651 | ||
|
|
84e890b232 | ||
|
|
0790590c3b | ||
|
|
ff87eb3f61 | ||
|
|
45192684da | ||
|
|
e4e7450d7a | ||
|
|
5b2e87412f | ||
|
|
ea665fe8fc | ||
|
|
99c2f2d212 | ||
|
|
9f0c556636 | ||
|
|
07c6a9be94 | ||
|
|
2b18444fd9 | ||
|
|
322c1e3905 | ||
|
|
3d124f124f | ||
|
|
14963167be | ||
|
|
495379ef0c | ||
|
|
5116260203 | ||
|
|
b20b1cec4c | ||
|
|
13d9ce8ea7 | ||
|
|
6209b7c82e | ||
|
|
c2b92c4944 | ||
|
|
d78cce3b10 | ||
|
|
1f9f8b3dfd | ||
|
|
1ed514bfb7 | ||
|
|
24b94ccc82 | ||
|
|
f2b26ac889 | ||
|
|
3d144cae58 | ||
|
|
7aa929670e | ||
|
|
19ca790456 | ||
|
|
8b9b05ef95 | ||
|
|
c710826c14 | ||
|
|
3eff5ab23f | ||
|
|
6e77e15f6e | ||
|
|
cdf13e5108 | ||
|
|
971168c9b6 | ||
|
|
6554b253d9 | ||
|
|
323d12ad31 | ||
|
|
c4f3320d96 | ||
|
|
cf41e75bb1 | ||
|
|
0ce4e27a60 | ||
|
|
192e8c9d64 | ||
|
|
62ee319c12 | ||
|
|
856ec769a5 | ||
|
|
6aea184058 | ||
|
|
b6b4776ab2 | ||
|
|
5448eabd87 | ||
|
|
661d5148b7 | ||
|
|
c3f318e3b4 | ||
|
|
2412f2b58e | ||
|
|
1301fca83a | ||
|
|
20b89b2324 | ||
|
|
35b0d69332 | ||
|
|
e21b4e11d5 | ||
|
|
8690348917 | ||
|
|
26e5f29343 | ||
|
|
66414de241 | ||
|
|
c7192ff2e2 | ||
|
|
22b054b681 | ||
|
|
089f543d1b | ||
|
|
3e2a0ad6c7 | ||
|
|
ccfdb2ddcd | ||
|
|
fed8cf2804 | ||
|
|
930c1e5518 | ||
|
|
4d9b613823 | ||
|
|
0f7698f4df | ||
|
|
2ba13f91f3 | ||
|
|
315c96b3c9 | ||
|
|
66ee2d2652 | ||
|
|
4d4c45d99e | ||
|
|
f8bb79b640 | ||
|
|
10aa94e876 | ||
|
|
15aa6f6ecb | ||
|
|
1ed82e4675 | ||
|
|
222d5051d2 | ||
|
|
99e8afe653 | ||
|
|
9472271377 | ||
|
|
dacabc74fc | ||
|
|
1afd23f63f | ||
|
|
2494cbc06d | ||
|
|
dea70fab75 | ||
|
|
a420e8da7e | ||
|
|
6bcdb88420 | ||
|
|
df702096ad | ||
|
|
d98e85d098 | ||
|
|
0dabc3f1d0 | ||
|
|
cf5ed55d29 | ||
|
|
cb07be424c | ||
|
|
9d76824013 | ||
|
|
0f99ac0baf | ||
|
|
f9beb11ddc | ||
|
|
8bb07e7452 | ||
|
|
e5cf612a29 | ||
|
|
a015846e78 | ||
|
|
5a7e10c33f | ||
|
|
34d21c3618 | ||
|
|
e23e8c23ab | ||
|
|
8155ace51e | ||
|
|
679d140ae7 | ||
|
|
992b5d7b26 | ||
|
|
ab8510e302 | ||
|
|
48824f099f | ||
|
|
7bd55bf1e7 | ||
|
|
3725ea1121 | ||
|
|
029db21ca3 | ||
|
|
b682a9310d | ||
|
|
3549e4afaa | ||
|
|
1e06afa926 | ||
|
|
598e16965e | ||
|
|
1b7e1be9b3 | ||
|
|
5ffa6e9519 | ||
|
|
f7d41ddbdc | ||
|
|
3d197eae62 | ||
|
|
0b020bba2e | ||
|
|
40ea6dbf45 | ||
|
|
9cbf5ffeb3 | ||
|
|
71b8d039b8 | ||
|
|
e80c027647 | ||
|
|
f48435cd61 | ||
|
|
722963ed38 | ||
|
|
c0a0e4271e | ||
|
|
b9b3899e65 | ||
|
|
40022048b0 | ||
|
|
af152ee0a3 | ||
|
|
1d7ffc938c | ||
|
|
b1eff50bc5 | ||
|
|
3abc9c5a6a | ||
|
|
5de4d32401 | ||
|
|
a8db1ff11d | ||
|
|
bc83756701 | ||
|
|
02ac830805 | ||
|
|
4fef77316d | ||
|
|
62d53b573c | ||
|
|
00a45563ae | ||
|
|
b6c06b2ce5 | ||
|
|
753ac03799 | ||
|
|
e69ff1948b | ||
|
|
f9709311af |
No files matched your search
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"Lua.diagnostics.disable": [
|
||||
"missing-parameter",
|
||||
"param-type-mismatch"
|
||||
],
|
||||
"Lua.diagnostics.globals": [
|
||||
"lib",
|
||||
"progressbar",
|
||||
"loadParticle",
|
||||
"makeMenu",
|
||||
"minigame",
|
||||
"tele",
|
||||
"sorter",
|
||||
"MySQL",
|
||||
"trays",
|
||||
"heroinkit",
|
||||
"getPlayer",
|
||||
"dist",
|
||||
"sortTab",
|
||||
"getRep",
|
||||
"heroinCooldown",
|
||||
"checkLoc",
|
||||
"getRandW",
|
||||
"shroomsCooldown"
|
||||
]
|
||||
}
|
||||
@@ -1,5 +1,3 @@
|
||||
---@diagnostic disable: param-type-mismatch
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
local started = nil
|
||||
|
||||
local function loadParticle(dict)
|
||||
@@ -13,89 +11,73 @@ local function loadParticle(dict)
|
||||
end
|
||||
|
||||
function MethCooking()
|
||||
local animDict, animName = "anim@amb@business@meth@meth_monitoring_cooking@cooking@", "chemical_pour_short_cooker"
|
||||
lib.requestAnimDict(animDict, 500)
|
||||
dict = "scr_fbi5a"
|
||||
local ped = PlayerPedId()
|
||||
SetEntityCoords(ped, vector3(1005.773, -3200.402, -38.524))
|
||||
Wait(1)
|
||||
|
||||
local targetPosition = GetEntityCoords(ped)
|
||||
local animDuration = GetAnimDuration(animDict, animName) * 800
|
||||
FreezeEntityPosition(ped, true)
|
||||
local scenePos, sceneRot = vector3(1010.656, -3198.445, -38.925), vector3(0.0, 0.0, 0.0)
|
||||
local netScene = NetworkCreateSynchronisedScene(scenePos, sceneRot, 2, false, false, 1065353216, 0, 1.3)
|
||||
NetworkAddPedToSynchronisedScene(ped, netScene, animDict, animName, 1.5, -4.0, 1, 16, 1148846080, 0)
|
||||
local sacid = CreateObjectNoOffset(`bkr_prop_meth_sacid`, targetPosition, 1, 1, 0)
|
||||
NetworkAddEntityToSynchronisedScene(sacid, netScene, animDict, "chemical_pour_short_sacid", 4.0, -8.0, 1)
|
||||
local ammonia = CreateObjectNoOffset(`bkr_prop_meth_ammonia`, targetPosition, 1, 1, 0)
|
||||
NetworkAddEntityToSynchronisedScene(ammonia, netScene, animDict, "chemical_pour_short_ammonia", 4.0, -8.0, 1)
|
||||
NetworkStartSynchronisedScene(netScene)
|
||||
Wait(animDuration)
|
||||
NetworkStopSynchronisedScene(netScene)
|
||||
DeleteObject(sacid)
|
||||
DeleteObject(ammonia)
|
||||
FreezeEntityPosition(ped, false)
|
||||
loadParticle(dict)
|
||||
methflare = StartParticleFxLoopedAtCoord('scr_fbi5a_flare',vector3(1005.95, -3202.09, -37.58), 0, 0, 0, 2.0, 0, 0,0)
|
||||
SetParticleFxLoopedAlpha(methflare, 1.0)
|
||||
Wait(20000)
|
||||
StopParticleFxLooped(methflare,true)
|
||||
local animDict, animName = "anim@amb@business@meth@meth_monitoring_cooking@cooking@", "chemical_pour_short_cooker"
|
||||
lib.requestAnimDict(animDict, 500)
|
||||
SetEntityCoords(PlayerPedId(), vector3(1005.773, -3200.402, -38.524))
|
||||
local targetPosition = GetEntityCoords(PlayerPedId())
|
||||
local animDuration = GetAnimDuration(animDict, animName) * 800
|
||||
FreezeEntityPosition(PlayerPedId(), true)
|
||||
local scenePos, sceneRot = vector3(1010.656, -3198.445, -38.925), vector3(0.0, 0.0, 0.0)
|
||||
local netScene = NetworkCreateSynchronisedScene(scenePos, sceneRot, 2, false, false, 1065353216, 0, 1.3)
|
||||
NetworkAddPedToSynchronisedScene(PlayerPedId(), netScene, animDict, animName, 1.5, -4.0, 1, 16, 1148846080, 0)
|
||||
local sacid = CreateObjectNoOffset("bkr_prop_meth_sacid", targetPosition, 1, 1, 0)
|
||||
NetworkAddEntityToSynchronisedScene(sacid, netScene, animDict, "chemical_pour_short_sacid", 4.0, -8.0, 1)
|
||||
local ammonia = CreateObjectNoOffset("bkr_prop_meth_ammonia", targetPosition, 1, 1, 0)
|
||||
NetworkAddEntityToSynchronisedScene(ammonia, netScene, animDict, "chemical_pour_short_ammonia", 4.0, -8.0, 1)
|
||||
NetworkStartSynchronisedScene(netScene)
|
||||
Wait(animDuration)
|
||||
NetworkStopSynchronisedScene(netScene)
|
||||
DeleteObject(sacid) DeleteObject(ammonia)
|
||||
FreezeEntityPosition(PlayerPedId(), false)
|
||||
lib.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
|
||||
|
||||
|
||||
function SmashMeth()
|
||||
local ver = ""
|
||||
local animDict, animName = "anim@amb@business@meth@meth_smash_weight_check@", "break_weigh_"..ver.."char02"
|
||||
lib.requestAnimDict(animDict, 500)
|
||||
local ped = PlayerPedId()
|
||||
local targetPosition = vector3(1012.628, -3194.619, -39.589)
|
||||
SetEntityCoords(ped, targetPosition)
|
||||
Wait(1)
|
||||
local animDuration = GetAnimDuration(animDict, animName) * 800
|
||||
FreezeEntityPosition(ped, true)
|
||||
local scenePos, sceneRot = vector3(1008.734, -3196.646, -39.99), vector3(0.0, 0.0, 1.08)
|
||||
local netScene = NetworkCreateSynchronisedScene(scenePos, sceneRot, 2, false, false, 1065353216, 0, 1.3)
|
||||
NetworkAddPedToSynchronisedScene(ped, netScene, animDict, animName, 1.5, -4.0, 1, 16, 1148846080, 0)
|
||||
local objects, sceneObjects = {}, {
|
||||
{
|
||||
hash = `w_me_hammer`,
|
||||
animName = "break_weigh_"..ver.."hammer"
|
||||
},
|
||||
{
|
||||
hash = `bkr_Prop_Meth_SmashedTray_01_frag_`,
|
||||
animName = "break_weigh_"..ver.."tray01"
|
||||
},
|
||||
{
|
||||
hash = `bkr_Prop_Meth_Tray_02a`,
|
||||
animName = "break_weigh_"..ver.."tray01^1"
|
||||
},
|
||||
{
|
||||
hash = `bkr_Prop_Meth_Tray_02a`,
|
||||
animName = "break_weigh_"..ver.."tray01^2"
|
||||
},
|
||||
{
|
||||
hash = `bkr_Prop_Meth_SmashedTray_01_frag_`,
|
||||
animName = "break_weigh_"..ver.."tray01^3"
|
||||
},
|
||||
}
|
||||
for i=1, #sceneObjects, 1 do
|
||||
local obj = CreateObjectNoOffset(sceneObjects[i].hash, targetPosition, true, true, true)
|
||||
NetworkAddEntityToSynchronisedScene(obj, netScene, animDict, sceneObjects[i].animName, 4.0, -8.0, 1)
|
||||
objects[#objects+1] = obj
|
||||
end
|
||||
NetworkStartSynchronisedScene(netScene)
|
||||
Wait(animDuration)
|
||||
NetworkStopSynchronisedScene(netScene)
|
||||
for i=1, #objects, 1 do
|
||||
DeleteObject(objects[i])
|
||||
end
|
||||
RemoveAnimDict(animDict)
|
||||
FreezeEntityPosition(ped, false)
|
||||
local ver = ""
|
||||
local animDict, animName = "anim@amb@business@meth@meth_smash_weight_check@", "break_weigh_"..ver.."char02"
|
||||
lib.requestAnimDict(animDict, 500)
|
||||
local ped = PlayerPedId()
|
||||
local targetPosition = vector3(1012.628, -3194.619, -39.589)
|
||||
SetEntityCoords(ped, targetPosition)
|
||||
Wait(1)
|
||||
local animDuration = GetAnimDuration(animDict, animName) * 800
|
||||
FreezeEntityPosition(ped, true)
|
||||
local scenePos, sceneRot = vector3(1008.734, -3196.646, -39.99), vector3(0.0, 0.0, 1.08)
|
||||
local netScene = NetworkCreateSynchronisedScene(scenePos, sceneRot, 2, false, false, 1065353216, 0, 1.3)
|
||||
NetworkAddPedToSynchronisedScene(ped, netScene, animDict, animName, 1.5, -4.0, 1, 16, 1148846080, 0)
|
||||
local objects, sceneObjects = {}, {
|
||||
{ hash = "w_me_hammer", animName = "break_weigh_" .. ver .. "hammer"},
|
||||
{ hash = "bkr_Prop_Meth_SmashedTray_01_frag_", animName = "break_weigh_"..ver.."tray01"},
|
||||
{ hash = "bkr_Prop_Meth_Tray_02a", animName = "break_weigh_"..ver.."tray01^1"},
|
||||
{ hash = "bkr_Prop_Meth_Tray_02a", animName = "break_weigh_"..ver.."tray01^2"},
|
||||
{ hash = "bkr_Prop_Meth_SmashedTray_01_frag_", animName = "break_weigh_"..ver.."tray01^3"},
|
||||
}
|
||||
for i=1, #sceneObjects, 1 do
|
||||
local obj = CreateObjectNoOffset(sceneObjects[i].hash, targetPosition, true, true, true)
|
||||
NetworkAddEntityToSynchronisedScene(obj, netScene, animDict, sceneObjects[i].animName, 4.0, -8.0, 1)
|
||||
objects[#objects+1] = obj
|
||||
end
|
||||
NetworkStartSynchronisedScene(netScene)
|
||||
Wait(animDuration)
|
||||
NetworkStopSynchronisedScene(netScene)
|
||||
for i=1, #objects, 1 do
|
||||
DeleteObject(objects[i])
|
||||
end
|
||||
RemoveAnimDict(animDict)
|
||||
FreezeEntityPosition(ped, false)
|
||||
end
|
||||
|
||||
function BagMeth()
|
||||
local ver = ""
|
||||
local ver = ""
|
||||
local animDict, animName = "anim@amb@business@meth@meth_smash_weight_check@", "break_weigh_"..ver.."char01"
|
||||
lib.requestAnimDict(animDict, 500)
|
||||
local animDuration = GetAnimDuration(animDict, animName) * 1000
|
||||
@@ -104,70 +86,28 @@ local ver = ""
|
||||
local scenePos, sceneRot = vector3(1008.734, -3196.646, -39.99), vector3(0.0, 0.0, 1.08)
|
||||
local scenes = {
|
||||
{
|
||||
{
|
||||
hash = `bkr_prop_meth_bigbag_04a`,
|
||||
animName = "break_weigh_"..ver.."box01"
|
||||
},
|
||||
{
|
||||
hash = `bkr_prop_meth_bigbag_03a`,
|
||||
animName = "break_weigh_"..ver.."box01^1"
|
||||
},
|
||||
{
|
||||
hash = `bkr_prop_meth_openbag_02`,
|
||||
animName = "break_weigh_"..ver.."methbag01"
|
||||
}
|
||||
{ hash = "bkr_prop_meth_bigbag_04a", animName = "break_weigh_"..ver.."box01"},
|
||||
{ hash = "bkr_prop_meth_bigbag_03a", animName = "break_weigh_"..ver.."box01^1"},
|
||||
{ hash = "bkr_prop_meth_openbag_02", animName = "break_weigh_"..ver.."methbag01"}
|
||||
},
|
||||
{
|
||||
{
|
||||
hash = `bkr_prop_meth_openbag_02`,
|
||||
animName = "break_weigh_"..ver.."methbag01^1"
|
||||
},
|
||||
{
|
||||
hash = `bkr_prop_meth_openbag_02`,
|
||||
animName = "break_weigh_"..ver.."methbag01^2"
|
||||
},
|
||||
{
|
||||
hash = `bkr_prop_meth_openbag_02`,
|
||||
animName = "break_weigh_"..ver.."methbag01^3"
|
||||
}
|
||||
{ hash = "bkr_prop_meth_openbag_02", animName = "break_weigh_"..ver.."methbag01^1"},
|
||||
{ hash = "bkr_prop_meth_openbag_02", animName = "break_weigh_"..ver.."methbag01^2"},
|
||||
{ hash = "bkr_prop_meth_openbag_02", animName = "break_weigh_"..ver.."methbag01^3"}
|
||||
},
|
||||
{
|
||||
{
|
||||
hash = `bkr_prop_meth_openbag_02`,
|
||||
animName = "break_weigh_"..ver.."methbag01^4"
|
||||
},
|
||||
{
|
||||
hash = `bkr_prop_meth_openbag_02`,
|
||||
animName = "break_weigh_"..ver.."methbag01^5"
|
||||
},
|
||||
{
|
||||
hash = `bkr_prop_meth_openbag_02`,
|
||||
animName = "break_weigh_"..ver.."methbag01^6"
|
||||
}
|
||||
{ hash = "bkr_prop_meth_openbag_02", animName = "break_weigh_"..ver.."methbag01^4"},
|
||||
{ hash = "bkr_prop_meth_openbag_02", animName = "break_weigh_"..ver.."methbag01^5"},
|
||||
{ hash = "bkr_prop_meth_openbag_02", animName = "break_weigh_"..ver.."methbag01^6"}
|
||||
},
|
||||
{
|
||||
{
|
||||
hash = `bkr_prop_meth_scoop_01a`,
|
||||
animName = "break_weigh_"..ver.."scoop"
|
||||
},
|
||||
{
|
||||
hash = `bkr_prop_coke_scale_01`,
|
||||
animName = "break_weigh_"..ver.."scale"
|
||||
},
|
||||
{
|
||||
hash = `bkr_prop_fakeid_penclipboard`,
|
||||
animName = "break_weigh_"..ver.."pen"
|
||||
}
|
||||
{ hash = "bkr_prop_meth_scoop_01a", animName = "break_weigh_"..ver.."scoop"},
|
||||
{ hash = "bkr_prop_coke_scale_01", animName = "break_weigh_"..ver.."scale"},
|
||||
{ hash = "bkr_prop_fakeid_penclipboard", animName = "break_weigh_"..ver.."pen"}
|
||||
},
|
||||
{
|
||||
{
|
||||
hash = `bkr_prop_fakeid_clipboard_01a`,
|
||||
animName = "break_weigh_"..ver.."clipboard"
|
||||
},
|
||||
{
|
||||
hash = `bkr_Prop_Meth_Tray_02a`,
|
||||
animName = "break_weigh_"..ver.."tray01^5"
|
||||
}
|
||||
{ hash = "bkr_prop_fakeid_clipboard_01a", animName = "break_weigh_"..ver.."clipboard"},
|
||||
{ hash = "bkr_Prop_Meth_Tray_02a", animName = "break_weigh_"..ver.."tray01^5"}
|
||||
}
|
||||
}
|
||||
local scenesList, entitiesList = {}, {}
|
||||
@@ -194,7 +134,6 @@ for i=1, #scenesList, 1 do
|
||||
end
|
||||
|
||||
Wait(animDuration-11000)
|
||||
-- Citizen.Wait(45000)
|
||||
for i=1, #scenesList, 1 do
|
||||
NetworkStopSynchronisedScene(scenesList[i])
|
||||
end
|
||||
@@ -206,21 +145,19 @@ FreezeEntityPosition(ped, false)
|
||||
end
|
||||
|
||||
function Tray()
|
||||
local pos = GetEntityCoords(PlayerPedId(), true)
|
||||
RequestAnimDict('anim@heists@box_carry@')
|
||||
while (not HasAnimDictLoaded('anim@heists@box_carry@')) do
|
||||
Wait(7)
|
||||
local pos = GetEntityCoords(PlayerPedId(), true)
|
||||
RequestAnimDict('anim@heists@box_carry@')
|
||||
while (not HasAnimDictLoaded('anim@heists@box_carry@')) do
|
||||
Wait(7)
|
||||
end
|
||||
TaskPlayAnim(PlayerPedId(), 'anim@heists@box_carry@', 'idle', 5.0, -1, -1, 50, 0, false, false, false)
|
||||
RequestModel("bkr_prop_meth_tray_02a")
|
||||
while not HasModelLoaded("bkr_prop_meth_tray_02a") do
|
||||
Wait(0)
|
||||
end
|
||||
local trays = CreateObject("bkr_prop_meth_tray_02a", pos.x, pos.y, pos.z, true, true, true)
|
||||
AttachEntityToEntity(trays, PlayerPedId(), GetPedBoneIndex(PlayerPedId(), 28422), 0.01,-0.2, -0.2, 20.0, 0.0, 0.0, true, true, false, true, 1, true)
|
||||
end
|
||||
TaskPlayAnim(PlayerPedId(), 'anim@heists@box_carry@', 'idle', 5.0, -1, -1, 50, 0, false, false, false)
|
||||
RequestModel("bkr_prop_meth_tray_02a")
|
||||
while not HasModelLoaded("bkr_prop_meth_tray_02a") do
|
||||
Wait(0)
|
||||
end
|
||||
local trays = CreateObject("bkr_prop_meth_tray_02a", pos.x, pos.y, pos.z, true, true, true)
|
||||
AttachEntityToEntity(trays, PlayerPedId(), GetPedBoneIndex(PlayerPedId(), 28422), 0.01,-0.2, -0.2, 20.0, 0.0, 0.0, true, true, false, true, 1, true)
|
||||
end
|
||||
|
||||
|
||||
|
||||
function CutCoke()
|
||||
local animDict, animName = "anim@amb@business@coc@coc_unpack_cut_left@", "coke_cut_v5_coccutter"
|
||||
@@ -231,65 +168,53 @@ function CutCoke()
|
||||
local scenePos, sceneRot = vector3(1090.37+.9, -3193.61-1.68, -39.60), vector3(0.0, 0.0, 0.00)
|
||||
local scenes = {
|
||||
{
|
||||
{
|
||||
hash = `bkr_prop_coke_bakingsoda_o`,
|
||||
animName = "coke_cut_v5_bakingsoda"
|
||||
},
|
||||
{
|
||||
hash = `prop_cs_credit_card`,
|
||||
animName = "coke_cut_v5_creditcard"
|
||||
},
|
||||
{
|
||||
hash = `prop_cs_credit_card`,
|
||||
animName = "coke_cut_v5_creditcard^1"
|
||||
}
|
||||
{ hash = "bkr_prop_coke_bakingsoda_o", animName = "coke_cut_v5_bakingsoda"},
|
||||
{ hash = "prop_cs_credit_card", animName = "coke_cut_v5_creditcard"},
|
||||
{ hash = "prop_cs_credit_card", animName = "coke_cut_v5_creditcard^1"}
|
||||
},
|
||||
|
||||
}
|
||||
local scenesList, entitiesList = {}, {}
|
||||
for i=1, #scenes, 1 do
|
||||
local scene = NetworkCreateSynchronisedScene(scenePos, sceneRot, 2, false, false, 1065353216, 0, 1.3)
|
||||
NetworkAddPedToSynchronisedScene(ped, scene, animDict, animName, 1.5, -4.0, 1, 16, 1148846080, 0)
|
||||
for j=1, #scenes[i], 1 do
|
||||
local s = scenes[i][j]
|
||||
RequestModel(s.hash)
|
||||
while not HasModelLoaded(s.hash) do
|
||||
Wait(0)
|
||||
local scenesList, entitiesList = {}, {}
|
||||
for i=1, #scenes, 1 do
|
||||
local scene = NetworkCreateSynchronisedScene(scenePos, sceneRot, 2, false, false, 1065353216, 0, 1.3)
|
||||
NetworkAddPedToSynchronisedScene(ped, scene, animDict, animName, 1.5, -4.0, 1, 16, 1148846080, 0)
|
||||
for j=1, #scenes[i], 1 do
|
||||
local s = scenes[i][j]
|
||||
RequestModel(s.hash)
|
||||
while not HasModelLoaded(s.hash) do
|
||||
Wait(0)
|
||||
end
|
||||
local obj = CreateObjectNoOffset(s.hash, coords, true, true, true)
|
||||
SetModelAsNoLongerNeeded(s.hash)
|
||||
entitiesList[#entitiesList+1] = obj
|
||||
NetworkAddEntityToSynchronisedScene(obj, scene, animDict, s.animName, 4.0, -8.0, 1)
|
||||
end
|
||||
local obj = CreateObjectNoOffset(s.hash, coords, true, true, true)
|
||||
SetModelAsNoLongerNeeded(s.hash)
|
||||
entitiesList[#entitiesList+1] = obj
|
||||
NetworkAddEntityToSynchronisedScene(obj, scene, animDict, s.animName, 4.0, -8.0, 1)
|
||||
scenesList[#scenesList+1] = scene
|
||||
end
|
||||
DisableCamCollisionForEntity(ped)
|
||||
FreezeEntityPosition(ped, true)
|
||||
for i=1, #scenesList, 1 do
|
||||
NetworkStartSynchronisedScene(scenesList[i])
|
||||
end
|
||||
scenesList[#scenesList+1] = scene
|
||||
end
|
||||
DisableCamCollisionForEntity(ped)
|
||||
FreezeEntityPosition(ped, true)
|
||||
for i=1, #scenesList, 1 do
|
||||
NetworkStartSynchronisedScene(scenesList[i])
|
||||
end
|
||||
|
||||
Wait(animDuration-11000)
|
||||
for i=1, #scenesList, 1 do
|
||||
NetworkStopSynchronisedScene(scenesList[i])
|
||||
end
|
||||
for i=1, #entitiesList, 1 do
|
||||
DeleteEntity(entitiesList[i])
|
||||
end
|
||||
RemoveAnimDict(animDict)
|
||||
FreezeEntityPosition(ped, false)
|
||||
Wait(animDuration-11000)
|
||||
for i=1, #scenesList, 1 do
|
||||
NetworkStopSynchronisedScene(scenesList[i])
|
||||
end
|
||||
for i=1, #entitiesList, 1 do
|
||||
DeleteEntity(entitiesList[i])
|
||||
end
|
||||
RemoveAnimDict(animDict)
|
||||
FreezeEntityPosition(ped, false)
|
||||
end
|
||||
|
||||
CreateThread(function()
|
||||
|
||||
BikerCocaine = exports['bob74_ipl']:GetBikerCocaineObject()
|
||||
BikerCocaine.Style.Set(BikerCocaine.Style.upgrade)
|
||||
BikerCocaine.Security.Set(BikerCocaine.Security.upgrade)
|
||||
BikerCocaine.Details.Enable({BikerCocaine.Details.cokeBasic1, BikerCocaine.Details.cokeBasic2, BikerCocaine.Details.cokeBasic3}, true)
|
||||
|
||||
end)
|
||||
|
||||
function BagCoke()
|
||||
function BagCoke()
|
||||
local ver = ""
|
||||
local animDict, animName = "anim@amb@business@meth@meth_smash_weight_check@", "break_weigh_"..ver.."char01"
|
||||
lib.requestAnimDict(animDict, 500)
|
||||
@@ -299,52 +224,22 @@ local ver = ""
|
||||
local scenePos, sceneRot = vector3(1090.62+4.3, -3196.2+3, -38.99-1), vector3(360.0, 360.0, 180.08)
|
||||
local scenes = {
|
||||
{
|
||||
{
|
||||
hash = `bkr_prop_coke_cutblock_01`,
|
||||
animName = "break_weigh_"..ver.."box01"
|
||||
},
|
||||
{
|
||||
hash = `bkr_prop_coke_fullmetalbowl_02`,
|
||||
animName = "break_weigh_"..ver.."box01^1"
|
||||
},
|
||||
{
|
||||
hash = `bkr_prop_coke_cutblock_01`,
|
||||
animName = "break_weigh_"..ver.."methbag01"
|
||||
}
|
||||
{ hash = "bkr_prop_coke_cutblock_01", animName = "break_weigh_"..ver.."box01"},
|
||||
{ hash = "bkr_prop_coke_fullmetalbowl_02", animName = "break_weigh_"..ver.."box01^1"},
|
||||
{ hash = "bkr_prop_coke_cutblock_01", animName = "break_weigh_"..ver.."methbag01"}
|
||||
},
|
||||
{
|
||||
{
|
||||
hash = `xm3_prop_xm3_bag_coke_01a`,
|
||||
animName = "break_weigh_"..ver.."methbag01^1"
|
||||
},
|
||||
{
|
||||
hash = `xm3_prop_xm3_bag_coke_01a`,
|
||||
animName = "break_weigh_"..ver.."methbag01^2"
|
||||
},
|
||||
{
|
||||
hash = `xm3_prop_xm3_bag_coke_01a`,
|
||||
animName = "break_weigh_"..ver.."methbag01^3"
|
||||
}
|
||||
{ hash = "xm3_prop_xm3_bag_coke_01a", animName = "break_weigh_"..ver.."methbag01^1"},
|
||||
{ hash = "xm3_prop_xm3_bag_coke_01a", animName = "break_weigh_"..ver.."methbag01^2"},
|
||||
{ hash = "xm3_prop_xm3_bag_coke_01a", animName = "break_weigh_"..ver.."methbag01^3"}
|
||||
},
|
||||
{
|
||||
{
|
||||
hash = `bkr_prop_coke_fullscoop_01a`,
|
||||
animName = "break_weigh_"..ver.."scoop"
|
||||
},
|
||||
{
|
||||
hash = `bkr_prop_coke_scale_01`,
|
||||
animName = "break_weigh_"..ver.."scale"
|
||||
},
|
||||
{
|
||||
hash = `bkr_prop_fakeid_penclipboard`,
|
||||
animName = "break_weigh_"..ver.."pen"
|
||||
}
|
||||
{ hash = "bkr_prop_coke_fullscoop_01a", animName = "break_weigh_"..ver.."scoop"},
|
||||
{ hash = "bkr_prop_coke_scale_01", animName = "break_weigh_"..ver.."scale"},
|
||||
{ hash = "bkr_prop_fakeid_penclipboard", animName = "break_weigh_"..ver.."pen"}
|
||||
},
|
||||
{
|
||||
{
|
||||
hash = `bkr_prop_fakeid_clipboard_01a`,
|
||||
animName = "break_weigh_"..ver.."clipboard"
|
||||
},
|
||||
{ hash = "bkr_prop_fakeid_clipboard_01a", animName = "break_weigh_"..ver.."clipboard"},
|
||||
|
||||
}
|
||||
}
|
||||
@@ -372,7 +267,6 @@ for i=1, #scenesList, 1 do
|
||||
end
|
||||
|
||||
Wait(animDuration-11000)
|
||||
-- Citizen.Wait(45000)
|
||||
for i=1, #scenesList, 1 do
|
||||
NetworkStopSynchronisedScene(scenesList[i])
|
||||
end
|
||||
@@ -384,8 +278,8 @@ FreezeEntityPosition(ped, false)
|
||||
end
|
||||
|
||||
function EcstasyEffect()
|
||||
local startStamina = 30
|
||||
SetFlash(0, 0, 500, 7000, 500)
|
||||
local startStamina = 50
|
||||
SetFlash(0, 0, 500, 20000, 500)
|
||||
while startStamina > 0 do
|
||||
Wait(1000)
|
||||
startStamina = startStamina - 1
|
||||
@@ -404,7 +298,7 @@ end
|
||||
|
||||
|
||||
function MethBagEffect()
|
||||
local startStamina = 8
|
||||
local startStamina = 30
|
||||
TrevorEffect()
|
||||
SetRunSprintMultiplierForPlayer(PlayerId(), 1.49)
|
||||
while startStamina > 0 do
|
||||
@@ -471,21 +365,21 @@ function AlienEffect()
|
||||
StopScreenEffect("DrugsMichaelAliensFightOut")
|
||||
end
|
||||
|
||||
local hit = 0
|
||||
function SpawnCarPedChase()
|
||||
local ped = GetEntityCoords(PlayerPedId())
|
||||
local stoploc = vector3(-1157.63, -3056.71, 13.94)
|
||||
local start = Config.StartLoc[math.random(1,#Config.StartLoc)]
|
||||
local search = false
|
||||
local spawnedCar = {}
|
||||
if started then
|
||||
else
|
||||
local stoploc = vector3(-1157.63, -3056.71, 13.94)
|
||||
local config = lib.callback.await('md-drugs:server:getLocs', false)
|
||||
local start = config.StartLoc[math.random(1,#config.StartLoc)]
|
||||
if started then
|
||||
Notify(Lang.lean.act,'error')
|
||||
else
|
||||
started = true
|
||||
lib.requestModel(`pounder`, Config.requestModelTime)
|
||||
lib.requestModel("ig_priest", Config.requestModelTime)
|
||||
lib.requestModel(`cargobob3`, Config.requestModelTime)
|
||||
leancar = CreateVehicle(`pounder`, start.x+3, start.y-2, start.z-1, 52.0, true, true)
|
||||
driver = CreatePed(26, "ig_priest", start.x, start.y, start.z, 268.9422, true, false)
|
||||
pilot2 = CreatePed(26, "ig_priest", stoploc.x-3, stoploc.y-3, stoploc.z-1, 268.9422, true, false)
|
||||
lib.requestModel("pounder", Config.RequestModelTime)
|
||||
lib.requestModel("ig_priest", Config.RequestModelTime)
|
||||
lib.requestModel("cargobob3", Config.RequestModelTime)
|
||||
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 pilot2 = CreatePed(26, "ig_priest", stoploc.x-3, stoploc.y-3, stoploc.z-1, 268.9422, false, false)
|
||||
FreezeEntityPosition(pilot2, true)
|
||||
SetEntityInvincible(pilot2, true)
|
||||
SetEntityAsMissionEntity(leancar)
|
||||
@@ -493,84 +387,48 @@ else
|
||||
SetPedIntoVehicle(driver, leancar, -1)
|
||||
SetPedFleeAttributes(driver,false)
|
||||
TaskVehicleDriveToCoordLongrange(driver, leancar, stoploc.x, stoploc.y, stoploc.z-1, 50.0, 524288, 25.0)
|
||||
SetPedKeepTask(driver, true)
|
||||
exports['qb-target']:AddTargetEntity(leancar, {
|
||||
options = {
|
||||
{
|
||||
name = 'leancar',
|
||||
icon = 'fa-solid fa-car',
|
||||
label = 'Steal From Car',
|
||||
action = function()
|
||||
local chance = math.random(1,100)
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent('md-drugs:server:givelean')
|
||||
started = nil
|
||||
else
|
||||
started = nil
|
||||
end
|
||||
end, 5, 8)
|
||||
if chance <= 30 then
|
||||
DeleteVehicle(leancar)
|
||||
DeleteEntity(driver)
|
||||
DeleteEntity(pilot2)
|
||||
end
|
||||
end,
|
||||
canInteract = function()
|
||||
if IsEntityDead(driver) then
|
||||
return true end
|
||||
end,
|
||||
}
|
||||
}
|
||||
})
|
||||
Wait(1000)
|
||||
search = true
|
||||
CreateThread(function()
|
||||
|
||||
while search do
|
||||
Wait(5000)
|
||||
if IsEntityDead(driver) == false then
|
||||
loc = #(GetEntityCoords(driver) - GetEntityCoords(pilot2))
|
||||
if loc < 25.0 then
|
||||
Wait( 3 * 1000)
|
||||
search = false
|
||||
started = nil
|
||||
heli = CreateVehicle(`cargobob3`, stoploc.x-20, stoploc.y-20, stoploc.z-1, 80, true,true)
|
||||
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, true,true)
|
||||
end
|
||||
end
|
||||
else
|
||||
started = nil
|
||||
end
|
||||
end
|
||||
end)
|
||||
SetPedKeepTask(driver, true)
|
||||
repeat
|
||||
Wait(1000)
|
||||
until #(GetEntityCoords(driver) - stoploc) < 20.0 or GetEntityHealth(driver) == 0
|
||||
RemoveBlip(leancar)
|
||||
if GetEntityHealth(driver) == 0 then
|
||||
AddSingleModel(leancar, { name = 'leancar', icon = 'fa-solid fa-car', label = Lang.targets.lean.st,
|
||||
action = function()
|
||||
hit = hit + 1
|
||||
if not minigame() then return end
|
||||
TriggerServerEvent('md-drugs:server:givelean')
|
||||
started = nil
|
||||
if math.random(1,100) <= 30 or hit == 4 then
|
||||
hit = 0
|
||||
DeleteVehicle(leancar)
|
||||
DeleteEntity(driver)
|
||||
DeleteEntity(pilot2)
|
||||
end
|
||||
end}, nil)
|
||||
else
|
||||
DeleteVehicle(leancar) DeleteEntity(driver) DeleteEntity(pilot2)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function SpawnMethCarPedChase()
|
||||
local ped = GetEntityCoords(PlayerPedId())
|
||||
local stoploc = vector3(-1157.63, -3056.71, 13.94)
|
||||
local start = Config.StartLoc[math.random(1,#Config.StartLoc)]
|
||||
local searchmeth = false
|
||||
local config = lib.callback.await('md-drugs:server:getLocs', false)
|
||||
local start = config.StartLoc[math.random(1,#config.StartLoc)]
|
||||
local startedmeth = false
|
||||
|
||||
if startedmeth then
|
||||
if startedmeth then
|
||||
Notify(Lang.meth.act,'error')
|
||||
else
|
||||
startedmeth = true
|
||||
lib.requestModel(`journey`, Config.requestModelTime)
|
||||
lib.requestModel("a_m_m_hillbilly_02", Config.requestModelTime)
|
||||
lib.requestModel(`cargobob3`, Config.requestModelTime)
|
||||
methcar = CreateVehicle(`journey`, start.x+3, start.y-2, start.z-1, 52.0, true, true)
|
||||
methdriver = CreatePed(26, "a_m_m_hillbilly_02", start.x, start.y, start.z, 268.9422, true, false)
|
||||
methpilot = CreatePed(26, "a_m_m_hillbilly_02", stoploc.x-3, stoploc.y-3, stoploc.z-1, 268.9422, true, false)
|
||||
lib.requestModel("journey", Config.RequestModelTime)
|
||||
lib.requestModel("a_m_m_hillbilly_02", Config.RequestModelTime)
|
||||
lib.requestModel("cargobob3", Config.RequestModelTime)
|
||||
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 methpilot = CreatePed(26, "a_m_m_hillbilly_02", stoploc.x-3, stoploc.y-3, stoploc.z-1, 268.9422, false, false)
|
||||
FreezeEntityPosition(methpilot, true)
|
||||
SetEntityInvincible(methpilot, true)
|
||||
SetEntityAsMissionEntity(methcar)
|
||||
@@ -579,103 +437,52 @@ else
|
||||
SetPedFleeAttributes(methdriver,false)
|
||||
TaskVehicleDriveToCoordLongrange(methdriver, methcar, stoploc.x, stoploc.y, stoploc.z-1, 50.0, 524288, 25.0)
|
||||
SetPedKeepTask(methdriver, true)
|
||||
exports['qb-target']:AddTargetEntity(methcar, {
|
||||
options = {
|
||||
{
|
||||
name = 'methcar',
|
||||
icon = 'fa-solid fa-car',
|
||||
label = 'Steal From Car',
|
||||
action = function()
|
||||
local chance = math.random(1,100)
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent('md-drugs:server:givemethingridients')
|
||||
startedmeth = nil
|
||||
else
|
||||
startedmeth = nil
|
||||
end
|
||||
end, 5, 8)
|
||||
print(chance)
|
||||
if chance <= 30 then
|
||||
DeleteVehicle(methcar)
|
||||
DeleteEntity(methdriver)
|
||||
DeleteEntity(methpilot)
|
||||
end
|
||||
end,
|
||||
canInteract = function()
|
||||
if IsEntityDead(methdriver) then
|
||||
return true end
|
||||
end,
|
||||
}
|
||||
}
|
||||
})
|
||||
Wait(1000)
|
||||
searchmeth = true
|
||||
CreateThread(function()
|
||||
|
||||
while searchmeth do
|
||||
Wait(1000)
|
||||
local pickuploc = GetEntityCoords(methcar)
|
||||
if IsEntityDead(methdriver) == false then
|
||||
loc = #(GetEntityCoords(methdriver) - GetEntityCoords(methpilot))
|
||||
if loc < 25.0 then
|
||||
Wait( 3 * 1000)
|
||||
startedmeth = nil
|
||||
methheli = CreateVehicle(`cargobob3`, pickuploc.x, pickuploc.y, pickuploc.z+4, 80, true,true)
|
||||
Wait(10)
|
||||
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)
|
||||
searchmeth = false
|
||||
else
|
||||
methheli = CreateVehicle(`cargobob3`, stoploc.x-20, stoploc.y-20, stoploc.z-1, 80, true,true)
|
||||
end
|
||||
end
|
||||
else
|
||||
startedmeth = nil
|
||||
end
|
||||
|
||||
end
|
||||
end)
|
||||
repeat
|
||||
Wait(1000)
|
||||
until #(GetEntityCoords(methdriver) - stoploc) < 20.0 or GetEntityHealth(methdriver) == 0
|
||||
if GetEntityHealth(methdriver) == 0 then
|
||||
AddSingleModel(methcar,{
|
||||
name = 'methcar',
|
||||
icon = 'fa-solid fa-car',
|
||||
label = Lang.targets.meth.stealfromcar,
|
||||
action = function()
|
||||
if not minigame() then return end
|
||||
TriggerServerEvent('md-drugs:server:givemethingridients')
|
||||
startedmeth = false
|
||||
if math.random(1,100) <= 30 then
|
||||
DeleteVehicle(methcar)
|
||||
DeleteEntity(methdriver)
|
||||
DeleteEntity(methpilot)
|
||||
end
|
||||
end,
|
||||
}, nil )
|
||||
else
|
||||
DeleteVehicle(methcar)
|
||||
DeleteEntity(methdriver)
|
||||
DeleteEntity(methpilot)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function SetUpPeds()
|
||||
local ped = GetEntityCoords(PlayerPedId())
|
||||
local CokePed = CreatePed(0, "g_m_y_famdnf_01", ped.x+3, ped.y-5, ped.z-1, 90.0, true, true)
|
||||
local CokePed2 = CreatePed(0,"g_m_y_famdnf_01", ped.x+6, ped.y-10, ped.z-1, 90.0, true, true)
|
||||
local CokePed3 = CreatePed(0,"g_m_y_famdnf_01", ped.x+-2, ped.y+5, ped.z-1, 90.0, true, true)
|
||||
local CokePed4 = CreatePed(0,"g_m_y_famdnf_01", ped.x+8, ped.y-12, ped.z-1, 90.0, true, true)
|
||||
local CokePed5 = CreatePed(0,"g_m_y_famdnf_01", ped.x+5, ped.y-2, ped.z-1, 90.0, true, true)
|
||||
local CokePed6 = CreatePed(0,"g_m_y_famdnf_01", ped.x+2, ped.y-20, ped.z-1, 90.0, true, true)
|
||||
local CokePed7 = CreatePed(0,"g_m_y_famdnf_01", ped.x+1, ped.y-10, ped.z-1, 90.0, true, true)
|
||||
SetPedArmour(CokePed, 200)
|
||||
SetPedCanSwitchWeapon(CokePed, true)
|
||||
GiveWeaponToPed(CokePed, "weapon_pistol", 1, false, true)
|
||||
TaskCombatPed(CokePed, PlayerPedId(), 0, 16)
|
||||
GiveWeaponToPed(CokePed2, "weapon_pistol", 1, false, true)
|
||||
TaskCombatPed(CokePed2, PlayerPedId(), 0, 16)
|
||||
GiveWeaponToPed(CokePed3, "weapon_pistol", 1, false, true)
|
||||
TaskCombatPed(CokePed3, PlayerPedId(), 0, 16)
|
||||
GiveWeaponToPed(CokePed4, "weapon_pistol", 1, false, true)
|
||||
TaskCombatPed(CokePed4, PlayerPedId(), 0, 16)
|
||||
GiveWeaponToPed(CokePed5, "weapon_pistol", 1, false, true)
|
||||
TaskCombatPed(CokePed5, PlayerPedId(), 0, 16)
|
||||
GiveWeaponToPed(CokePed6, "weapon_pistol", 1, false, true)
|
||||
TaskCombatPed(CokePed6, PlayerPedId(), 0, 16)
|
||||
GiveWeaponToPed(CokePed7, "weapon_pistol", 1, false, true)
|
||||
TaskCombatPed(CokePed7, PlayerPedId(), 0, 16)
|
||||
SetPedCombatAttributes(CokePed, 46, true)
|
||||
SetPedCombatAttributes(CokePed2, 46, true)
|
||||
SetPedCombatAttributes(CokePed3, 46, true)
|
||||
SetPedCombatAttributes(CokePed4, 46, true)
|
||||
SetPedCombatAttributes(CokePed5, 46, true)
|
||||
SetPedCombatAttributes(CokePed6, 46, true)
|
||||
SetPedCombatAttributes(CokePed7, 46, true)
|
||||
AddRelationshipGroup('setups')
|
||||
local ped = GetEntityCoords(PlayerPedId())
|
||||
local peds = {
|
||||
{x = ped.x+3, y = ped.y-5, z = ped.z-1, },
|
||||
{x = ped.x+6, y = ped.y-10, z = ped.z-1,},
|
||||
{x = ped.x+-2,y = ped.y+5, z = ped.z-1,},
|
||||
{x = ped.x+8, y = ped.y-12, z = ped.z-1,},
|
||||
{x = ped.x+5, y = ped.y-2, z = ped.z-1, },
|
||||
{x = ped.x+2, y = ped.y-20, z = ped.z-1,},
|
||||
{x = ped.x+1, y = ped.y-10, z = ped.z-1,},
|
||||
}
|
||||
for i = 1, #peds do
|
||||
local k = peds[i]
|
||||
i = CreatePed(0, "g_m_y_famdnf_01", k.x, k.y, k.z, 90.0, true, true)
|
||||
SetPedRelationshipGroupHash(i, 'setups')
|
||||
GiveWeaponToPed(i, "weapon_pistol", 1, false, true)
|
||||
TaskCombatPed(i, PlayerPedId(), 0, 16)
|
||||
SetPedCombatAttributes(i, 46, true)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,40 +1,20 @@
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
local CocaPlant = {}
|
||||
local cuttingcoke = nil
|
||||
local baggingcoke = nil
|
||||
function LoadModel(hash)
|
||||
hash = GetHashKey(hash)
|
||||
lib.requestModel(hash, Config.requestModelTime)
|
||||
end
|
||||
|
||||
local function pick(loc)
|
||||
if not progressbar(Lang.Coke.picking, 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("coke:pickupCane", loc)
|
||||
return true
|
||||
end
|
||||
|
||||
RegisterNetEvent('coke:respawnCane', function(loc)
|
||||
local v = GlobalState.CocaPlant[loc]
|
||||
local hash = GetHashKey(v.model)
|
||||
--if not HasModelLoaded(hash) then LoadModel(hash) end
|
||||
if not CocaPlant[loc] then
|
||||
CocaPlant[loc] = CreateObject(hash, v.location, false, true, true)
|
||||
SetEntityAsMissionEntity(CocaPlant[loc], true, true)
|
||||
FreezeEntityPosition(CocaPlant[loc], true)
|
||||
SetEntityHeading(CocaPlant[loc], v.heading)
|
||||
exports['qb-target']:AddTargetEntity(CocaPlant[loc], {
|
||||
options = { {
|
||||
icon = "fas fa-hand",
|
||||
label = "pick Cocaine",
|
||||
action = function()
|
||||
QBCore.Functions.Progressbar("pick_cane", "picking Cocaine Leaves", 2000, false, true, {
|
||||
disableMovement = true, disableCarMovement = true, disableMouse = false, disableCombat = true, },
|
||||
{ animDict = 'amb@prop_human_bum_bin@idle_a', anim = 'idle_a', flags = 47, },
|
||||
{}, {}, function()
|
||||
TriggerServerEvent("coke:pickupCane", loc)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end, function() -- Cancel
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
end
|
||||
}
|
||||
},
|
||||
distance = 3.0
|
||||
})
|
||||
Freeze(CocaPlant[loc], true, v.heading)
|
||||
AddSingleModel(CocaPlant[loc], {icon = "fa-solid fa-seedling", label = Lang.targets.coke.pick, action = function() if not pick(loc) then return end end}, loc)
|
||||
end
|
||||
end)
|
||||
|
||||
@@ -46,47 +26,15 @@ end)
|
||||
RegisterNetEvent("coke:init", function()
|
||||
for k, v in pairs (GlobalState.CocaPlant) do
|
||||
local hash = GetHashKey(v.model)
|
||||
if not HasModelLoaded(hash) then LoadModel(hash) end
|
||||
LoadModel(hash)
|
||||
if not v.taken then
|
||||
CocaPlant[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z, false, true, true)
|
||||
SetEntityAsMissionEntity(CocaPlant[k], true, true)
|
||||
FreezeEntityPosition(CocaPlant[k], true)
|
||||
SetEntityHeading(CocaPlant[k], v.heading)
|
||||
exports['qb-target']:AddTargetEntity(CocaPlant[k], {
|
||||
options = { {
|
||||
icon = "fas fa-hand",
|
||||
label = "pick cocaine",
|
||||
action = function()
|
||||
QBCore.Functions.Progressbar("pick_cane", "picking Cocaine Leaves", 2000, false, true, {
|
||||
disableMovement = true, disableCarMovement = true, disableMouse = false, disableCombat = true, },
|
||||
{ animDict = 'amb@prop_human_bum_bin@idle_a', anim = 'idle_a', flags = 47, },
|
||||
{}, {}, function()
|
||||
TriggerServerEvent("coke:pickupCane", k)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end, function() -- Cancel
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
end
|
||||
}
|
||||
},
|
||||
distance = 3.0
|
||||
})
|
||||
Freeze(CocaPlant[k], true, v.heading)
|
||||
AddSingleModel(CocaPlant[k], {icon = "fa-solid fa-seedling", label = Lang.targets.coke.pick, action = function() if not pick(k) then return end end}, k)
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
AddEventHandler('onResourceStart', function(resource)
|
||||
if resource == GetCurrentResourceName() then
|
||||
LoadModel('prop_plant_01a')
|
||||
TriggerEvent('coke:init')
|
||||
end
|
||||
end)
|
||||
RegisterNetEvent('QBCore:Client:OnPlayerLoaded', function()
|
||||
Wait(3000)
|
||||
LoadModel('prop_plant_01a')
|
||||
TriggerEvent('coke:init')
|
||||
end)
|
||||
|
||||
AddEventHandler('onResourceStop', function(resourceName)
|
||||
if GetCurrentResourceName() == resourceName then
|
||||
SetModelAsNoLongerNeeded(GetHashKey('prop_plant_01a'))
|
||||
@@ -98,82 +46,45 @@ AddEventHandler('onResourceStop', function(resourceName)
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:makepowder")
|
||||
AddEventHandler("md-drugs:client:makepowder", function()
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
QBCore.Functions.Progressbar("drink_something", "chopping plants to powder", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
TriggerServerEvent("md-drugs:server:makepowder")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
RegisterNetEvent("md-drugs:client:makepowder", function(data)
|
||||
if not ItemCheck('coca_leaf') then return end
|
||||
if not progressbar(Lang.Coke.makepow, 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:makepowder", data.data)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:cutcokeone")
|
||||
AddEventHandler("md-drugs:client:cutcokeone", function()
|
||||
RegisterNetEvent("md-drugs:client:cutcokeone", function(data)
|
||||
if not ItemCheck('bakingsoda') then return end
|
||||
cuttingcoke = true
|
||||
CutCoke()
|
||||
TriggerServerEvent("md-drugs:server:cutcokeone")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
if Config.FancyCokeAnims then
|
||||
CutCoke()
|
||||
else
|
||||
if not progressbar(Lang.Coke.cutting, 5000, 'uncuff') then cuttingcoke = nil return end
|
||||
end
|
||||
TriggerServerEvent("md-drugs:server:cutcokeone", data.data)
|
||||
cuttingcoke = nil
|
||||
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:bagcoke")
|
||||
AddEventHandler("md-drugs:client:bagcoke", function()
|
||||
RegisterNetEvent("md-drugs:client:bagcoke", function(data)
|
||||
if not ItemCheck('empty_weed_bag') then return end
|
||||
baggingcoke = true
|
||||
BagCoke()
|
||||
TriggerServerEvent("md-drugs:server:bagcoke")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
if Config.FancyCokeAnims then
|
||||
BagCoke()
|
||||
else
|
||||
if not progressbar(Lang.Coke.bagging, 5000, 'uncuff') then baggingcoke = nil return end
|
||||
end
|
||||
TriggerServerEvent("md-drugs:server:bagcoke", data.data)
|
||||
baggingcoke = nil
|
||||
|
||||
end)
|
||||
|
||||
CreateThread(function()
|
||||
local cut = vector3(1093.01, -3194.8, -39.99)
|
||||
local bagg = vector3(1090.70, -3195.91, -39.99)
|
||||
exports['qb-target']:AddBoxZone("cutcokepowder",vector3(cut.x, cut.y, cut.z),1.5, 1.75, { -- 963.37, -2122.95, 31.47
|
||||
name = "cutcokepowder",
|
||||
heading = 11.0,
|
||||
debugPoly = false,
|
||||
minZ = cut.z-1,
|
||||
maxZ = cut.z+1,
|
||||
}, {
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:cutcokeone",
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "cut up",
|
||||
canInteract = function()
|
||||
if cuttingcoke == nil and baggingcoke == nil then return true end
|
||||
end
|
||||
},
|
||||
},
|
||||
distance = 2.5
|
||||
})
|
||||
exports['qb-target']:AddBoxZone("bagcokepowder",vector3(bagg.x, bagg.y, bagg.z),1.5, 1.75, { -- 963.37, -2122.95, 31.47
|
||||
name = "bagcokepowder",
|
||||
heading = 11.0,
|
||||
debugPoly = false,
|
||||
minZ = bagg.z-1,
|
||||
maxZ = bagg.z+1,
|
||||
}, {
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:bagcoke",
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "bagging",
|
||||
canInteract = function()
|
||||
if baggingcoke == nil and cuttingcoke == nil then return true end
|
||||
end
|
||||
},
|
||||
},
|
||||
distance = 2.5
|
||||
})
|
||||
local config = lib.callback.await('md-drugs:server:getLocs', false)
|
||||
if Config.FancyCokeAnims == false then
|
||||
AddBoxZoneMulti('cuttcoke', config.CuttingCoke, { type = "client",event = "md-drugs:client:cutcokeone", icon = "fa-solid fa-mortar-pestle", label = Lang.targets.coke.cut})
|
||||
AddBoxZoneMulti('baggcoke', config.BaggingCoke, { type = "client",event = "md-drugs:client:bagcoke", icon = "fa-solid fa-sack-xmark", label = Lang.targets.coke.bag})
|
||||
else
|
||||
AddBoxZoneSingle('cutcoke', config.singleSpot.cutcoke,
|
||||
{ data = config.singleSpot.cutcoke, type = "client", event = "md-drugs:client:cutcokeone", icon = "fa-solid fa-mortar-pestle", label = Lang.targets.coke.cut, canInteract = function() if cuttingcoke == nil and baggingcoke == nil then return true end end })
|
||||
AddBoxZoneSingle('bagcokepowder', config.singleSpot.bagcokepowder,
|
||||
{ data = config.singleSpot.bagcokepowder, type = "client", event = "md-drugs:client:bagcoke", icon = "fa-solid fa-sack-xmark", label = Lang.targets.coke.bag, canInteract = function() if baggingcoke == nil and cuttingcoke == nil then return true end end })
|
||||
end
|
||||
end)
|
||||
@@ -1,25 +1,62 @@
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
|
||||
RegisterNetEvent('md-drugs:client:consumedrugs', function(itemName)
|
||||
QBCore.Functions.Progressbar("use_lsd", "Have Fun!", 1750, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
}, {
|
||||
animDict = "mp_suicide",
|
||||
anim = "pill",
|
||||
flags = 49,
|
||||
}, {}, {}, function()
|
||||
ClearPedTasks(PlayerPedId())
|
||||
TriggerEvent("evidence:client:SetStatus", "widepupils", 300)
|
||||
if itemName == "white_playboys" or itemName == "white_playboys2" or itemName == "white_playboys3" or itemName == "white_playboys4" or itemName == "blue_playboys" or itemName == "blue_playboys2" or itemName == "blue_playboys3" or itemName == "blue_playboys4" or itemName == "red_playboys" or itemName == "red_playboys2" or itemName == "red_playboys3" or itemName == "red_playboys4" or itemName == "orange_playboys" or itemName == "orange_playboy2s" or itemName == "orange_playboys3" or itemName == "orange_playboys4" or itemName == "white_aliens" or itemName == "white_aliens2" or itemName == "white_aliens3" or itemName == "white_aliens4" or itemName == "blue_aliens" or itemName == "blue_aliens2" or itemName == "blue_aliens3" or itemName == "blue_aliens4" or itemName == "red_aliens" or itemName == "red_aliens3" or itemName == "red_aliens2" or itemName == "red_aliens4" or itemName == "orange_aliens" or itemName == "orange_aliens2" or itemName == "orange_aliens3" or itemName == "orange_aliens4" or itemName == "white_pl" or itemName == "white_pl2" or itemName == "white_pl3" or itemName == "white_pl4" or itemName == "blue_pl" or itemName == "blue_pl2" or itemName == "blue_pl3" or itemName == "blue_pl4" or itemName == "red_pl" or itemName == "red_pl2" or itemName == "red_pl3" or itemName == "red_pl4" or itemName == "orange_pl" or itemName == "orange_pl2" or itemName == "orange_pl3" or itemName == "orange_pl4" or itemName == "white_trolls" or itemName == "white_trolls2" or itemName == "white_trolls3" or itemName == "white_trolls4" or itemName == "blue_trolls" or itemName == "blue_trolls2" or itemName == "blue_trolls3" or itemName == "blue_trolls4" or itemName == "red_trolls" or itemName == "red_trolls2" or itemName == "red_trolls3" or itemName == "red_trolls4" or itemName == "orange_trolls" or itemName == "orange_trolls2" or itemName == "orange_trolls3" or itemName == "orange_trolls4" or itemName == "white_cats2" or itemName == "white_cats3" or itemName == "white_cats4" or itemName == "white_cats" or itemName == "blue_cats" or itemName == "blue_cats3" or itemName == "blue_cats2" or itemName == "blue_cats4" or itemName == "red_cats" or itemName == "red_cats2" or itemName == "red_cats3" or itemName == "red_cats4" or itemName == "orange_cats" or itemName == "orange_cats2" or itemName == "orange_cats3" or itemName == "orange_cats4" then
|
||||
AlienEffect()
|
||||
elseif itemName == "cupoflean" or itemName == "cupofdextro" or itemName == "baggedcracked" or itemName == "baggedcrackedstagetwo" or itemName == "baggedcrackedstagethree" then
|
||||
CokeBaggyEffect()
|
||||
else
|
||||
TrevorEffect()
|
||||
end
|
||||
end)
|
||||
|
||||
lib.callback.register('md-drugs:client:consumedrugs', function(time, effect, anim, progresstext, status, item)
|
||||
if not progressbar(progresstext .. GetLabel(item).. "!", time, anim ) then return end
|
||||
for k, v in pairs (status) do
|
||||
if k == 'health' then
|
||||
local cur = GetEntityHealth(PlayerPedId())
|
||||
SetEntityHealth(PlayerPedId(), cur + v)
|
||||
elseif k == 'thirst' or k == 'stress' or k == 'hunger' then
|
||||
TriggerServerEvent('md-drugs:server:updatestatus', k, v)
|
||||
elseif k == "armor" then
|
||||
TriggerServerEvent('hospital:server:SetArmor', v)
|
||||
TriggerServerEvent('consumables:server:useArmor')
|
||||
SetPedArmour(PlayerPedId(), v)
|
||||
elseif k == 'speed' then
|
||||
TriggerEvent('md-drugs:client:recievebuff', k, v)
|
||||
elseif k == 'strength' then
|
||||
TriggerEvent('md-drugs:client:recievebuff', k, v)
|
||||
end
|
||||
end
|
||||
TriggerEvent('evidence:client:SetStatus', 'widepupils', 200)
|
||||
TriggerEvent('md-drugs:client:applyFeeling', effect)
|
||||
return true
|
||||
end)
|
||||
|
||||
RegisterNetEvent('md-drugs:client:recievebuff', function(type, amount)
|
||||
if type == 'speed' then
|
||||
local count = 0
|
||||
SetRunSprintMultiplierForPlayer(PlayerPedId(), 1.49)
|
||||
repeat
|
||||
count = count + 1
|
||||
Wait(1000)
|
||||
until count == amount
|
||||
SetRunSprintMultiplierForPlayer(PlayerPedId(), 1.00)
|
||||
end
|
||||
if type == 'strength' then
|
||||
local strength = 0
|
||||
SetCurrentPedWeapon(PlayerPedId(), 'weapon_unarmed', true)
|
||||
SetWeaponDamageModifier(GetHashKey("WEAPON_UNARMED"), 50.0)
|
||||
repeat
|
||||
strength = strength + 1
|
||||
Wait(1000)
|
||||
until strength == amount
|
||||
SetWeaponDamageModifier(GetHashKey("WEAPON_UNARMED"), 1.0)
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterNetEvent('md-drugs:client:applyFeeling', function(effect)
|
||||
if effect == "alien" then
|
||||
AlienEffect()
|
||||
elseif effect == "ecstacy" then
|
||||
EcstasyEffect()
|
||||
elseif effect == "meth" then
|
||||
MethBagEffect()
|
||||
elseif effect == "coke" then
|
||||
CokeBaggyEffect()
|
||||
elseif effect == "trevor" then
|
||||
TrevorEffect()
|
||||
else
|
||||
|
||||
end
|
||||
end)
|
||||
@@ -1,308 +1,115 @@
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
local cornerselling = false
|
||||
local hasTarget = false
|
||||
local lastPed = {}
|
||||
local stealingPed = nil
|
||||
local stealData = {}
|
||||
local availableDrugs = {}
|
||||
local currentOfferDrug = nil
|
||||
local CurrentCops = 0
|
||||
local textDrawn = false
|
||||
local zoneMade = false
|
||||
local sell = false
|
||||
local sold = false
|
||||
local targbusy = false
|
||||
local inZone = false
|
||||
local active = false
|
||||
|
||||
-- Functions
|
||||
local function LoadAnimDict(dict)
|
||||
RequestAnimDict(dict)
|
||||
while not HasAnimDictLoaded(dict) do
|
||||
Wait(0)
|
||||
end
|
||||
local function reset(targ)
|
||||
FreezeEntityPosition(targ, false)
|
||||
ClearPedTasks(targ)
|
||||
local coords = GetEntityCoords(targ)
|
||||
TaskWanderInArea(targ, coords.x, coords.y, coords.z, 100.0, 2, 10.0)
|
||||
Wait(10000)
|
||||
DeletePed(targ)
|
||||
targbusy = false
|
||||
sold = true
|
||||
active = false
|
||||
end
|
||||
|
||||
local function TooFarAway()
|
||||
QBCore.Functions.Notify("too far from your corner homie", 'error')
|
||||
LocalPlayer.state:set("inv_busy", false, true)
|
||||
cornerselling = false
|
||||
hasTarget = false
|
||||
availableDrugs = {}
|
||||
local function walkAway(targ)
|
||||
FreezeEntityPosition(targ, false)
|
||||
ClearPedTasks(targ)
|
||||
local coords = GetEntityCoords(targ)
|
||||
TaskWanderInArea(targ, coords.x, coords.y, coords.z, 100.0, 2, 10.0)
|
||||
Wait(10000)
|
||||
DeletePed(targ)
|
||||
targbusy = false
|
||||
active = false
|
||||
end
|
||||
|
||||
local function PoliceCallCornerselling()
|
||||
print"tell your devs to read the readme. it isnt hard for most people but they are dumb"
|
||||
local function sellDrug(item, amount, price, targ)
|
||||
PoliceCall(20)
|
||||
targbusy = true
|
||||
if IsPedInAnyVehicle(PlayerPedId(), true) then
|
||||
Notify(Lang.Cornerselling.inveh, 'error')
|
||||
reset(targ)
|
||||
return end
|
||||
if not progressbar(string.format(Lang.Cornerselling.selling, GetLabel(item), price), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent('md-drugs:server:sellCornerDrugs', item, amount, price)
|
||||
reset(targ)
|
||||
end
|
||||
|
||||
local function deny(targ)
|
||||
PoliceCall(20)
|
||||
targbusy = true
|
||||
if not progressbar(Lang.Cornerselling.deny, 4000, 'argue5') then return end
|
||||
reset(targ)
|
||||
end
|
||||
|
||||
local function RobberyPed()
|
||||
if Config.UseTarget then
|
||||
exports['qb-target']:AddTargetEntity(stealingPed, {
|
||||
options = {
|
||||
{
|
||||
icon = 'fas fa-magnifying-glass',
|
||||
label = "take back",
|
||||
action = function()
|
||||
local player = PlayerPedId()
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'pickup'})
|
||||
Wait(2000)
|
||||
ClearPedTasks(player)
|
||||
TriggerServerEvent('md-drugs:server:giveStealItems', stealData.item, stealData.amount)
|
||||
TriggerEvent('inventory:client:ItemBox', QBCore.Shared.Items[stealData.item], "add")
|
||||
stealingPed = nil
|
||||
stealData = {}
|
||||
ClearPedTasks(PlayerPedId())
|
||||
exports['qb-target']:RemoveZone('stealingPed')
|
||||
end,
|
||||
canInteract = function(entity)
|
||||
if IsEntityDead(entity) then
|
||||
return true
|
||||
end
|
||||
end
|
||||
}
|
||||
},
|
||||
distance = 1.5,
|
||||
})
|
||||
CreateThread(function()
|
||||
while stealingPed do
|
||||
local playerPed = PlayerPedId()
|
||||
local pos = GetEntityCoords(playerPed)
|
||||
local pedpos = GetEntityCoords(stealingPed)
|
||||
local dist = #(pos - pedpos)
|
||||
if dist > 100 then
|
||||
stealingPed = nil
|
||||
stealData = {}
|
||||
exports['qb-target']:RemoveZone('stealingPed')
|
||||
break
|
||||
end
|
||||
Wait(0)
|
||||
end
|
||||
end)
|
||||
end
|
||||
function Cornersell()
|
||||
if active then return false end
|
||||
local targ = lib.GetClosestPed(GetEntityCoords(PlayerPedId()), 8)
|
||||
if targ == nil then return end
|
||||
if IsPedInAnyVehicle(targ, false) or GetEntityHealth(targ) == 0 or not IsPedHuman(targ) then return end
|
||||
local data = lib.callback.await('md-drugs:server:cornerselling:getAvailableDrugs', false, targ)
|
||||
if data.item == 'nothing' then Notify(Lang.Cornerselling.nodrugs, 'error') sell = false FreezeEntityPosition(targ, false) ClearPedTasks(targ) active = false return false end
|
||||
TaskGoToCoordAnyMeans(targ, GetEntityCoords(PlayerPedId()), 1.0, 0, 0, 0, 0)
|
||||
active = true
|
||||
repeat
|
||||
Wait(1000)
|
||||
until #(GetEntityCoords(PlayerPedId()) - GetEntityCoords(targ)) < 2.0
|
||||
lib.requestAnimDict("rcmme_tracey1")
|
||||
TaskStartScenarioInPlace(targ, "WORLD_HUMAN_STAND_IMPATIENT_UPRIGHT", 0, false) FreezeEntityPosition(targ, true)
|
||||
AddMultiModel(data.ped, {
|
||||
{ label = string.format(Lang.targets.CornerSell.sell, data.amount, GetLabel(data.item), data.price), icon ="fa-solid fa-money-bill",
|
||||
action = function() sellDrug(data.item, data.amount, data.price, targ) end,
|
||||
canInteract = function()
|
||||
if not targbusy then return true end end,
|
||||
},
|
||||
{ label = Lang.targets.CornerSell.deny, icon = "fa-solid fa-person-harassing",
|
||||
action = function() deny(targ) end,
|
||||
canInteract = function()
|
||||
if not targbusy then return true end end,
|
||||
}}, nil)
|
||||
local timer = 45
|
||||
repeat
|
||||
Wait(1000)
|
||||
timer = timer - 1
|
||||
until sold or timer == 0
|
||||
if sold then sold = false return true end
|
||||
if timer == 0 then Notify(Lang.Cornerselling.timeout, 'error') targbusy = true walkAway(targ) return false end
|
||||
end
|
||||
|
||||
local function SellToPed(ped)
|
||||
hasTarget = true
|
||||
|
||||
for i = 1, #lastPed, 1 do
|
||||
if lastPed[i] == ped then
|
||||
hasTarget = false
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
local successChance = math.random(1, 100)
|
||||
local scamChance = math.random(1, 100)
|
||||
local getRobbed = math.random(1, 100)
|
||||
if successChance <= QBConfig.SuccessChance then hasTarget = false return end
|
||||
|
||||
local drugType = math.random(1, #availableDrugs)
|
||||
local bagAmount = math.random(1, availableDrugs[drugType].amount)
|
||||
if bagAmount > 15 then bagAmount = math.random(9, 15) end
|
||||
|
||||
currentOfferDrug = availableDrugs[drugType]
|
||||
|
||||
local ddata = QBConfig.DrugsPrice[currentOfferDrug.item]
|
||||
local randomPrice = math.random(ddata.min, ddata.max) * bagAmount
|
||||
if scamChance <= QBConfig.ScamChance then randomPrice = math.random(3, 10) * bagAmount end
|
||||
|
||||
SetEntityAsNoLongerNeeded(ped)
|
||||
ClearPedTasks(ped)
|
||||
|
||||
local coords = GetEntityCoords(PlayerPedId(), true)
|
||||
local pedCoords = GetEntityCoords(ped)
|
||||
local pedDist = #(coords - pedCoords)
|
||||
if getRobbed <= QBConfig.RobberyChance then
|
||||
TaskGoStraightToCoord(ped, coords, 15.0, -1, 0.0, 0.0)
|
||||
else
|
||||
TaskGoStraightToCoord(ped, coords, 1.2, -1, 0.0, 0.0)
|
||||
end
|
||||
|
||||
while pedDist > 1.5 do
|
||||
coords = GetEntityCoords(PlayerPedId(), true)
|
||||
pedCoords = GetEntityCoords(ped)
|
||||
if getRobbed <= QBConfig.RobberyChance then
|
||||
TaskGoStraightToCoord(ped, coords, 15.0, -1, 0.0, 0.0)
|
||||
else
|
||||
TaskGoStraightToCoord(ped, coords, 1.2, -1, 0.0, 0.0)
|
||||
end
|
||||
TaskGoStraightToCoord(ped, coords, 1.2, -1, 0.0, 0.0)
|
||||
pedDist = #(coords - pedCoords)
|
||||
Wait(100)
|
||||
end
|
||||
|
||||
TaskLookAtEntity(ped, PlayerPedId(), 5500.0, 2048, 3)
|
||||
TaskTurnPedToFaceEntity(ped, PlayerPedId(), 5500)
|
||||
TaskStartScenarioInPlace(ped, "WORLD_HUMAN_STAND_IMPATIENT_UPRIGHT", 0, false)
|
||||
|
||||
if hasTarget then
|
||||
while pedDist < 3.0 and not IsPedDeadOrDying(ped) do
|
||||
local coords2 = GetEntityCoords(PlayerPedId(), true)
|
||||
local pedCoords2 = GetEntityCoords(ped)
|
||||
local pedDist2 = #(coords2 - pedCoords2)
|
||||
if getRobbed <= QBConfig.RobberyChance then
|
||||
TriggerServerEvent('md-drugs:server:robCornerDrugs', drugType, bagAmount)
|
||||
QBCore.Functions.Notify("You Got Robbed " .. bagAmount .. " Bags of " .. currentOfferDrug.item.. "!")
|
||||
stealingPed = ped
|
||||
stealData = {
|
||||
item = availableDrugs[drugType].item,
|
||||
drugType = drugType,
|
||||
amount = bagAmount,
|
||||
}
|
||||
hasTarget = false
|
||||
local moveto = GetEntityCoords(PlayerPedId())
|
||||
local movetoCoords = {x = moveto.x + math.random(100, 500), y = moveto.y + math.random(100, 500), z = moveto.z, }
|
||||
ClearPedTasksImmediately(ped)
|
||||
TaskGoStraightToCoord(ped, movetoCoords.x, movetoCoords.y, movetoCoords.z, 15.0, -1, 0.0, 0.0)
|
||||
lastPed[#lastPed + 1] = ped
|
||||
RobberyPed()
|
||||
break
|
||||
else
|
||||
if pedDist2 < 1.5 and cornerselling then
|
||||
if Config.UseTarget and not zoneMade then
|
||||
zoneMade = true
|
||||
exports['qb-target']:AddTargetEntity(ped, {
|
||||
options = {
|
||||
{
|
||||
icon = 'fas fa-hand-holding-dollar',
|
||||
label = "Sell " ..bagAmount.. " of " .. currentOfferDrug.item.. " for " .. randomPrice .. " Dollars! ",
|
||||
action = function(entity)
|
||||
local playerPed = PlayerPedId()
|
||||
if IsPedInAnyVehicle(PlayerPedId(), false) then
|
||||
QBCore.Functions.Notify("youre in a car", 'error')
|
||||
hasTarget = false
|
||||
SetPedKeepTask(entity, false)
|
||||
SetEntityAsNoLongerNeeded(entity)
|
||||
ClearPedTasksImmediately(entity)
|
||||
lastPed[#lastPed + 1] = entity
|
||||
|
||||
return
|
||||
else
|
||||
QBCore.Functions.Progressbar("cornerSelling", "selling Drugs", '5000', false, false, {
|
||||
disableMovement = true,
|
||||
disableCarMovement = true,
|
||||
disableMouse = false,
|
||||
disableCombat = false,
|
||||
}, {}, {}, {}, function()
|
||||
TriggerServerEvent('md-drugs:server:sellCornerDrugs', drugType, bagAmount, randomPrice)
|
||||
hasTarget = false
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'point'})
|
||||
Wait(650)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
SetPedKeepTask(entity, false)
|
||||
SetEntityAsNoLongerNeeded(entity)
|
||||
ClearPedTasksImmediately(entity)
|
||||
lastPed[#lastPed + 1] = entity
|
||||
exports['qb-target']:RemoveZone('sellingPed')
|
||||
PoliceCallCornerselling()
|
||||
end)
|
||||
end
|
||||
end,
|
||||
canInteract = function()
|
||||
if IsEntityDead(ped) == false then return true end
|
||||
end
|
||||
},
|
||||
{
|
||||
icon = 'fas fa-x',
|
||||
label = 'Decline offer',
|
||||
action = function(entity)
|
||||
QBCore.Functions.Notify("Fuck that Offer", 'error')
|
||||
hasTarget = false
|
||||
SetPedKeepTask(entity, false)
|
||||
SetEntityAsNoLongerNeeded(entity)
|
||||
ClearPedTasksImmediately(entity)
|
||||
lastPed[#lastPed + 1] = entity
|
||||
exports['qb-target']:RemoveZone('sellingPed')
|
||||
end,
|
||||
},
|
||||
},
|
||||
distance = 1.5,
|
||||
})
|
||||
end
|
||||
else
|
||||
if Config.UseTarget then
|
||||
zoneMade = false
|
||||
exports['qb-target']:RemoveZone('sellingPed')
|
||||
|
||||
end
|
||||
hasTarget = false
|
||||
SetPedKeepTask(ped, false)
|
||||
SetEntityAsNoLongerNeeded(ped)
|
||||
ClearPedTasksImmediately(ped)
|
||||
lastPed[#lastPed + 1] = ped
|
||||
break
|
||||
end
|
||||
end
|
||||
Wait(0)
|
||||
end
|
||||
Wait(math.random(4000, 7000))
|
||||
end
|
||||
end
|
||||
|
||||
local function ToggleSelling()
|
||||
if not cornerselling then
|
||||
cornerselling = true
|
||||
LocalPlayer.state:set("inv_busy", true, true)
|
||||
QBCore.Functions.Notify("get that paper")
|
||||
local startLocation = GetEntityCoords(PlayerPedId())
|
||||
CreateThread(function()
|
||||
while cornerselling do
|
||||
local player = PlayerPedId()
|
||||
local coords = GetEntityCoords(player)
|
||||
if not hasTarget then
|
||||
local PlayerPeds = {}
|
||||
if next(PlayerPeds) == nil then
|
||||
for _, activePlayer in ipairs(GetActivePlayers()) do
|
||||
local ped = GetPlayerPed(activePlayer)
|
||||
PlayerPeds[#PlayerPeds + 1] = ped
|
||||
end
|
||||
end
|
||||
local closestPed, closestDistance = QBCore.Functions.GetClosestPed(coords, PlayerPeds)
|
||||
if closestDistance < 15.0 and closestPed ~= 0 and not IsPedInAnyVehicle(closestPed) and GetPedType(closestPed) ~= 28 then
|
||||
SellToPed(closestPed)
|
||||
end
|
||||
end
|
||||
local startDist = #(startLocation - coords)
|
||||
if startDist > 30 then
|
||||
TooFarAway()
|
||||
end
|
||||
Wait(0)
|
||||
end
|
||||
end)
|
||||
else
|
||||
stealingPed = nil
|
||||
stealData = {}
|
||||
cornerselling = false
|
||||
LocalPlayer.state:set("inv_busy", false, true)
|
||||
QBCore.Functions.Notify("lazy ass cant even sell drugs")
|
||||
end
|
||||
end
|
||||
|
||||
-- Events
|
||||
RegisterNetEvent('md-drugs:client:cornerselling', function()
|
||||
QBCore.Functions.TriggerCallback('md-drugs:server:cornerselling:getAvailableDrugs', function(result)
|
||||
if CurrentCops >= QBConfig.MinimumDrugSalePolice then
|
||||
if IsPedInAnyVehicle(PlayerPedId(), false) then
|
||||
QBCore.Functions.Notify("youre in a car", 'error')
|
||||
else
|
||||
if result then
|
||||
availableDrugs = result
|
||||
ToggleSelling()
|
||||
else
|
||||
QBCore.Functions.Notify("what you gonna sell fuckin air or something?", 'error')
|
||||
LocalPlayer.state:set("inv_busy", false, true)
|
||||
end
|
||||
end
|
||||
if not GetCops(QBConfig.MinimumDrugSalePolice) then return end
|
||||
if inZone then Notify(Lang.Cornerselling.no, 'error') return end
|
||||
local has = lib.callback.await('md-drugs:server:hasDrugs', false)
|
||||
if has then
|
||||
if sell then
|
||||
TriggerServerEvent('md-drugs:server:cornerselling:stop')
|
||||
Notify(Lang.Cornerselling.stop, 'error')
|
||||
sell = false
|
||||
active = false
|
||||
else
|
||||
QBCore.Functions.Notify("not enough pork", "error")
|
||||
sell = true
|
||||
Notify(Lang.Cornerselling.start, 'success')
|
||||
repeat
|
||||
Wait(1000)
|
||||
Cornersell()
|
||||
until not sell
|
||||
end
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent('police:SetCopCount', function(amount)
|
||||
CurrentCops = amount
|
||||
end)
|
||||
|
||||
RegisterNetEvent('md-drugs:client:refreshAvailableDrugs', function(items)
|
||||
availableDrugs = items
|
||||
if availableDrugs == nil or #availableDrugs <= 0 then
|
||||
QBCore.Functions.Notify("no Drugs", 'error')
|
||||
cornerselling = false
|
||||
LocalPlayer.state:set("inv_busy", false, true)
|
||||
else
|
||||
Notify(Lang.Cornerselling.nodrugs, 'error')
|
||||
end
|
||||
end)
|
||||
|
||||
CreateThread(function()
|
||||
for k, v in pairs (QBConfig.NoSellZones) do
|
||||
local box = lib.zones.box({ coords = v.loc, size = vec3(v.width, v.length, v.height), rotation = 180.0, debug = false,
|
||||
onEnter = function() inZone = true end, onExit = function() inZone = false end})
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterNetEvent('md-drugs:client:cornerselling:remove', function(ped)
|
||||
DeletePed(ped)
|
||||
end)
|
||||
@@ -1,40 +1,12 @@
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
|
||||
RegisterNetEvent("md-drugs:client:makecrackone")
|
||||
AddEventHandler("md-drugs:client:makecrackone", function()
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
QBCore.Functions.Progressbar("drink_something", "Cooking Crack", 1000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:makecrackone")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
TriggerServerEvent("md-drugs:server:failcrackone")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 3, 8) -- NumberOfCircles,
|
||||
end)
|
||||
end)
|
||||
|
||||
|
||||
RegisterNetEvent("md-drugs:client:bagcrack")
|
||||
AddEventHandler("md-drugs:client:bagcrack", function()
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
QBCore.Functions.Progressbar("drink_something", "bagging some good good", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
TriggerServerEvent("md-drugs:server:bagcrack")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
RegisterNetEvent("md-drugs:client:makecrackone", function(data)
|
||||
if not ItemCheck('bakingsoda') then return end
|
||||
if not minigame() then TriggerServerEvent("md-drugs:server:failcrackone", data.data) return end
|
||||
if not progressbar(Lang.Crack.cookcrack, 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:makecrackone", data.data)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:bagcrack", function(data)
|
||||
if not ItemCheck('empty_weed_bag') then return end
|
||||
if not progressbar(Lang.Crack.bagcrack, 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:bagcrack", data.data)
|
||||
end)
|
||||
@@ -1,372 +1,64 @@
|
||||
QBCore = exports['qb-core']:GetCoreObject()
|
||||
local currentDealer = nil
|
||||
local dealerIsHome = false
|
||||
local waitingDelivery = nil
|
||||
local activeDelivery = nil
|
||||
local deliveryTimeout = 0
|
||||
local waitingKeyPress = false
|
||||
local dealerCombo = nil
|
||||
local drugDeliveryZone
|
||||
local isActive = false
|
||||
local dealer = {}
|
||||
|
||||
-- Handlers
|
||||
|
||||
AddStateBagChangeHandler('isLoggedIn', nil, function(_, _, value)
|
||||
if value then
|
||||
QBCore.Functions.TriggerCallback('md-drugs:server:RequestConfig', function(DealerConfig)
|
||||
QBConfig.Dealers = DealerConfig
|
||||
end)
|
||||
Wait(1000)
|
||||
InitZones()
|
||||
else
|
||||
if not Config.UseTarget and dealerCombo then dealerCombo:destroy() end
|
||||
end
|
||||
end)
|
||||
|
||||
-- Functions
|
||||
|
||||
local function GetClosestDealer()
|
||||
local ped = PlayerPedId()
|
||||
local pCoords = GetEntityCoords(ped)
|
||||
for k, v in pairs(QBConfig.Dealers) do
|
||||
local dealerCoords = vector3(v.coords.x, v.coords.y, v.coords.z)
|
||||
if #(pCoords - dealerCoords) < 2.0 then
|
||||
currentDealer = k
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
RegisterNetEvent('md-drugs:client:opendealermenu', function()
|
||||
local dealermenu = {}
|
||||
if Config.StupidassNewQbItemName then
|
||||
for k, v in pairs (QBConfig.ProductsStupidNameRewrite) do
|
||||
if QBCore.Functions.GetPlayerData().metadata["dealerrep"] >= v.minrep then
|
||||
dealermenu[#dealermenu + 1] = {
|
||||
icon = "nui://"..Config.imagelink..QBCore.Shared.Items[v.name].image,
|
||||
title = v.label,
|
||||
event = "md-drugs:client:travellingmerchantox",
|
||||
args = {
|
||||
item = v.name,
|
||||
cost = v.price,
|
||||
info = v.info,
|
||||
amount = v.amount,
|
||||
}
|
||||
}
|
||||
|
||||
lib.registerContext({id = 'dealermenu',title = "Dealer Menu", options = dealermenu})
|
||||
end
|
||||
end
|
||||
else
|
||||
for k, v in pairs (QBConfig.Products) do
|
||||
if QBCore.Functions.GetPlayerData().metadata["dealerrep"] >= v.minrep then
|
||||
dealermenu[#dealermenu + 1] = {
|
||||
icon = "nui://"..Config.imagelink..QBCore.Shared.Items[v.name].image,
|
||||
title = v.label,
|
||||
event = "md-drugs:client:travellingmerchantox",
|
||||
args = {
|
||||
item = v.name,
|
||||
cost = v.price,
|
||||
info = v.info,
|
||||
amount = v.amount,
|
||||
}
|
||||
}
|
||||
|
||||
lib.registerContext({id = 'dealermenu',title = "Dealer Menu", options = dealermenu})
|
||||
end
|
||||
end
|
||||
end
|
||||
local rep = GetRep()
|
||||
makeMenu('dealermenu', rep)
|
||||
lib.showContext('dealermenu')
|
||||
end)
|
||||
local function RandomDeliveryItemOnRep()
|
||||
local myRep = QBCore.Functions.GetPlayerData().metadata["dealerrep"]
|
||||
local availableItems = {}
|
||||
for k, _ in pairs(QBConfig.DeliveryItems) do
|
||||
if QBConfig.DeliveryItems[k]["minrep"] <= myRep then
|
||||
availableItems[#availableItems+1] = k
|
||||
end
|
||||
end
|
||||
return availableItems[math.random(1, #availableItems)]
|
||||
end
|
||||
|
||||
local function RequestDelivery()
|
||||
if not waitingDelivery then
|
||||
GetClosestDealer()
|
||||
|
||||
local amount = math.random(1, 3)
|
||||
local item = RandomDeliveryItemOnRep()
|
||||
|
||||
QBCore.Functions.Notify("Currently searching for a delivery...", 'success')
|
||||
if Config.NearbyDeliveries == true then
|
||||
local playerPed = PlayerPedId()
|
||||
local playerCoords = GetEntityCoords(playerPed)
|
||||
local nearbyLocations = {}
|
||||
-- Filter out the nearby locations
|
||||
for _, location in ipairs(Config.DeliveryLocations) do
|
||||
local distance = #(playerCoords - location.coords)
|
||||
if distance <= Config.DeliveryWithin then
|
||||
nearbyLocations[#nearbyLocations + 1] = location
|
||||
end
|
||||
end
|
||||
|
||||
-- Select a random location from the nearby locations
|
||||
if #nearbyLocations > 0 then
|
||||
local selectedLocation = nearbyLocations[math.random(1, #nearbyLocations)]
|
||||
waitingDelivery = {
|
||||
["coords"] = selectedLocation.coords,
|
||||
["locationLabel"] = selectedLocation.label,
|
||||
["amount"] = amount,
|
||||
["dealer"] = currentDealer,
|
||||
["itemData"] = Config.DeliveryItems[item],
|
||||
["item"] = item
|
||||
}
|
||||
else
|
||||
QBCore.Functions.Notify("Nothing Close By", 'error')
|
||||
|
||||
end
|
||||
else
|
||||
local location = math.random(1, #QBConfig.DeliveryLocations)
|
||||
|
||||
waitingDelivery = {
|
||||
["coords"] = QBConfig.DeliveryLocations[location]["coords"],
|
||||
["locationLabel"] = QBConfig.DeliveryLocations[location]["label"],
|
||||
["amount"] = amount,
|
||||
["dealer"] = currentDealer,
|
||||
["itemData"] = QBConfig.DeliveryItems[item],
|
||||
["item"] = item
|
||||
}
|
||||
if QBConfig.Debug == true then
|
||||
print(QBConfig.DeliveryLocations[location]["coords"])
|
||||
print(QBConfig.DeliveryLocations[location]["label"])
|
||||
end
|
||||
end
|
||||
|
||||
TriggerServerEvent('md-drugs:server:giveDeliveryItems', waitingDelivery)
|
||||
SetTimeout(2000, function()
|
||||
TriggerServerEvent('qb-phone:server:sendNewMail', {
|
||||
sender = QBConfig.Dealers[currentDealer]["name"],
|
||||
subject = "Delivery Location",
|
||||
message = "Deliver This For Me",
|
||||
button = {
|
||||
enabled = true,
|
||||
buttonEvent = "md-drugs:client:setLocation",
|
||||
buttonData = waitingDelivery
|
||||
}
|
||||
})
|
||||
end)
|
||||
else
|
||||
QBCore.Functions.Notify("You Havent Even Finished The One I Told You Too", 'error')
|
||||
end
|
||||
end
|
||||
|
||||
local function DeliveryTimer()
|
||||
CreateThread(function()
|
||||
while deliveryTimeout - 1 > 0 do
|
||||
deliveryTimeout = deliveryTimeout - 1
|
||||
Wait(1000)
|
||||
end
|
||||
deliveryTimeout = 0
|
||||
end)
|
||||
end
|
||||
|
||||
|
||||
local function PoliceCallDeliveries()
|
||||
print " Tell your devs they didnt do something and to read the readme it isnt hard"
|
||||
end
|
||||
|
||||
local function DeliverStuff()
|
||||
if deliveryTimeout > 0 then
|
||||
Wait(500)
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
PoliceCallDeliveries()
|
||||
QBCore.Functions.Progressbar("work_dropbox", "handing Off Package", 3500, false, true, {
|
||||
disableMovement = true,
|
||||
disableCarMovement = true,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
}, {}, {}, {}, function() -- Done
|
||||
TriggerServerEvent('md-drugs:server:successDelivery', activeDelivery, true)
|
||||
activeDelivery = nil
|
||||
exports['qb-target']:RemoveZone('drugDeliveryZone')
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
else
|
||||
TriggerServerEvent('md-drugs:server:successDelivery', activeDelivery, false)
|
||||
end
|
||||
deliveryTimeout = 0
|
||||
end
|
||||
|
||||
local function SetMapBlip(x, y)
|
||||
SetNewWaypoint(x, y)
|
||||
QBCore.Functions.Notify("Marked On Your Map", 'success');
|
||||
end
|
||||
|
||||
-- PolyZone specific functions
|
||||
|
||||
|
||||
function InitZones()
|
||||
if next(QBConfig.Dealers) == nil then return end
|
||||
|
||||
for k,v in pairs(QBConfig.Dealers) do
|
||||
local function SpawnDealer()
|
||||
local getDealers = lib.callback.await('md-drugs:server:getDealers', false)
|
||||
for k,v in pairs(getDealers) do
|
||||
local Ped = "g_m_y_famdnf_01"
|
||||
RequestModel(Ped)
|
||||
while not HasModelLoaded(Ped) do
|
||||
Wait(0)
|
||||
end
|
||||
|
||||
testdealer = CreatePed(0, Ped,v.coords.x,v.coords.y,v.coords.z-1, 90.0, false, false)
|
||||
FreezeEntityPosition(testdealer, true)
|
||||
SetEntityInvincible(testdealer, true)
|
||||
exports["qb-target"]:AddBoxZone("dealer_"..k, vector3(v.coords.x, v.coords.y, v.coords.z), 1.5, 1.5, {
|
||||
name = "dealer_"..k,
|
||||
heading = v.heading,
|
||||
minZ = v.coords.z - 1,
|
||||
maxZ = v.coords.z + 1,
|
||||
debugPoly = false,
|
||||
}, {
|
||||
options = {
|
||||
{
|
||||
icon = 'fas fa-user-secret',
|
||||
label = "Deliver",
|
||||
action = function()
|
||||
RequestDelivery()
|
||||
end,
|
||||
canInteract = function()
|
||||
GetClosestDealer()
|
||||
local hours = GetClockHours()
|
||||
local min = QBConfig.Dealers[currentDealer]["time"]["min"]
|
||||
local max = QBConfig.Dealers[currentDealer]["time"]["max"]
|
||||
if max < min then
|
||||
if hours <= max then
|
||||
if not waitingDelivery then
|
||||
return true
|
||||
end
|
||||
elseif hours >= min then
|
||||
if not waitingDelivery then
|
||||
return true
|
||||
end
|
||||
end
|
||||
else
|
||||
if hours >= min and hours <= max then
|
||||
if not waitingDelivery then
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
},
|
||||
{
|
||||
icon = 'fas fa-user-secret',
|
||||
label = "Open Shop",
|
||||
action = function()
|
||||
TriggerEvent('md-drugs:client:opendealermenu')
|
||||
end,
|
||||
canInteract = function()
|
||||
GetClosestDealer()
|
||||
local hours = GetClockHours()
|
||||
local min = QBConfig.Dealers[currentDealer]["time"]["min"]
|
||||
local max = QBConfig.Dealers[currentDealer]["time"]["max"]
|
||||
if max < min then
|
||||
if hours <= max then
|
||||
return true
|
||||
elseif hours >= min then
|
||||
return true
|
||||
end
|
||||
else
|
||||
if hours >= min and hours <= max then
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
}
|
||||
},
|
||||
distance = 1.5
|
||||
})
|
||||
end
|
||||
|
||||
lib.requestModel(Ped, Config.RequestModelTime)
|
||||
local loc = json.decode(v.coords)
|
||||
dealer[k] = CreatePed(0, Ped,loc.x,loc.y, loc.z-1, loc.h, false, false)
|
||||
Freeze(dealer[k], true, loc.h)
|
||||
AddMultiModel(dealer[k], {
|
||||
{ icon = 'fas fa-user-secret', label = string.format(Lang.targets.Delivery.Deliver, v.name),
|
||||
action = function()
|
||||
local bool, item, amount, coords = lib.callback.await('md-drugs:server:GetDeliveryItem', false, k)
|
||||
if bool then
|
||||
Email(Lang.Delivery.emailn, Lang.Delivery.emailsub, string.format(Lang.Delivery.emailcon, amount, GetLabel(item)))
|
||||
TriggerEvent('md-drugs:client:setLocation', {bool = bool, item = item, amount = amount, coords = coords})
|
||||
end
|
||||
end,
|
||||
},
|
||||
{ icon = "fa-solid fa-store", label = string.format(Lang.targets.Delivery.open, v.name),
|
||||
action = function() TriggerEvent('md-drugs:client:opendealermenu') end,
|
||||
}}, dealer[k])
|
||||
end
|
||||
end
|
||||
|
||||
-- Events
|
||||
|
||||
RegisterNetEvent('md-drugs:client:RefreshDealers', function(DealerData)
|
||||
if not Config.UseTarget and dealerCombo then dealerCombo:destroy() end
|
||||
QBConfig.Dealers = DealerData
|
||||
Wait(1000)
|
||||
InitZones()
|
||||
RegisterNetEvent('md-drugs:client:RefreshDealers', function()
|
||||
SpawnDealer()
|
||||
end)
|
||||
|
||||
RegisterNetEvent('md-drugs:client:updateDealerItems', function(itemData, amount)
|
||||
TriggerServerEvent('md-drugs:server:updateDealerItems', itemData, amount, currentDealer)
|
||||
CreateThread(function()
|
||||
SpawnDealer()
|
||||
end)
|
||||
|
||||
RegisterNetEvent('md-drugs:client:setDealerItems', function(itemData, amount, dealer)
|
||||
QBConfig.Dealers[dealer]["products"][itemData.slot].amount = QBConfig.Dealers[dealer]["products"][itemData.slot].amount - amount
|
||||
end)
|
||||
|
||||
RegisterNetEvent('md-drugs:client:setLocation', function(locationData)
|
||||
if activeDelivery then
|
||||
SetMapBlip(activeDelivery["coords"]["x"], activeDelivery["coords"]["y"])
|
||||
QBCore.Functions.Notify("Already Delivering", 'error')
|
||||
return
|
||||
end
|
||||
activeDelivery = locationData
|
||||
deliveryTimeout = 300
|
||||
DeliveryTimer()
|
||||
SetMapBlip(activeDelivery["coords"].x, activeDelivery["coords"].y)
|
||||
local Ped = "g_m_y_famdnf_01"
|
||||
RequestModel(Ped)
|
||||
while not HasModelLoaded(Ped) do
|
||||
Wait(0)
|
||||
end
|
||||
|
||||
Buyer = CreatePed(0, Ped,activeDelivery["coords"].x, activeDelivery["coords"].y, activeDelivery["coords"].z-1, 180.0, false, false)
|
||||
FreezeEntityPosition(Buyer, true)
|
||||
SetEntityInvincible(Buyer, true)
|
||||
if Config.UseTarget then
|
||||
exports['qb-target']:AddTargetEntity(Buyer, {
|
||||
options = {
|
||||
{
|
||||
icon = 'fas fa-user-secret',
|
||||
label = "Hand Off",
|
||||
action = function()
|
||||
DeliverStuff()
|
||||
Wait(4000)
|
||||
DeleteEntity(Buyer)
|
||||
waitingDelivery = nil
|
||||
end,
|
||||
canInteract = function()
|
||||
if waitingDelivery then
|
||||
return true
|
||||
end
|
||||
end
|
||||
}
|
||||
},
|
||||
distance = 1.5
|
||||
})
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterNetEvent('md-drugs:client:sendDeliveryMail', function(type, deliveryData)
|
||||
if type == 'perfect' then
|
||||
TriggerServerEvent('qb-phone:server:sendNewMail', {
|
||||
sender = QBConfig.Dealers[deliveryData["dealer"]]["name"],
|
||||
subject = "Delivery",
|
||||
message = "You did it"
|
||||
})
|
||||
elseif type == 'bad' then
|
||||
TriggerServerEvent('qb-phone:server:sendNewMail', {
|
||||
sender = QBConfig.Dealers[deliveryData["dealer"]]["name"],
|
||||
subject = "Delivery",
|
||||
message = "You Fucked Me Over"
|
||||
})
|
||||
elseif type == 'late' then
|
||||
TriggerServerEvent('qb-phone:server:sendNewMail', {
|
||||
sender = QBConfig.Dealers[deliveryData["dealer"]]["name"],
|
||||
subject = "Delivery",
|
||||
message = "Better Late Than Dead"
|
||||
})
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterCommand('checkrep', function()
|
||||
local drugrep = QBCore.Functions.GetPlayerData().metadata["dealerrep"]
|
||||
QBCore.Functions.Notify("Current Rep: "..drugrep)
|
||||
RegisterNetEvent('md-drugs:client:setLocation', function(data)
|
||||
local coord = json.decode(data.coords)
|
||||
SetNewWaypoint(coord.x, coord.y)
|
||||
if isActive then return end
|
||||
isActive = true
|
||||
local Buyer = CreatePed(0, "g_m_y_famdnf_01",coord.x, coord.y, coord.z-1, coord.w, false, false)
|
||||
Freeze(Buyer, true, coord.w)
|
||||
AddSingleModel(Buyer, {
|
||||
icon = 'fas fa-user-secret',
|
||||
label = Lang.targets.Delivery.hand,
|
||||
action = function()
|
||||
if not progressbar(Lang.Delivery.pack, 4000, 'uncuff') then return end
|
||||
isActive = false
|
||||
DeletePed(Buyer)
|
||||
TriggerServerEvent('md-drugs:server:giveDeliveryItems', data.item, data.amount)
|
||||
end,
|
||||
canInteract = function()
|
||||
if isActive then
|
||||
return true
|
||||
end
|
||||
end
|
||||
}, nil)
|
||||
end)
|
||||
@@ -0,0 +1,678 @@
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
|
||||
local progressbartype = Config.progressbartype
|
||||
local minigametype = Config.minigametype
|
||||
local notifytype = Config.Notify
|
||||
local dispatch = Config.Dispatch
|
||||
|
||||
function getJobType()
|
||||
return QBCore.Functions.GetPlayerData().job.type
|
||||
end
|
||||
|
||||
function getJobName()
|
||||
return QBCore.Functions.GetPlayerData().job.name
|
||||
end
|
||||
|
||||
function progressbar(text, time, anim)
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {anim})
|
||||
if progressbartype == 'oxbar' then
|
||||
if lib.progressBar({ duration = time, label = text, useWhileDead = false, canCancel = true, disable = { car = true, move = true},}) then
|
||||
if GetResourceState('scully_emotemenu') == 'started' then
|
||||
exports.scully_emotemenu:cancelEmote()
|
||||
else
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {"c"})
|
||||
end
|
||||
return true
|
||||
end
|
||||
elseif progressbartype == 'oxcir' then
|
||||
if lib.progressCircle({ duration = time, label = text, useWhileDead = false, canCancel = true, position = 'bottom', disable = { car = true,move = true},}) then
|
||||
if GetResourceState('scully_emotemenu') == 'started' then
|
||||
exports.scully_emotemenu:cancelEmote()
|
||||
else
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {"c"})
|
||||
end
|
||||
return true
|
||||
end
|
||||
elseif progressbartype == 'qb' then
|
||||
local test = false
|
||||
local cancelled = false
|
||||
QBCore.Functions.Progressbar("drink_something", text, time, false, true, { disableMovement = true, disableCarMovement = true, disableMouse = false, disableCombat = true, disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
test = true
|
||||
if GetResourceState('scully_emotemenu') == 'started' then
|
||||
exports.scully_emotemenu:cancelEmote()
|
||||
else
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {"c"})
|
||||
end
|
||||
end, function()
|
||||
cancelled = true
|
||||
if GetResourceState('scully_emotemenu') == 'started' then
|
||||
exports.scully_emotemenu:cancelEmote()
|
||||
else
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {"c"})
|
||||
end
|
||||
end)
|
||||
repeat
|
||||
Wait(100)
|
||||
until cancelled or test
|
||||
if test then return true end
|
||||
else
|
||||
print"^1 SCRIPT ERROR: Md-DRUGS set your progressbar with one of the options!"
|
||||
end
|
||||
end
|
||||
|
||||
function loadParticle(dict)
|
||||
if not HasNamedPtfxAssetLoaded(dict) then
|
||||
RequestNamedPtfxAsset(dict)
|
||||
end
|
||||
while not HasNamedPtfxAssetLoaded(dict) do
|
||||
Wait(0)
|
||||
end
|
||||
SetPtfxAssetNextCall(dict)
|
||||
end
|
||||
|
||||
function LoadModel(hash)
|
||||
RequestModel(hash)
|
||||
while not HasModelLoaded(hash) do
|
||||
Wait(0)
|
||||
end
|
||||
end
|
||||
|
||||
function minigame()
|
||||
local time = 0
|
||||
local game = Config.Minigames
|
||||
if minigametype == 'ps_circle' then
|
||||
local check
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
check = success
|
||||
end, game['ps_circle'].amount, game['ps_circle'].speed)
|
||||
return check
|
||||
elseif minigametype == 'ps_maze' then
|
||||
local check
|
||||
exports['ps-ui']:Maze(function(success)
|
||||
check = success
|
||||
end, game['ps_maze'].timelimit)
|
||||
repeat Wait(10) until check ~= nil
|
||||
return check
|
||||
elseif minigametype == 'ps_scrambler' then
|
||||
local check
|
||||
exports['ps-ui']:Scrambler(function(success)
|
||||
check = success
|
||||
end, game['ps_scrambler'].type, game['ps_scrambler'].time, game['ps_scrambler'].mirrored)
|
||||
repeat Wait(10) until check ~= nil
|
||||
return check
|
||||
elseif minigametype == 'ps_var' then
|
||||
local check
|
||||
exports['ps-ui']:VarHack(function(success)
|
||||
check = success
|
||||
end, game['ps_var'].numBlocks, game['ps_var'].time)
|
||||
repeat Wait(10) until check ~= nil
|
||||
return check
|
||||
elseif minigametype == 'ps_thermite' then
|
||||
local check
|
||||
exports['ps-ui']:Thermite(function(success)
|
||||
check = success
|
||||
end, game['ps_thermite'].time, game['ps_thermite'].gridsize, game['ps_thermite'].incorrect)
|
||||
repeat Wait(10) until check ~= nil
|
||||
return check
|
||||
elseif minigametype == 'ox' then
|
||||
local success = lib.skillCheck(game['ox'], {'1', '2', '3', '4'})
|
||||
return success
|
||||
elseif minigametype == 'blcirprog' then
|
||||
local success = exports.bl_ui:CircleProgress(game['blcirprog'].amount, game['blcirprog'].speed)
|
||||
return success
|
||||
elseif minigametype == 'blprog' then
|
||||
local success = exports.bl_ui:Progress(game['blprog'].amount, game['blprog'].speed)
|
||||
return success
|
||||
elseif minigametype == 'blkeyspam' then
|
||||
local success = exports.bl_ui:KeySpam(game['blkeyspam'].amount, game['blprog'].difficulty)
|
||||
return success
|
||||
elseif minigametype == 'blkeycircle' then
|
||||
local success = exports.bl_ui:KeyCircle(game['blkeycircle'].amount, game['blkeycircle'].difficulty, game['blkeycircle'].keynumbers)
|
||||
return success
|
||||
elseif minigametype == 'blnumberslide' then
|
||||
local success = exports.bl_ui:NumberSlide(game['blnumberslide'].amount, game['blnumberslide'].difficulty, game['blnumberslide'].keynumbers)
|
||||
return success
|
||||
elseif minigametype == 'blrapidlines' then
|
||||
local success = exports.bl_ui:RapidLines(game['blrapidlines'].amount, game['blrapidlines'].difficulty, game['blrapidlines'].numberofline)
|
||||
return success
|
||||
elseif minigametype == 'blcircleshake' then
|
||||
local success = exports.bl_ui:CircleShake(game['blcircleshake'].amount, game['blcircleshake'].difficulty, game['blcircleshake'].stages)
|
||||
return success
|
||||
elseif minigametype == 'glpath' then
|
||||
local settings = {gridSize = game['glpath'].gridSize, lives = game['glpath'].lives, timeLimit = game['glpath'].timelimit}
|
||||
local successes = false
|
||||
exports["glow_minigames"]:StartMinigame(function(success)
|
||||
if success then successes = true else successes = false end
|
||||
end, "path", settings)
|
||||
repeat
|
||||
Wait(1000)
|
||||
time = time + 1
|
||||
until successes or time == 100
|
||||
if successes then return true end
|
||||
elseif minigametype == 'glspot' then
|
||||
local settings = {gridSize = game['glspot'].gridSize, timeLimit = game['glspot'].gridSize, charSet = game['glspot'].charSet, required = game['glspot'].required}
|
||||
local successes = false
|
||||
exports["glow_minigames"]:StartMinigame(function(success)
|
||||
if success then successes = true else successes = false end
|
||||
end, "spot", settings)
|
||||
repeat
|
||||
Wait(1000)
|
||||
time = time + 1
|
||||
until successes or time == 100
|
||||
elseif minigametype == 'glmath' then
|
||||
local settings = {timeLimit = game['glmath'].timeLimit}
|
||||
local successes = false
|
||||
exports["glow_minigames"]:StartMinigame(function(success)
|
||||
if success then successes = true else successes = false end
|
||||
end, "math", settings)
|
||||
repeat
|
||||
Wait(1000)
|
||||
time = time + 1
|
||||
until successes or time == 100
|
||||
elseif minigametype == 'none' then
|
||||
return true
|
||||
else
|
||||
print"^1 SCRIPT ERROR: Md-Drugs set your minigame with one of the options!"
|
||||
end
|
||||
end
|
||||
|
||||
function Notify(text, type)
|
||||
if notifytype =='ox' then
|
||||
lib.notify({title = text, type = type})
|
||||
elseif notifytype == 'qb' then
|
||||
QBCore.Functions.Notify(text, type)
|
||||
elseif notifytype == 'okok' then
|
||||
exports['okokNotify']:Alert('', text, 4000, type, false)
|
||||
else
|
||||
print"^1 SCRIPT ERROR: Md-DRUGS set your notification with one of the options!"
|
||||
end
|
||||
end
|
||||
|
||||
function GetImage(img)
|
||||
if GetResourceState('ox_inventory') == 'started' then
|
||||
local Items = exports['ox_inventory']:Items()
|
||||
if not Items[img] then print(' You Are Missing: ' .. img .. ' From Your ox items.lua') return end
|
||||
local itemClient = Items[img] and Items[img]['client']
|
||||
if itemClient and itemClient['image'] then
|
||||
return itemClient['image']
|
||||
else
|
||||
return "nui://ox_inventory/web/images/" .. img .. '.png'
|
||||
end
|
||||
end
|
||||
local invs = {
|
||||
['ps-inventory'] = "nui://ps-inventory/html/images/",
|
||||
['lj-inventory'] = "nui://lj-inventory/html/images/",
|
||||
['qb-inventory'] = "nui://qb-inventory/html/images/",
|
||||
['qs-inventory'] = "nui://qs-inventory/html/imgages/",
|
||||
['origen_inventory'] = "nui://origen_inventory/html/img/",
|
||||
['core_inventory'] = "nui://core_inventory/html/img/"
|
||||
}
|
||||
for k, v in pairs(invs) do
|
||||
if not QBCore.Shared.Items[img] then print(' You Are Missing: ' .. img .. ' From Your QB items.lua') return end
|
||||
if GetResourceState(k) == 'started' then
|
||||
return v .. QBCore.Shared.Items[img].image
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function GetLabel(label)
|
||||
if GetResourceState('ox_inventory') == 'started' then
|
||||
local Items = exports['ox_inventory']:Items()
|
||||
if not Items[label] then print(' You Are Missing: ' .. label .. ' From Your ox items.lua') return end
|
||||
return Items[label]['label']
|
||||
else
|
||||
if QBCore.Shared.Items[label] == nil then print("There Is No " .. label .. " In Your QB Items.lua") return end
|
||||
return QBCore.Shared.Items[label]['label']
|
||||
end
|
||||
end
|
||||
|
||||
function GetRep()
|
||||
local rep = lib.callback.await('md-drugs:server:GetRep', false)
|
||||
return rep
|
||||
end
|
||||
|
||||
|
||||
function sorter(sorting, value)
|
||||
table.sort(sorting, function(a, b) return a[value] < b[value] end)
|
||||
end
|
||||
|
||||
function makeMenu(name, rep)
|
||||
local menu = {}
|
||||
local data = lib.callback.await('md-drugs:server:menu', false, name)
|
||||
for k, v in pairs (data.table) do
|
||||
local allow = false
|
||||
if rep == nil then
|
||||
allow = true
|
||||
else
|
||||
if rep.dealerrep >= v.minrep then allow = true end
|
||||
end
|
||||
if allow then
|
||||
menu[#menu + 1] = {
|
||||
icon = GetImage(v.name),
|
||||
description = '$'.. v.price,
|
||||
title = GetLabel(v.name),
|
||||
onSelect = function()
|
||||
local settext = "Cost: $"..v.price
|
||||
local dialog = exports.ox_lib:inputDialog(v.name .."!", {
|
||||
{ type = 'select', label = "Payment Type", default = "cash", options = { { value = "cash"}, { value = "bank"},}},
|
||||
{ type = 'number', label = "Amount to buy", description = settext, min = 0, max = v.amount, default = 1 },
|
||||
})
|
||||
if not dialog[1] then return end
|
||||
TriggerServerEvent("md-drugs:server:purchaseGoods", dialog[2], dialog[1], v.name, v.price, data.table, k)
|
||||
end,
|
||||
}
|
||||
end
|
||||
end
|
||||
sorter(menu, 'title')
|
||||
lib.registerContext({id = data.id, title = data.title, options = menu})
|
||||
end
|
||||
|
||||
|
||||
function ItemCheck(item)
|
||||
if GetResourceState('ox_inventory') == 'started' then
|
||||
if exports.ox_inventory:GetItemCount(item) >= 1 then return true else Notify('You Need ' .. GetLabel(item) .. " !", 'error') return false end
|
||||
else
|
||||
if QBCore.Shared.Items[item] == nil then print("There Is No " .. item .. " In Your QB Items.lua") return end
|
||||
if QBCore.Functions.HasItem(item) then return true else Notify('You Need ' .. QBCore.Shared.Items[item].label .. " !", 'error') return false end
|
||||
end
|
||||
end
|
||||
|
||||
function hasItem(item)
|
||||
if GetResourceState('ox_inventory') == 'started' then
|
||||
if exports.ox_inventory:GetItemCount(item) >= 1 then return true else return false end
|
||||
else
|
||||
if QBCore.Shared.Items[item] == nil then print("There Is No " .. item .. " In Your QB Items.lua") return end
|
||||
if QBCore.Functions.HasItem(item) then return true else return false end
|
||||
end
|
||||
end
|
||||
|
||||
function ItemCheckMulti(item)
|
||||
local need = 0
|
||||
local has = 0
|
||||
for k,v in pairs (item) do
|
||||
need = need + 1
|
||||
if GetResourceState('ox_inventory') == 'started' then
|
||||
if exports.ox_inventory:GetItemCount(v) >= 1 then has = has + 1 else Notify('You Need ' .. GetLabel(v) .. " !", 'error') end
|
||||
else
|
||||
if QBCore.Shared.Items[v] == nil then print("There Is No " .. item .. " In Your QB Items.lua") return end
|
||||
if QBCore.Functions.HasItem(v) then has = has + 1 else Notify('You Need ' .. QBCore.Shared.Items[v].label .. " !", 'error') end
|
||||
end
|
||||
end
|
||||
if need == has then
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
function Email(sender, subject, message)
|
||||
if Config.Phone == 'yflip' then
|
||||
local receiver = GetPlayerServerId(PlayerId())
|
||||
local insertId, received = exports["yflip-phone"]:SendMail({
|
||||
title = subject,
|
||||
sender = sender,
|
||||
senderDisplayName = sender,
|
||||
content = message,
|
||||
}, 'phoneNumber', receiver)
|
||||
elseif Config.Phone == 'qs' then
|
||||
TriggerServerEvent('qs-smartphone:server:sendNewMail', {
|
||||
sender = sender,
|
||||
subject = subject,
|
||||
message = message,
|
||||
button = {}
|
||||
})
|
||||
else
|
||||
TriggerServerEvent('qb-phone:server:sendNewMail', {
|
||||
sender = sender,
|
||||
subject = subject,
|
||||
message = message,
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
function PoliceCall(chance)
|
||||
local math = math.random(1,100)
|
||||
if math <= chance then
|
||||
if dispatch == 'ps' then
|
||||
exports['ps-dispatch']:DrugSale()
|
||||
elseif dispatch == 'cd' then
|
||||
local data = exports['cd_dispatch']:GetPlayerInfo()
|
||||
TriggerServerEvent('cd_dispatch:AddNotification', {
|
||||
job_table = {'police', },
|
||||
coords = data.coords,
|
||||
title = '420-69 Drug Sale',
|
||||
message = 'A '..data.sex..' robbing a store at '..data.street,
|
||||
flash = 0,
|
||||
unique_id = data.unique_id,
|
||||
sound = 1,
|
||||
blip = { sprite = 431, scale = 1.2, colour = 3, flashes = false, text = '420-69 Drug Sale', time = 5, radius = 0,}
|
||||
})
|
||||
elseif dispatch == 'core' then
|
||||
exports['core_dispatch']:addCall("420-69", "Drugs Are Being Sold", {
|
||||
{icon="fa-ruler", info="4.5 MILES"},
|
||||
}, {GetEntityCoords(PlayerPedId())}, "police", 3000, 11, 5 )
|
||||
elseif dispatch == 'aty' then
|
||||
exports["aty_dispatch"]:SendDispatch('Drug Sale', '420-69', 40, {'police'})
|
||||
elseif dispatch == 'qs' then
|
||||
exports['qs-dispatch']:DrugSale()
|
||||
elseif dispatch == 'codem' then
|
||||
local Data = {
|
||||
type = 'Drug Sale',
|
||||
header = 'Someone Selling Drugs',
|
||||
text = 'Hurry up and save the community',
|
||||
code = '420-69',
|
||||
}
|
||||
exports['codem-dispatch']:CustomDispatch(Data)
|
||||
else
|
||||
print('Congrats, You Choose 0 of the options :)')
|
||||
end
|
||||
else
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
function GetCops(number)
|
||||
if number == 0 then return true end
|
||||
local amount = lib.callback.await('md-drugs:server:GetCoppers', false)
|
||||
if amount >= number then return true else Notify('You Need '.. number - amount .. ' More Cops To Do This', 'error') end
|
||||
end
|
||||
|
||||
|
||||
function Freeze(entity, toggle, head)
|
||||
SetEntityInvincible(entity, toggle)
|
||||
SetEntityAsMissionEntity(entity, toggle, toggle)
|
||||
FreezeEntityPosition(entity, toggle)
|
||||
SetEntityHeading(entity, head)
|
||||
SetBlockingOfNonTemporaryEvents(entity, toggle)
|
||||
end
|
||||
|
||||
function tele(coords)
|
||||
DoScreenFadeOut(500)
|
||||
Wait(1000)
|
||||
SetEntityCoords(PlayerPedId(),coords.x, coords.y, coords.z)
|
||||
Wait(1000)
|
||||
DoScreenFadeIn(500)
|
||||
end
|
||||
|
||||
|
||||
function AddBoxZoneSingle(name, loc, data)
|
||||
if Config.Target == 'qb' then
|
||||
exports['qb-target']:AddBoxZone(name, loc, 1.5, 1.75, {name = name, minZ = loc.z-1,maxZ = loc.z +1},
|
||||
{ options = {
|
||||
{
|
||||
type = data.type or nil,
|
||||
event = data.event or nil,
|
||||
action = data.action or nil,
|
||||
icon = data.icon or "fa-solid fa-eye",
|
||||
label = data.label,
|
||||
data = data.data,
|
||||
canInteract = data.canInteract,
|
||||
}
|
||||
},
|
||||
distance = 2.0
|
||||
})
|
||||
elseif Config.Target == 'ox' then
|
||||
exports.ox_target:addBoxZone({coords = loc, size = vec3(1,1,1), options = {
|
||||
{
|
||||
type = data.type or nil,
|
||||
event = data.event or nil,
|
||||
onSelect = data.action or nil,
|
||||
distance = 2.5,
|
||||
icon = data.icon or "fa-solid fa-eye",
|
||||
label = data.label,
|
||||
data = data.data,
|
||||
canInteract = data.canInteract,
|
||||
}
|
||||
}, })
|
||||
elseif Config.Target == 'interact' then
|
||||
exports.interact:AddInteraction({
|
||||
coords = vector3(loc.x, loc.y, loc.z),
|
||||
distance = 2.5,
|
||||
interactDst = 2,
|
||||
id = name,
|
||||
options = {
|
||||
{
|
||||
type = data.type or nil,
|
||||
event = data.event or nil,
|
||||
onSelect = data.action or nil,
|
||||
distance = 2.5,
|
||||
label = data.label,
|
||||
data = data.data,
|
||||
canInteract = data.canInteract,
|
||||
},
|
||||
}
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
function AddBoxZoneMulti(name, table, data)
|
||||
for k, v in pairs (table) do
|
||||
if v.gang == nil or v.gang == '' or v.gang == "" then v.gang = 1 end
|
||||
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},
|
||||
{ options = {
|
||||
{
|
||||
type = data.type or nil,
|
||||
event = data.event or nil,
|
||||
action = data.action or nil,
|
||||
icon = data.icon or "fa-solid fa-eye",
|
||||
label = data.label,
|
||||
data = k,
|
||||
canInteract = data.canInteract or function()
|
||||
if QBCore.Functions.GetPlayerData().gang.name == v.gang or v.gang == 1 then return true end end
|
||||
}
|
||||
},
|
||||
distance = 2.5
|
||||
})
|
||||
elseif Config.Target == 'ox' then
|
||||
exports.ox_target:addBoxZone({coords = v.loc, size = vec3(1,1,1), options = {
|
||||
{
|
||||
type = data.type or nil,
|
||||
event = data.event or nil,
|
||||
onSelect = data.action or nil,
|
||||
icon = data.icon or "fa-solid fa-eye",
|
||||
label = data.label,
|
||||
data = k,
|
||||
distance = 2.5,
|
||||
canInteract = data.canInteract or function()
|
||||
if QBCore.Functions.GetPlayerData().gang.name == v.gang or v.gang == 1 then return true end end
|
||||
}
|
||||
}, })
|
||||
elseif Config.Target == 'interact' then
|
||||
exports.interact:AddInteraction({
|
||||
coords = vector3(v.loc.x, v.loc.y, v.loc.z),
|
||||
distance = 2.5,
|
||||
interactDst = 2,
|
||||
id = name,
|
||||
options = {
|
||||
{
|
||||
type = data.type or nil,
|
||||
event = data.event or nil,
|
||||
action = data.action or nil,
|
||||
distance = 2.5,
|
||||
label = data.label or "fa-solid fa-eye",
|
||||
data = k,
|
||||
canInteract = data.canInteract or function()
|
||||
if QBCore.Functions.GetPlayerData().gang.name == v.gang or v.gang == 1 then return true end end
|
||||
},
|
||||
}
|
||||
})
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function AddBoxZoneMultiOptions(name, loc, data)
|
||||
local options = {}
|
||||
for k, v in pairs (data) do
|
||||
table.insert(options, {
|
||||
icon = v.icon or "fa-solid fa-eye", label = v.label, event = v.event or nil, action = v.action or nil,
|
||||
onSelect = v.action,data = v.data,canInteract = v.canInteract or nil, distance = 2.0,
|
||||
})
|
||||
end
|
||||
if Config.Target == 'qb' then
|
||||
exports['qb-target']:AddBoxZone(name , loc, 1.5, 1.75, {name = name, minZ = loc.z-1.50,maxZ = loc.z +1.5},
|
||||
{ options = options, distance = 2.5})
|
||||
elseif Config.Target == 'ox' then
|
||||
exports.ox_target:addBoxZone({coords = loc, size = vec3(1,1,1), options = options })
|
||||
elseif Config.Target == 'interact' then
|
||||
exports.interact:AddInteraction({coords = vector3(loc.x, loc.y, loc.z),distance = 2.5,interactDst = 2,id = name,options = options})
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function AddSingleModel(model, data, num)
|
||||
if Config.Target == 'qb' then
|
||||
exports['qb-target']:AddTargetEntity(model, {options = {
|
||||
{icon = data.icon or "fa-solid fa-eye", label = data.label, event = data.event or nil, action = data.action or nil, data = num }
|
||||
}, distance = 2.5})
|
||||
elseif Config.Target == 'ox' then
|
||||
exports.ox_target:addLocalEntity(model, {icon = data.icon, label = data.label, event = data.event or nil, onSelect = data.action or nil, data = num, distance = 2.5 })
|
||||
elseif Config.Target == 'interact' then
|
||||
exports.interact:AddLocalEntityInteraction({entity = model,offset = vec3(0.0, 0.0, 1.0),id = 'mddrugs'..model,distance = 2.5,interactDst = 2.5, options = {label = data.label, event = data.event or nil, action = data.action or nil, data = num, distance = 2.5 }})
|
||||
end
|
||||
end
|
||||
|
||||
function AddMultiModel(model, data, num)
|
||||
local options = {}
|
||||
for k, v in pairs (data) do
|
||||
table.insert(options, {
|
||||
icon = v.icon or "fa-solid fa-eye", label = v.label, event = v.event or nil, action = v.action or nil,
|
||||
onSelect = v.action,data = v.data,canInteract = v.canInteract or nil, distance = 2.0,
|
||||
})
|
||||
end
|
||||
if Config.Target == 'qb' then
|
||||
exports['qb-target']:AddTargetEntity(model, {options = options, distance = 2.5})
|
||||
elseif Config.Target == 'ox' then
|
||||
exports.ox_target:addLocalEntity(model, options)
|
||||
elseif Config.Target == 'interact' then
|
||||
local loc = GetEntityCoords(model)
|
||||
exports.interact:AddLocalEntityInteraction({entity = model,offset = vec3(0.0, 0.0, 1.0),id = 'mddrugss'..model,distance = 2.5,interactDst = 2.5, options = data})
|
||||
end
|
||||
end
|
||||
|
||||
local created = false
|
||||
local heading = 180.0
|
||||
function StartRay()
|
||||
local run = true
|
||||
local pedcoord = GetEntityCoords(PlayerPedId())
|
||||
lib.requestModel('v_ret_ml_tablea', 30000)
|
||||
local table = CreateObject('v_ret_ml_tablea', pedcoord.x, pedcoord.y, pedcoord.z+1, heading, false, false)
|
||||
repeat
|
||||
local hit, entityHit, endCoords, surfaceNormal, matHash = lib.raycast.cam(511, 4, 10)
|
||||
if not created then
|
||||
created = true
|
||||
lib.showTextUI([[[E] To Place
|
||||
[DEL] To Cancel
|
||||
[<-] To Move Left
|
||||
[->] To Move Right]])
|
||||
else
|
||||
SetEntityCoords(table, endCoords.x, endCoords.y, endCoords.z+1)
|
||||
SetEntityHeading(table, heading)
|
||||
SetEntityCollision(table, false, false)
|
||||
SetEntityAlpha(table, 100)
|
||||
end
|
||||
if IsControlPressed(0, 174) then
|
||||
heading = heading - 2
|
||||
end
|
||||
if IsControlPressed(0, 175) then
|
||||
heading = heading + 2
|
||||
end
|
||||
if IsControlPressed(0, 38) then
|
||||
lib.hideTextUI()
|
||||
run = false
|
||||
DeleteObject(table)
|
||||
created = false
|
||||
return endCoords, heading
|
||||
end
|
||||
|
||||
if IsControlPressed(0, 178) then
|
||||
lib.hideTextUI()
|
||||
run = false
|
||||
created = false
|
||||
DeleteObject(table)
|
||||
return nil, nil
|
||||
end
|
||||
Wait(0)
|
||||
until run == false
|
||||
end
|
||||
|
||||
function StartRay2()
|
||||
local run = true
|
||||
local pedcoord = GetEntityCoords(PlayerPedId())
|
||||
lib.requestModel('bkr_prop_coke_press_01aa', 30000)
|
||||
local table = CreateObject('bkr_prop_coke_press_01aa', pedcoord.x, pedcoord.y, pedcoord.z+1, heading, false, false)
|
||||
repeat
|
||||
local hit, entityHit, endCoords, surfaceNormal, matHash = lib.raycast.cam(511, 4, 10)
|
||||
if not created then
|
||||
created = true
|
||||
lib.showTextUI([[[E] To Place
|
||||
[DEL] To Cancel
|
||||
[<-] To Move Left
|
||||
[->] To Move Right]])
|
||||
else
|
||||
SetEntityCoords(table, endCoords.x, endCoords.y, endCoords.z+1)
|
||||
SetEntityHeading(table, heading)
|
||||
SetEntityCollision(table, false, false)
|
||||
SetEntityAlpha(table, 100)
|
||||
end
|
||||
if IsControlPressed(0, 174) then
|
||||
heading = heading - 2
|
||||
end
|
||||
if IsControlPressed(0, 175) then
|
||||
heading = heading + 2
|
||||
end
|
||||
if IsControlPressed(0, 38) then
|
||||
lib.hideTextUI()
|
||||
run = false
|
||||
DeleteObject(table)
|
||||
created = false
|
||||
return endCoords, heading
|
||||
end
|
||||
|
||||
if IsControlPressed(0, 178) then
|
||||
lib.hideTextUI()
|
||||
run = false
|
||||
created = false
|
||||
DeleteObject(table)
|
||||
return nil, nil
|
||||
end
|
||||
Wait(0)
|
||||
until run == false
|
||||
end
|
||||
|
||||
CreateThread(function()
|
||||
LoadModel('prop_plant_01b')
|
||||
LoadModel('prop_plant_01a')
|
||||
LoadModel('prop_cactus_03')
|
||||
LoadModel('prop_weed_01')
|
||||
TriggerEvent('weed:init')
|
||||
TriggerEvent('heroin:init')
|
||||
TriggerEvent('coke:init')
|
||||
TriggerEvent('Mescaline:init')
|
||||
TriggerEvent('shrooms:init')
|
||||
TriggerEvent('weed:init')
|
||||
end)
|
||||
|
||||
lib.callback.register('md-drugs:client:uncuff', function(data)
|
||||
if not progressbar(data, 4000, 'uncuff') then return end
|
||||
return true
|
||||
end)
|
||||
|
||||
RegisterCommand('DrugRep', function()
|
||||
if not Config.TierSystem then return end
|
||||
local rep = lib.callback.await('md-drugs:server:GetRep', false)
|
||||
lib.registerContext({
|
||||
id = 'DrugRep',
|
||||
title = 'Drug Reputation',
|
||||
options = {
|
||||
{icon = "fa-solid fa-face-flushed", title = 'Cocaine: '..rep.coke},
|
||||
{icon = "fa-solid fa-syringe", title = 'Heroin: '..rep.heroin},
|
||||
{icon = "fa-solid fa-vial", title = 'LSD: '..rep.lsd},
|
||||
{icon = "fa-solid fa-plug", title = 'Dealer: '..rep.dealerrep},
|
||||
{icon = "fa-solid fa-money-bill", title = 'Corner Selling: ' .. rep.cornerselling.rep, description = 'Rank: ' .. rep.cornerselling.label }
|
||||
}
|
||||
})
|
||||
lib.showContext('DrugRep')
|
||||
end, false)
|
||||
|
||||
@@ -1,131 +1,49 @@
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
local CocaPlant = {}
|
||||
local PoppyPlants = {}
|
||||
local herointable = false
|
||||
function LoadModel(hash)
|
||||
hash = GetHashKey(hash)
|
||||
RequestModel(hash)
|
||||
while not HasModelLoaded(hash) do
|
||||
Wait(3000)
|
||||
end
|
||||
end
|
||||
local dirty = false
|
||||
|
||||
local function loadParticle(dict)
|
||||
if not HasNamedPtfxAssetLoaded(dict) then
|
||||
RequestNamedPtfxAsset(dict)
|
||||
end
|
||||
while not HasNamedPtfxAssetLoaded(dict) do
|
||||
Wait(0)
|
||||
end
|
||||
SetPtfxAssetNextCall(dict)
|
||||
local function createLabKit(coord, head)
|
||||
local heroinlabkit = CreateObject("v_ret_ml_tablea", coord.x, coord.y, coord.z - 1, true, false,false)
|
||||
SetEntityHeading(heroinlabkit, head)
|
||||
PlaceObjectOnGroundProperly(heroinlabkit)
|
||||
AddMultiModel(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},
|
||||
{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},
|
||||
{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
|
||||
|
||||
CreateThread(function()
|
||||
local Ped = "g_m_y_famdnf_01"
|
||||
lib.requestModel("g_m_y_famdnf_01", Config.requestModelTime)
|
||||
labkitlocation = Config.buyheroinlabkit
|
||||
heroinkitdealer = CreatePed(0, Ped,labkitlocation.x, labkitlocation.y, labkitlocation.z-1, 180.0, false, false)
|
||||
FreezeEntityPosition(heroinkitdealer, true)
|
||||
SetEntityInvincible(heroinkitdealer, true)
|
||||
exports['qb-target']:AddTargetEntity(heroinkitdealer, {
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
label = "Buy Heroin Lab Kit",
|
||||
icon = "fas fa-eye",
|
||||
event = "md-drugs:client:buyheroinlabkit"
|
||||
},
|
||||
}
|
||||
|
||||
})
|
||||
end)
|
||||
local function pickher(loc)
|
||||
if not progressbar(Lang.Heroin.pick, 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("heroin:pickupCane", loc)
|
||||
end
|
||||
|
||||
---- plant spawns dont edit
|
||||
RegisterNetEvent('heroin:respawnCane', function(loc)
|
||||
local v = GlobalState.PoppyPlants[loc]
|
||||
local hash = GetHashKey(v.model)
|
||||
--if not HasModelLoaded(hash) then LoadModel(hash) end
|
||||
if not PoppyPlants[loc] then
|
||||
PoppyPlants[loc] = CreateObject(hash, v.location, false, true, true)
|
||||
SetEntityAsMissionEntity(PoppyPlants[loc], true, true)
|
||||
FreezeEntityPosition(PoppyPlants[loc], true)
|
||||
SetEntityHeading(PoppyPlants[loc], v.heading)
|
||||
exports['qb-target']:AddTargetEntity(PoppyPlants[loc], {
|
||||
options = { {
|
||||
icon = "fas fa-hand",
|
||||
label = "pick Poppies",
|
||||
action = function()
|
||||
QBCore.Functions.Progressbar("pick_cane", "picking heroin", 2000, false, true, {
|
||||
disableMovement = true, disableCarMovement = true, disableMouse = false, disableCombat = true, },
|
||||
{ animDict = 'amb@prop_human_bum_bin@idle_a', anim = 'idle_a', flags = 47, },
|
||||
{}, {}, function()
|
||||
TriggerServerEvent("heroin:pickupCane", loc)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end, function() -- Cancel
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
end
|
||||
}
|
||||
},
|
||||
distance = 3.0
|
||||
})
|
||||
Freeze(PoppyPlants[loc], true, v.heading)
|
||||
AddSingleModel(PoppyPlants[loc], {icon = "fa-solid fa-seedling", label = Lang.targets.heroin.pick, action = function() pickher(loc) end}, loc )
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
|
||||
RegisterNetEvent('heroin:removeCane', function(loc)
|
||||
if DoesEntityExist(PoppyPlants[loc]) then DeleteEntity(PoppyPlants[loc]) end
|
||||
PoppyPlants[loc] = nil
|
||||
end)
|
||||
|
||||
|
||||
|
||||
RegisterNetEvent("heroin:init", function()
|
||||
for k, v in pairs (GlobalState.PoppyPlants) do
|
||||
local hash = GetHashKey(v.model)
|
||||
if not HasModelLoaded(hash) then LoadModel(hash) end
|
||||
if not v.taken then
|
||||
PoppyPlants[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z, false, true, true)
|
||||
SetEntityAsMissionEntity(PoppyPlants[k], true, true)
|
||||
FreezeEntityPosition(PoppyPlants[k], true)
|
||||
SetEntityHeading(PoppyPlants[k], v.heading)
|
||||
exports['qb-target']:AddTargetEntity(PoppyPlants[k], {
|
||||
options = { {
|
||||
icon = "fas fa-hand",
|
||||
label = "Pick Poppies",
|
||||
action = function()
|
||||
QBCore.Functions.Progressbar("pick_cane", "Picking Heroin", 2000, false, true, {
|
||||
disableMovement = true, disableCarMovement = true, disableMouse = false, disableCombat = true, },
|
||||
{ animDict = 'amb@prop_human_bum_bin@idle_a', anim = 'idle_a', flags = 47, },
|
||||
{}, {}, function()
|
||||
TriggerServerEvent("heroin:pickupCane", k)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end, function() -- Cancel
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
end
|
||||
}
|
||||
},
|
||||
distance = 3.0
|
||||
})
|
||||
Freeze(PoppyPlants[k], true, v.heading)
|
||||
AddSingleModel(PoppyPlants[k], {icon = "fa-solid fa-seedling", label = Lang.targets.heroin.pick, action = function() pickher(k) end}, k )
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
AddEventHandler('onResourceStart', function(resource)
|
||||
if resource == GetCurrentResourceName() then
|
||||
LoadModel('prop_plant_01b')
|
||||
TriggerEvent('heroin:init')
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterNetEvent('QBCore:Client:OnPlayerLoaded', function()
|
||||
Wait(3000)
|
||||
LoadModel('prop_plant_01b')
|
||||
TriggerEvent('heroin:init')
|
||||
end)
|
||||
|
||||
AddEventHandler('onResourceStop', function(resourceName)
|
||||
if GetCurrentResourceName() == resourceName then
|
||||
SetModelAsNoLongerNeeded(GetHashKey('prop_plant_01b'))
|
||||
@@ -135,177 +53,75 @@ AddEventHandler('onResourceStart', function(resource)
|
||||
end
|
||||
end
|
||||
end
|
||||
DeleteObject(heroinlabkit)
|
||||
DeleteObject(dirtylabkitheroin)
|
||||
end)
|
||||
---- plant stop end
|
||||
|
||||
RegisterNetEvent("md-drugs:client:dryplant")
|
||||
AddEventHandler("md-drugs:client:dryplant", function()
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
QBCore.Functions.Progressbar("drink_something", "drying out these poppies!", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
TriggerServerEvent("md-drugs:server:dryplant")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:cutheroin")
|
||||
AddEventHandler("md-drugs:client:cutheroin", function()
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
QBCore.Functions.Progressbar("drink_something", "cutting the heroin!", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
TriggerServerEvent("md-drugs:server:cutheroin")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
RegisterNetEvent("md-drugs:client:dryplant", function(data)
|
||||
if not progressbar(Lang.Heroin.dryout, 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:dryplant",data.data)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:buyheroinlabkit")
|
||||
AddEventHandler("md-drugs:client:buyheroinlabkit", function()
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
QBCore.Functions.Progressbar("drink_something", "Shhhhh!", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
TriggerServerEvent("md-drugs:server:getheroinlabkit")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
RegisterNetEvent("md-drugs:client:cutheroin", function(data)
|
||||
if not ItemCheck('bakingsoda') then return end
|
||||
if not progressbar(Lang.Heroin.cutting, 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:cutheroin", data.data)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:setheroinlabkit")
|
||||
AddEventHandler("md-drugs:client:setheroinlabkit", function()
|
||||
if herointable then
|
||||
QBCore.Functions.Notify('You Already Have A Table Out', 'error')
|
||||
else
|
||||
|
||||
local PedCoords = GetEntityCoords(PlayerPedId())
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
herointable = true
|
||||
ClearPedTasks(PlayerPedId())
|
||||
heroinlabkit = CreateObject("v_ret_ml_tablea", PedCoords.x+1, PedCoords.y+1, PedCoords.z-1, true, false)
|
||||
PlaceObjectOnGroundProperly(heroinlabkit)
|
||||
exports['qb-target']:AddTargetEntity(heroinlabkit, {
|
||||
options = {
|
||||
{
|
||||
|
||||
event = "md-drugs:client:heatliquidheroin",
|
||||
icon = "fas fa-box-circle-check",
|
||||
label = "Cook Heroin",
|
||||
},
|
||||
{
|
||||
|
||||
event = "md-drugs:client:getheroinkitback",
|
||||
icon = "fas fa-box-circle-check",
|
||||
label = "Pick Up",
|
||||
canInteract = function()
|
||||
if herointable then return true end end
|
||||
},
|
||||
}
|
||||
})
|
||||
end
|
||||
RegisterNetEvent("md-drugs:client:buyheroinlabkit", function()
|
||||
if not progressbar(Lang.Heroin.secret, 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:getheroinlabkit")
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:heatliquidheroin")
|
||||
AddEventHandler("md-drugs:client:heatliquidheroin", function()
|
||||
local PedCoords = GetEntityCoords(PlayerPedId())
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:heatliquidheroin")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
TriggerServerEvent("md-drugs:server:failheatingheroin")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
DeleteObject(heroinlabkit)
|
||||
Wait(100)
|
||||
dirtylabkitheroin = CreateObject("v_ret_ml_tablea", PedCoords.x+1, PedCoords.y+1, PedCoords.z-1, true, false)
|
||||
lib.callback.register("md-drugs:client:setheroinlabkit", function()
|
||||
if herointable then
|
||||
Notify(Lang.Heroin.tableout, 'error')
|
||||
return false
|
||||
else
|
||||
herointable = true
|
||||
local location, head = StartRay()
|
||||
if not location then herointable = false return end
|
||||
if not progressbar(Lang.Heroin.table, 4000, 'uncuff') then return end
|
||||
createLabKit(location, head)
|
||||
return true, location
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:heatliquidheroin", function(data)
|
||||
local loc, head = GetEntityCoords(data.data), GetEntityHeading(data.data)
|
||||
if not ItemCheck('emptyvial') then return end
|
||||
if not minigame() then
|
||||
dirty = true
|
||||
TriggerServerEvent("md-drugs:server:failheatingheroin")
|
||||
loadParticle("core")
|
||||
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)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
SetPedToRagdoll(PlayerPedId(), 1300, 1300, 0, 0, 0, 0)
|
||||
|
||||
exports['qb-target']:AddTargetEntity(dirtylabkitheroin, {
|
||||
options = {
|
||||
{
|
||||
|
||||
event = "md-drugs:client:cleanheroinlabkit",
|
||||
icon = "fas fa-box-circle-check",
|
||||
label = "Clean It",
|
||||
}
|
||||
}
|
||||
})
|
||||
end
|
||||
end, 1, 8) -- NumberOfCircles, MS
|
||||
SetPedToRagdoll(PlayerPedId(), 1300, 1300, 0, 0, 0, 0)
|
||||
return end
|
||||
if not progressbar(Lang.Heroin.success, 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:heatliquidheroin")
|
||||
end)
|
||||
|
||||
|
||||
RegisterNetEvent("md-drugs:client:cleanheroinlabkit")
|
||||
AddEventHandler("md-drugs:client:cleanheroinlabkit", function()
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'clean'})
|
||||
QBCore.Functions.Progressbar("drink_something", "Cleaning", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
|
||||
TriggerServerEvent("md-drugs:server:removecleaningkitheroin")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
RegisterNetEvent("md-drugs:client:cleanheroinlabkit", function(data)
|
||||
if not ItemCheck('cleaningkit') then return end
|
||||
if not progressbar(Lang.Heroin.clean, 4000, 'clean') then return end
|
||||
local done = lib.callback.await('removeCleaningkit', false)
|
||||
if done then dirty = false end
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:deletedirtyheroin")
|
||||
AddEventHandler("md-drugs:client:deletedirtyheroin", function()
|
||||
DeleteObject(dirtylabkitheroin)
|
||||
herointable = false
|
||||
Wait(1000)
|
||||
TriggerEvent("md-drugs:client:setheroinlabkit")
|
||||
RegisterNetEvent("md-drugs:client:deletedirtyheroin", function(data)
|
||||
local location,head = GetEntityCoords(data), GetEntityHeading(data)
|
||||
DeleteObject(data)
|
||||
createLabKit(location, head)
|
||||
end)
|
||||
|
||||
|
||||
RegisterNetEvent("md-drugs:client:getheroinkitback")
|
||||
AddEventHandler("md-drugs:client:getheroinkitback", function()
|
||||
herointable = false
|
||||
DeleteObject(heroinlabkit)
|
||||
TriggerServerEvent("md-drugs:server:getheroinlabkitback")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
RegisterNetEvent("md-drugs:client:getheroinkitback", function(data)
|
||||
if not progressbar(Lang.Heroin.pickup, 4000, 'uncuff') then return end
|
||||
herointable = false
|
||||
DeleteObject(data.data)
|
||||
TriggerServerEvent("md-drugs:server:getheroinlabkitback")
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:fillneedle")
|
||||
AddEventHandler("md-drugs:client:fillneedle", function()
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
QBCore.Functions.Progressbar("drink_something", "Filling Needles!", 1000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:fillneedle")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
TriggerServerEvent("md-drugs:server:failheroin")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 2, 8) -- NumberOfCircles,
|
||||
end)
|
||||
end)
|
||||
|
||||
|
||||
RegisterNetEvent("md-drugs:client:fillneedle", function(data)
|
||||
if not minigame() then TriggerServerEvent("md-drugs:server:failheroin", data.data) return end
|
||||
if not progressbar(Lang.Heroin.needles, 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:fillneedle", data.data)
|
||||
end)
|
||||
@@ -1,43 +1,41 @@
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
|
||||
CreateThread(function()
|
||||
local current = "s_m_m_doctor_01"
|
||||
lib.requestModel(current, Config.requestModelTime)
|
||||
SyrupLocation = CreatePed(0, current,Config.SyrupVendor.x,Config.SyrupVendor.y,Config.SyrupVendor.z-1, false, false)
|
||||
FreezeEntityPosition(SyrupLocation, true)
|
||||
SetEntityInvincible(SyrupLocation, true)
|
||||
exports['qb-target']:AddTargetEntity(SyrupLocation, {
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
label = "Get Task",
|
||||
icon = "fas fa-eye",
|
||||
event = "md-drugs:client:getsyruplocationtobuy"
|
||||
},
|
||||
},
|
||||
distance = 2.0
|
||||
})
|
||||
RegisterNetEvent("md-drugs:client:getsyruplocationtobuy", function()
|
||||
Notify(Lang.Lean.marked, "success")
|
||||
SpawnCarPedChase()
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:getsyruplocationtobuy")
|
||||
AddEventHandler("md-drugs:client:getsyruplocationtobuy", function()
|
||||
SpawnCarPedChase()
|
||||
QBCore.Functions.Notify("Car Has Been Marked On Your Map", "success")
|
||||
RegisterNetEvent('md-drugs:client:leancraft', function()
|
||||
local store = {}
|
||||
local label = {}
|
||||
local items = lib.callback.await('md-drugs:server:GetRecipe', false,'lean', 'cups')
|
||||
for k, v in pairs (items) do
|
||||
label = {}
|
||||
local item = ''
|
||||
for m, d in pairs (items[k].take) do table.insert(label, GetLabel(m) .. ' X ' .. d) end
|
||||
for m,d in pairs (items[k].give) do item = m end
|
||||
store[#store + 1] = {
|
||||
icon = GetImage(item),
|
||||
description = table.concat(label, ", "),
|
||||
title = GetLabel(item),
|
||||
event = 'md-drugs:client:stirlean',
|
||||
args = {
|
||||
item = item,
|
||||
recipe = 'lean',
|
||||
num = k,
|
||||
label = 'Cooking Up ' .. GetLabel(item),
|
||||
table = 'cups'
|
||||
}
|
||||
}
|
||||
sorter(store, 'title')
|
||||
lib.registerContext({id = 'leanCraft',title = "Make Lean", options = store})
|
||||
end
|
||||
lib.showContext('leanCraft')
|
||||
end)
|
||||
|
||||
RegisterNetEvent('md-drugs:client:consumelean', function(itemName)
|
||||
QBCore.Functions.Progressbar("use_lsd", "Have Fun!", 1750, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
}, {}, {}, {}, function()
|
||||
ClearPedTasks(PlayerPedId())
|
||||
TriggerEvent("evidence:client:SetStatus", "widepupils", 300)
|
||||
AlienEffect()
|
||||
Wait(math.random(1000,5000))
|
||||
SetPedToRagdoll(PlayerPedId(), 1000,2000, 2)
|
||||
|
||||
|
||||
end)
|
||||
local busy = false
|
||||
RegisterNetEvent('md-drugs:client:stirlean', function(data)
|
||||
if busy then return end
|
||||
busy = true
|
||||
if not progressbar(data.label, 4000, 'uncuff') then busy = false return end
|
||||
TriggerServerEvent('md-drugs:server:finishcup', data)
|
||||
busy = false
|
||||
end)
|
||||
@@ -1,323 +1,103 @@
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
local tableout = false
|
||||
local function loadParticle(dict)
|
||||
if not HasNamedPtfxAssetLoaded(dict) then
|
||||
RequestNamedPtfxAsset(dict)
|
||||
end
|
||||
while not HasNamedPtfxAssetLoaded(dict) do
|
||||
Wait(0)
|
||||
end
|
||||
SetPtfxAssetNextCall(dict)
|
||||
end
|
||||
|
||||
CreateThread(function()
|
||||
local Ped = "g_m_y_famdnf_01"
|
||||
lib.requestModel(Ped, Config.requestModelTime)
|
||||
tabdealer = CreatePed(0, Ped,Config.buylsdlabkit.x,Config.buylsdlabkit.y,Config.buylsdlabkit.z-1, 180.0, false, false)
|
||||
FreezeEntityPosition(tabdealer, true)
|
||||
SetEntityInvincible(tabdealer, true)
|
||||
exports['qb-target']:AddTargetEntity(tabdealer, {
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
label = "Buy LSD Lab Kit",
|
||||
icon = "fas fa-eye",
|
||||
event = "md-drugs:client:buylabkit"
|
||||
}
|
||||
}
|
||||
})
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:getlysergic")
|
||||
AddEventHandler("md-drugs:client:getlysergic", function()
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
QBCore.Functions.Progressbar("drink_something", "Stealing Lysergic Acid!", 1000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
ClearPedTasks(PlayerPedId())
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:getlysergic")
|
||||
else
|
||||
end
|
||||
end, 1, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:getdiethylamide")
|
||||
AddEventHandler("md-drugs:client:getdiethylamide", function()
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
QBCore.Functions.Progressbar("drink_something", "Stealing Diethylamide!", 1000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:getdiethylamide")
|
||||
else
|
||||
end
|
||||
end, 1, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:setlsdlabkit")
|
||||
AddEventHandler("md-drugs:client:setlsdlabkit", function()
|
||||
if tableout then
|
||||
QBCore.Functions.Notify('You Already Have A Table Out', 'error')
|
||||
else
|
||||
tableout = true
|
||||
local PedCoords = GetEntityCoords(PlayerPedId())
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
QBCore.Functions.Progressbar("drink_something", "Setting Table Down", 1000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
labkit = CreateObject("v_ret_ml_tablea", PedCoords.x+1, PedCoords.y+1, PedCoords.z-1, true, false)
|
||||
PlaceObjectOnGroundProperly(labkit)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
exports['qb-target']:AddTargetEntity(labkit, {
|
||||
options = {
|
||||
{
|
||||
|
||||
event = "md-drugs:client:heatliquid",
|
||||
icon = "fas fa-box-circle-check",
|
||||
label = "Heat Liquid",
|
||||
},
|
||||
{
|
||||
|
||||
event = "md-drugs:client:refinequalityacid",
|
||||
icon = "fas fa-box-circle-check",
|
||||
label = "Refine",
|
||||
},
|
||||
{
|
||||
|
||||
event = "md-drugs:client:maketabpaper",
|
||||
icon = "fas fa-box-circle-check",
|
||||
label = "Dab Sheets",
|
||||
},
|
||||
{
|
||||
|
||||
event = "md-drugs:client:getlabkitback",
|
||||
icon = "fas fa-box-circle-check",
|
||||
label = "Pick Up",
|
||||
canInteract = function()
|
||||
if tableout then return true end end
|
||||
},
|
||||
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, 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
|
||||
}
|
||||
}
|
||||
})
|
||||
end)
|
||||
AddMultiModel(labkit, options, labkit)
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
RegisterNetEvent("md-drugs:client:getlabkitback")
|
||||
AddEventHandler("md-drugs:client:getlabkitback", function()
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
local PedCoords = GetEntityCoords(PlayerPedId())
|
||||
QBCore.Functions.Progressbar("drink_something", "Packing Up", 1000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
DeleteObject(labkit)
|
||||
TriggerServerEvent('md-drugs:server:getlabkitback')
|
||||
ClearPedTasks(PlayerPedId())
|
||||
tableout = false
|
||||
end)
|
||||
RegisterNetEvent("md-drugs:client:getlysergic", function(data)
|
||||
if not minigame() then return end
|
||||
if not progressbar(Lang.lsd.steallys, 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:getlysergic",data.data)
|
||||
end)
|
||||
|
||||
|
||||
RegisterNetEvent("md-drugs:client:heatliquid")
|
||||
AddEventHandler("md-drugs:client:heatliquid", function()
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
local PedCoords = GetEntityCoords(PlayerPedId())
|
||||
dict = "scr_ie_svm_technical2"
|
||||
QBCore.Functions.Progressbar("drink_something", "Heating Liquids!", 1000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
ClearPedTasks(PlayerPedId())
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:heatliquid")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
TriggerServerEvent("md-drugs:server:failheating")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
DeleteObject(labkit)
|
||||
dirtylabkit = CreateObject("v_ret_ml_tablea", PedCoords.x+1, PedCoords.y+1, PedCoords.z-1, true, false)
|
||||
RegisterNetEvent("md-drugs:client:getdiethylamide", function(data)
|
||||
if not minigame() then return end
|
||||
if not progressbar(Lang.lsd.stealdie, 4000, 'uncuff') then return end
|
||||
TriggerServerEvent('md-drugs:server:getdiethylamide', data.data)
|
||||
end)
|
||||
|
||||
|
||||
lib.callback.register("md-drugs:client:setlsdlabkit", function()
|
||||
if tableout then
|
||||
Notify(Lang.lsd.tableout, 'error')
|
||||
return false
|
||||
else
|
||||
tableout = true
|
||||
local loc, head = StartRay()
|
||||
if not loc then tableout = false return end
|
||||
if not progressbar(Lang.lsd.place, 4000, 'uncuff') then return end
|
||||
createLabKit(loc, head)
|
||||
return true, loc
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:getlabkitback", function(data)
|
||||
if not progressbar(Lang.lsd.tablepack, 4000, 'uncuff') then return end
|
||||
DeleteObject(data.data)
|
||||
TriggerServerEvent('md-drugs:server:getlabkitback')
|
||||
tableout = false
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:heatliquid", function(data)
|
||||
local PedCoords, head = GetEntityCoords(data.data), GetEntityHeading(data.data)
|
||||
local dict = "scr_ie_svm_technical2"
|
||||
if not ItemCheck('lysergic_acid') then return end
|
||||
if not ItemCheck('diethylamide') then return end
|
||||
if not minigame() then
|
||||
dirtylsd = true
|
||||
loadParticle(dict)
|
||||
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)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
exports['qb-target']:AddTargetEntity(dirtylabkit, {
|
||||
options = {
|
||||
{
|
||||
|
||||
event = "md-drugs:client:cleanlabkit",
|
||||
icon = "fas fa-box-circle-check",
|
||||
label = "Clean It",
|
||||
},
|
||||
}
|
||||
})
|
||||
end
|
||||
end, 1, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:cleanlabkit")
|
||||
AddEventHandler("md-drugs:client:cleanlabkit", function()
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'clean'})
|
||||
QBCore.Functions.Progressbar("drink_something", "Cleaning", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
tableout = false
|
||||
TriggerServerEvent("md-drugs:server:removecleaningkit")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:resetlsdkit")
|
||||
AddEventHandler("md-drugs:client:resetlsdkit", function()
|
||||
DeleteObject(dirtylabkit)
|
||||
TriggerEvent("md-drugs:client:setlsdlabkit")
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:refinequalityacid")
|
||||
AddEventHandler("md-drugs:client:refinequalityacid", function()
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
QBCore.Functions.Progressbar("drink_something", "Refining The Quality!", 1000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
ClearPedTasks(PlayerPedId())
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:refinequalityacid")
|
||||
else
|
||||
TriggerServerEvent("md-drugs:server:failrefinequality")
|
||||
end
|
||||
end, 1, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:maketabpaper")
|
||||
AddEventHandler("md-drugs:client:maketabpaper", function()
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
QBCore.Functions.Progressbar("drink_something", "Dipping LSD Onto Paper", 1000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
ClearPedTasks(PlayerPedId())
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:maketabpaper")
|
||||
else
|
||||
TriggerServerEvent("md-drugs:server:failtabs")
|
||||
end
|
||||
end, 3, 8) -- NumberOfCircles,
|
||||
end)
|
||||
Wait(100)
|
||||
AddMultiModel(dirtylabkit, {{event = "md-drugs:client:cleanlabkit", icon = "fa-solid fa-hand-sparkles", label = Lang.targets.lsd.clean, data = dirtylabkit}}, nil )
|
||||
return end
|
||||
if not progressbar(Lang.lsd.heat, 7000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:heatliquid")
|
||||
end)
|
||||
|
||||
|
||||
RegisterNetEvent("md-drugs:client:cutsheet")
|
||||
AddEventHandler("md-drugs:client:cutsheet", function()
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
QBCore.Functions.Progressbar("drink_something", "Cutting Sheets", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
RegisterNetEvent("md-drugs:client:refinequalityacid", function()
|
||||
if not ItemCheck('lsd_one_vial') then return end
|
||||
if not minigame() then TriggerServerEvent("md-drugs:server:failrefinequality") return end
|
||||
if not progressbar(Lang.lsd.refine, 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:refinequalityacid")
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:buytabs")
|
||||
AddEventHandler("md-drugs:client:buytabs", function()
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
QBCore.Functions.Progressbar("drink_something", "Buying Tab Paper", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
TriggerServerEvent("md-drugs:server:gettabpaper")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
RegisterNetEvent("md-drugs:client:maketabpaper", function()
|
||||
if not ItemCheck('tab_paper') then return end
|
||||
if not minigame() then TriggerServerEvent("md-drugs:server:failtabs") return end
|
||||
if not progressbar(Lang.lsd.dip, 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:maketabpaper")
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:buylabkit")
|
||||
AddEventHandler("md-drugs:client:buylabkit", function()
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
QBCore.Functions.Progressbar("drink_something", "Buying A Lab Kit", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
TriggerServerEvent("md-drugs:server:getlabkit")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
RegisterNetEvent("md-drugs:client:buytabs", function(data)
|
||||
if not progressbar(Lang.lsd.buypaper, 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:gettabpaper", data.data)
|
||||
end)
|
||||
|
||||
|
||||
RegisterNetEvent('md-drugs:client:taketabs', function(itemName)
|
||||
QBCore.Functions.Progressbar("use_lsd", "Have Fun!", 1750, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
}, {
|
||||
animDict = "mp_suicide",
|
||||
anim = "pill",
|
||||
flags = 49,
|
||||
}, {}, {}, function() -- Done
|
||||
StopAnimTask(PlayerPedId(), "mp_suicide", "pill", 1.0)
|
||||
TriggerEvent("evidence:client:SetStatus", "widepupils", 300)
|
||||
if itemName == "smiley_tabs" or itemName == "wildcherry_tabs" or itemName == "yinyang_tabs" then
|
||||
AlienEffect()
|
||||
elseif itemName == "pineapple_tabs" then
|
||||
EcstasyEffect()
|
||||
elseif itemName == "bart_tabs" then
|
||||
TrevorEffect()
|
||||
else
|
||||
TrevorEffect()
|
||||
Wait(15000)
|
||||
EcstasyEffect()
|
||||
end
|
||||
end, function() -- Cancel
|
||||
StopAnimTask(PlayerPedId(), "mp_suicide", "pill", 1.0)
|
||||
QBCore.Functions.Notify("Canceled", "error")
|
||||
end)
|
||||
RegisterNetEvent("md-drugs:client:buylabkit", function()
|
||||
if hasItem('lsdlabkit') then Notify(Lang.lsd.hav, 'error') return end
|
||||
if not progressbar(Lang.lsd.buykit, 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:getlabkit")
|
||||
end)
|
||||
@@ -1,113 +1,38 @@
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
local Mescaline = {}
|
||||
local hallucinate = nil
|
||||
|
||||
function LoadModel(hash)
|
||||
hash = GetHashKey(hash)
|
||||
RequestModel(hash)
|
||||
while not HasModelLoaded(hash) do
|
||||
Wait(3000)
|
||||
end
|
||||
end
|
||||
|
||||
local function loadParticle(dict)
|
||||
if not HasNamedPtfxAssetLoaded(dict) then
|
||||
RequestNamedPtfxAsset(dict)
|
||||
end
|
||||
while not HasNamedPtfxAssetLoaded(dict) do
|
||||
Wait(0)
|
||||
end
|
||||
SetPtfxAssetNextCall(dict)
|
||||
local function pick(loc)
|
||||
if not progressbar(Lang.mescaline.pick, 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("Mescaline:pickupCane", loc)
|
||||
end
|
||||
|
||||
|
||||
---- plant spawns dont edit
|
||||
RegisterNetEvent('Mescaline:respawnCane', function(loc)
|
||||
local v = GlobalState.Mescaline[loc]
|
||||
local hash = GetHashKey(v.model)
|
||||
--if not HasModelLoaded(hash) then LoadModel(hash) end
|
||||
if not Mescaline[loc] then
|
||||
Mescaline[loc] = CreateObject(hash, v.location, false, true, true)
|
||||
SetEntityAsMissionEntity(Mescaline[loc], true, true)
|
||||
FreezeEntityPosition(Mescaline[loc], true)
|
||||
SetEntityHeading(Mescaline[loc], v.heading)
|
||||
exports['qb-target']:AddTargetEntity(Mescaline[loc], {
|
||||
options = { {
|
||||
icon = "fas fa-hand",
|
||||
label = "pick Cactus",
|
||||
action = function()
|
||||
QBCore.Functions.Progressbar("pick_cane", "picking Cactus", 2000, false, true, {
|
||||
disableMovement = true, disableCarMovement = true, disableMouse = false, disableCombat = true, },
|
||||
{ animDict = 'amb@prop_human_bum_bin@idle_a', anim = 'idle_a', flags = 47, },
|
||||
{}, {}, function()
|
||||
TriggerServerEvent("Mescaline:pickupCane", loc)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end, function() -- Cancel
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
end
|
||||
}
|
||||
},
|
||||
distance = 3.0
|
||||
})
|
||||
Freeze(Mescaline[loc], true, v.heading)
|
||||
AddSingleModel(Mescaline[loc], {icon = "fa-solid fa-seedling",label = Lang.targets.mescaline.pick, action = function() pick(loc) end}, loc )
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
|
||||
RegisterNetEvent('Mescaline:removeCane', function(loc)
|
||||
if DoesEntityExist(Mescaline[loc]) then DeleteEntity(Mescaline[loc]) end
|
||||
Mescaline[loc] = nil
|
||||
end)
|
||||
|
||||
|
||||
|
||||
RegisterNetEvent("Mescaline:init", function()
|
||||
for k, v in pairs (GlobalState.Mescaline) do
|
||||
local hash = GetHashKey(v.model)
|
||||
if not HasModelLoaded(hash) then LoadModel(hash) end
|
||||
if not v.taken then
|
||||
Mescaline[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z, false, true, true)
|
||||
SetEntityAsMissionEntity(Mescaline[k], true, true)
|
||||
FreezeEntityPosition(Mescaline[k], true)
|
||||
SetEntityHeading(Mescaline[k], v.heading)
|
||||
exports['qb-target']:AddTargetEntity(Mescaline[k], {
|
||||
options = { {
|
||||
icon = "fas fa-hand",
|
||||
label = "Pick Mescaline",
|
||||
action = function()
|
||||
QBCore.Functions.Progressbar("pick_cane", "Picking Mescaline", 2000, false, true, {
|
||||
disableMovement = true, disableCarMovement = true, disableMouse = false, disableCombat = true, },
|
||||
{ animDict = 'amb@prop_human_bum_bin@idle_a', anim = 'idle_a', flags = 47, },
|
||||
{}, {}, function()
|
||||
TriggerServerEvent("Mescaline:pickupCane", k)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end, function() -- Cancel
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
end
|
||||
}
|
||||
},
|
||||
distance = 3.0
|
||||
})
|
||||
Freeze(Mescaline[k], true, v.heading)
|
||||
AddSingleModel(Mescaline[k], {icon = "fa-solid fa-seedling",label = Lang.targets.mescaline.pick,action = function() pick(k) end}, k)
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
AddEventHandler('onResourceStart', function(resource)
|
||||
if resource == GetCurrentResourceName() then
|
||||
LoadModel('prop_cactus_03')
|
||||
TriggerEvent('Mescaline:init')
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterNetEvent('QBCore:Client:OnPlayerLoaded', function()
|
||||
Wait(3000)
|
||||
LoadModel('prop_cactus_03')
|
||||
TriggerEvent('Mescaline:init')
|
||||
end)
|
||||
|
||||
AddEventHandler('onResourceStop', function(resourceName)
|
||||
AddEventHandler('onResourceStop', function(resourceName)
|
||||
if GetCurrentResourceName() == resourceName then
|
||||
SetModelAsNoLongerNeeded(GetHashKey('prop_cactus_03'))
|
||||
for k, v in pairs(Mescaline) do
|
||||
@@ -118,58 +43,28 @@ AddEventHandler('onResourceStart', function(resource)
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
RegisterNetEvent("md-drugs:client:drymescaline")
|
||||
AddEventHandler("md-drugs:client:drymescaline", function()
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
QBCore.Functions.Progressbar("drink_something", "Drying Out", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
TriggerServerEvent("md-drugs:server:drymescaline")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
RegisterNetEvent("md-drugs:client:drymescaline", function()
|
||||
if not ItemCheck('cactusbulb') then return end
|
||||
if not progressbar(Lang.mescaline.dry, 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:drymescaline")
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:takemescaline")
|
||||
AddEventHandler("md-drugs:client:takemescaline", function()
|
||||
local chance = math.random(1,100)
|
||||
local chance2 = math.random(1,100)
|
||||
QBCore.Functions.Progressbar("drink_something", "Taking Mescaline", 1000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
if chance <= Config.Badtrip then
|
||||
AlienEffect()
|
||||
clone = ClonePed(PlayerPedId(), false, false, true)
|
||||
SetEntityAsMissionEntity(clone)
|
||||
SetEntityVisible(clone, true)
|
||||
SetPedRelationshipGroupHash(clone)
|
||||
SetPedAccuracy(clone)
|
||||
SetPedArmour(clone)
|
||||
SetPedCanSwitchWeapon(clone, true)
|
||||
SetPedFleeAttributes(clone, false)
|
||||
if chance2 <= 99 then
|
||||
GiveWeaponToPed(clone, "weapon_flaregun", 1, false, true)
|
||||
TaskCombatPed(clone, PlayerPedId(), 0, 16)
|
||||
SetPedCombatAttributes(clone, 46, true)
|
||||
Wait(1000 * 30)
|
||||
DeleteEntity(clone)
|
||||
else
|
||||
GiveWeaponToPed(clone, "weapon_rpg", 1, false, true)
|
||||
TaskCombatPed(clone, PlayerPedId(), 0, 16)
|
||||
SetPedCombatAttributes(clone, 46, true)
|
||||
Wait(1000 * 30)
|
||||
DeleteEntity(clone)
|
||||
end
|
||||
else
|
||||
AlienEffect()
|
||||
end
|
||||
end)
|
||||
RegisterNetEvent("md-drugs:client:takemescaline", function()
|
||||
local chance, chance2 = math.random(1,100), math.random(1,100)
|
||||
local weapon = ''
|
||||
if chance2 == 100 then weapon = 'weapon_rpg' else weapon = 'weapon_flaregun' end
|
||||
if not progressbar(Lang.mescaline.eat, 4000, 'uncuff') then return end
|
||||
if chance <= Config.Badtrip then
|
||||
AlienEffect()
|
||||
local clone = ClonePed(PlayerPedId(), false, false, true)
|
||||
SetEntityAsMissionEntity(clone)
|
||||
SetPedFleeAttributes(clone, false)
|
||||
GiveWeaponToPed(clone, weapon, 1, false, true)
|
||||
TaskCombatPed(clone, PlayerPedId(), 0, 16)
|
||||
SetPedCombatAttributes(clone, 46, true)
|
||||
Wait(1000 * 30)
|
||||
DeleteEntity(clone)
|
||||
else
|
||||
AlienEffect()
|
||||
end
|
||||
end)
|
||||
@@ -1,9 +1,78 @@
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
local amonia = nil
|
||||
local tray = nil
|
||||
local heated = nil
|
||||
local active = nil
|
||||
|
||||
local function startcook()
|
||||
if not ItemCheck('empty_weed_bag') then return end
|
||||
if not ItemCheck('acetone') then return end
|
||||
if not ItemCheck('ephedrine') then return end
|
||||
if amonia == nil then
|
||||
active = true
|
||||
TriggerServerEvent("md-drugs:server:startcook")
|
||||
MethCooking()
|
||||
amonia = true
|
||||
else
|
||||
Notify(Lang.meth.inside, "error")
|
||||
end
|
||||
end
|
||||
|
||||
local function dials()
|
||||
if amonia == true then
|
||||
if not minigame() then
|
||||
AddExplosion(1005.773, -3200.402, -38.524, 49, 10, true, false, true)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
amonia = nil
|
||||
active = nil
|
||||
return end
|
||||
Notify(Lang.meth.increaseheat, "success")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
heated = true
|
||||
else
|
||||
end
|
||||
end
|
||||
|
||||
local function smash()
|
||||
if tray then
|
||||
tray = false
|
||||
DeleteObject(trays)
|
||||
local bucket = CreateObject("bkr_prop_meth_bigbag_03a", vector3(1012.85, -3194.29, -39.2), true, true, true)
|
||||
Freeze(bucket, true, 90.0)
|
||||
SmashMeth()
|
||||
Wait(100)
|
||||
AddSingleModel(bucket,
|
||||
{name = 'bucket',icon = "fa-solid fa-sack-xmark",label = Lang.targets.meth.bag, canInteract = function() if active == nil then return false end end,
|
||||
action = function()
|
||||
active = nil
|
||||
DeleteObject(bucket)
|
||||
amonia = nil
|
||||
heated = nil
|
||||
tray = nil
|
||||
BagMeth()
|
||||
TriggerServerEvent('md-drugs:server:getmeth')
|
||||
end,}, bucket)
|
||||
end
|
||||
end
|
||||
|
||||
local function trayscarry()
|
||||
if amonia then
|
||||
local pos = GetEntityCoords(PlayerPedId(), true)
|
||||
RequestAnimDict('anim@heists@box_carry@')
|
||||
while (not HasAnimDictLoaded('anim@heists@box_carry@')) do
|
||||
Wait(7)
|
||||
end
|
||||
TaskPlayAnim(PlayerPedId(), 'anim@heists@box_carry@', 'idle', 5.0, -1, -1, 50, 0, false, false,
|
||||
false)
|
||||
RequestModel("bkr_prop_meth_tray_02a")
|
||||
while not HasModelLoaded("bkr_prop_meth_tray_02a") do
|
||||
Wait(0)
|
||||
end
|
||||
trays = CreateObject("bkr_prop_meth_tray_02a", pos.x, pos.y, pos.z, true, true, true)
|
||||
AttachEntityToEntity(trays, PlayerPedId(), GetPedBoneIndex(PlayerPedId(), 28422), 0.01, -0.2,
|
||||
-0.2, 20.0, 0.0, 0.0, true, true, false, true, 1, true)
|
||||
tray = true
|
||||
end
|
||||
end
|
||||
CreateThread(function()
|
||||
BikerMethLab = exports['bob74_ipl']:GetBikerMethLabObject()
|
||||
BikerMethLab.Style.Set(BikerMethLab.Style.upgrade)
|
||||
@@ -13,230 +82,45 @@ CreateThread(function()
|
||||
end)
|
||||
|
||||
CreateThread(function()
|
||||
exports['qb-target']:AddBoxZone("methteleout", Config.MethTeleIn, 1.5, 1.75, { -- 963.37, .z-2122.95, 31.47
|
||||
name = "methteleout",
|
||||
heading = 11.0,
|
||||
debugPoly = false,
|
||||
minZ = Config.MethTeleIn.z - 2,
|
||||
maxZ = Config.MethTeleIn.z + 2,
|
||||
}, {
|
||||
options = {
|
||||
{
|
||||
name = 'teleout',
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "Enter Building",
|
||||
action = function()
|
||||
SetEntityCoords(PlayerPedId(), Config.MethTeleOut)
|
||||
end,
|
||||
|
||||
},
|
||||
},
|
||||
distance = 2.5
|
||||
})
|
||||
exports['qb-target']:AddBoxZone("methtelein", Config.MethTeleOut, 1.5, 1.75, { -- 963.37, .z-2122.95, 31.47
|
||||
name = "methtelein",
|
||||
heading = 11.0,
|
||||
debugPoly = false,
|
||||
minZ = Config.MethTeleOut.z - 2,
|
||||
maxZ = Config.MethTeleOut.z + 2,
|
||||
}, {
|
||||
options = {
|
||||
{
|
||||
name = 'teleout',
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "Exit Building",
|
||||
action = function()
|
||||
SetEntityCoords(PlayerPedId(), Config.MethTeleIn)
|
||||
end,
|
||||
|
||||
},
|
||||
},
|
||||
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
|
||||
name = "maze",
|
||||
heading = 11.0,
|
||||
debugPoly = false,
|
||||
minZ = 44 - 2,
|
||||
maxZ = 44 + 2,
|
||||
}, {
|
||||
options = {
|
||||
{
|
||||
name = 'die',
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "dont click this",
|
||||
action = function()
|
||||
SetEntityCoords(PlayerPedId(), vector3(-75.36, -837.24, 318.93))
|
||||
end,
|
||||
|
||||
},
|
||||
},
|
||||
distance = 2.5
|
||||
})
|
||||
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
|
||||
name = "ingridientsmeth",
|
||||
heading = 11.0,
|
||||
debugPoly = false,
|
||||
minZ = -39 - 2,
|
||||
maxZ = -39 + 2,
|
||||
}, {
|
||||
options = {
|
||||
{
|
||||
name = 'methcook',
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "Cook Meth",
|
||||
item = itemreqcook,
|
||||
action = function()
|
||||
if amonia == nil then
|
||||
amonia = true
|
||||
TriggerServerEvent("md-drugs:server:startcook")
|
||||
MethCooking()
|
||||
exports['qb-target']:AddBoxZone("adjustdials", vector3(1007.89, -3201.17, -38.99), 1.5, 1.75,
|
||||
{ -- 963.37, .z-2122.95, 31.47
|
||||
name = "adjustdials",
|
||||
heading = 11.0,
|
||||
debugPoly = false,
|
||||
minZ = -39 - 2,
|
||||
maxZ = -39 + 2,
|
||||
}, {
|
||||
options = {
|
||||
{
|
||||
name = 'adjustdials',
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "Adjust Dials",
|
||||
distance = 5,
|
||||
action = function()
|
||||
if amonia == true then
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
QBCore.Functions.Notify("Increasing Heat", "success")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
heated = true
|
||||
exports['qb-target']:RemoveZone("adjustdials")
|
||||
else
|
||||
AddExplosion(1005.773, -3200.402, -38.524, 49, 10, true, false, true, true)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
amonia = nil
|
||||
exports['qb-target']:RemoveZone("adjustdials")
|
||||
end
|
||||
end, 2, 8) -- NumberOfCircles,
|
||||
else
|
||||
end
|
||||
end,
|
||||
},
|
||||
},
|
||||
})
|
||||
else
|
||||
QBCore.Functions.Notify("Theres Stuff Inside", "error")
|
||||
end
|
||||
end,
|
||||
local config = lib.callback.await('md-drugs:server:getLocs', false)
|
||||
AddBoxZoneSingle("methTeleOut",config.singleSpot.MethTeleIn, {name = 'teleout', icon = "fa-solid fa-door-open", label = Lang.targets.meth.enter, action = function() SetEntityCoords(PlayerPedId(), config.singleSpot.MethTeleOut) end} )
|
||||
AddBoxZoneSingle("methtelein",config.singleSpot.MethTeleOut, {name = 'teleout', icon = "fa-solid fa-door-closed", label = Lang.targets.meth.exit, action = function() SetEntityCoords(PlayerPedId(), config.singleSpot.MethTeleIn) end} )
|
||||
local options = {
|
||||
{ name = 'methcook', icon = "fa-solid fa-temperature-high", label = Lang.targets.meth.cook, distance = 2.5, action = function() startcook() end,
|
||||
canInteract = function()
|
||||
if amonia == nil then
|
||||
return true
|
||||
end
|
||||
end,
|
||||
},
|
||||
{
|
||||
name = 'grabtray',
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "Grab Tray",
|
||||
distance = 5,
|
||||
action = function()
|
||||
if amonia then
|
||||
local pos = GetEntityCoords(PlayerPedId(), true)
|
||||
RequestAnimDict('anim@heists@box_carry@')
|
||||
while (not HasAnimDictLoaded('anim@heists@box_carry@')) do
|
||||
Wait(7)
|
||||
end
|
||||
TaskPlayAnim(PlayerPedId(), 'anim@heists@box_carry@', 'idle', 5.0, -1, -1, 50, 0, false, false,
|
||||
false)
|
||||
RequestModel("bkr_prop_meth_tray_02a")
|
||||
while not HasModelLoaded("bkr_prop_meth_tray_02a") do
|
||||
Wait(0)
|
||||
end
|
||||
local trays = CreateObject("bkr_prop_meth_tray_02a", pos.x, pos.y, pos.z, true, true, true)
|
||||
AttachEntityToEntity(trays, PlayerPedId(), GetPedBoneIndex(PlayerPedId(), 28422), 0.01, -0.2,
|
||||
-0.2, 20.0, 0.0, 0.0, true, true, false, true, 1, true)
|
||||
tray = true
|
||||
exports['qb-target']:AddBoxZone("boxmeth", vector3(1012.15, -3194.04, -39.20), 1.5, 1.75,
|
||||
{ -- 963.37, .z-2122.95, 31.47
|
||||
name = "boxmeth",
|
||||
heading = 3.0,
|
||||
debugPoly = false,
|
||||
minZ = -39 - 2,
|
||||
maxZ = -39 + 2,
|
||||
}, {
|
||||
options = {
|
||||
{
|
||||
name = 'boxmeth',
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "Box Up Meth",
|
||||
distance = 5,
|
||||
action = function()
|
||||
if tray then
|
||||
tray = false
|
||||
DeleteObject(trays)
|
||||
local bucket = CreateObject(`bkr_prop_meth_bigbag_03a`, vector3(1012.85, -3194.29, -39.2), true, true, true)
|
||||
SetEntityHeading(bucket, 90.0)
|
||||
SmashMeth()
|
||||
exports['qb-target']:RemoveZone("boxmeth")
|
||||
exports['qb-target']:AddTargetEntity(bucket, {
|
||||
options = {
|
||||
{
|
||||
name = 'bucket',
|
||||
icon = 'fa-solid fa-car',
|
||||
label = 'Bag Meth',
|
||||
action = function()
|
||||
DeleteObject(bucket)
|
||||
amonia = nil
|
||||
heated = nil
|
||||
tray = nil
|
||||
BagMeth()
|
||||
TriggerServerEvent('md-drugs:server:getmeth')
|
||||
end,
|
||||
|
||||
}
|
||||
},
|
||||
})
|
||||
end
|
||||
end,
|
||||
canInteract = function()
|
||||
if tray then return true end
|
||||
end,
|
||||
},
|
||||
},
|
||||
})
|
||||
end
|
||||
end,
|
||||
canInteract = function()
|
||||
if heated and amonia and tray == nil then return true end
|
||||
end,
|
||||
},
|
||||
if amonia == nil and active == nil then
|
||||
return true
|
||||
end
|
||||
end,
|
||||
},
|
||||
distance = 2.5
|
||||
})
|
||||
{ name = 'grabtray', icon = "fas fa-sign-in-alt", label = Lang.targets.meth.tray, distance = 2.5, action = function() trayscarry() end,
|
||||
canInteract = function()
|
||||
if heated and amonia and tray == nil then return true end
|
||||
end,
|
||||
},
|
||||
}
|
||||
AddBoxZoneMultiOptions("cookmeth",vector3(1005.72, -3200.33, -38.52), options )
|
||||
AddBoxZoneSingle('boxmeth', vector3(1012.15, -3194.04, -39.20), {name = 'boxmeth',icon = "fa-solid fa-weight-scale",label = Lang.targets.meth.box,action = function() smash()end,
|
||||
canInteract = function()
|
||||
if tray then return true end
|
||||
end})
|
||||
AddBoxZoneSingle('adjustdials',vector3(1007.89, -3201.17, -38.99),{ name = 'adjustdials', icon = "fa-solid fa-temperature-three-quarters", label = Lang.targets.meth.adjust,
|
||||
distance = 5, action = function() dials() end,
|
||||
canInteract = function()
|
||||
if amonia and heated == nil then return true end end
|
||||
})
|
||||
if Config.MethHeist == false then
|
||||
AddBoxZoneMulti('methep', config.MethEph, {icon = "fa-solid fa-bucket", label = Lang.targets.meth.eph, event = 'md-drugs:client:stealeph'})
|
||||
AddBoxZoneMulti('methace', config.Methace, {icon = "fa-solid fa-bucket", label = Lang.targets.meth.ace, event = 'md-drugs:client:stealace'})
|
||||
end
|
||||
end)
|
||||
|
||||
CreateThread(function()
|
||||
local current = "g_m_y_famdnf_01"
|
||||
lib.requestModel(current, Config.requestModelTime)
|
||||
local CurrentLocation = Config.MethHeistStart
|
||||
methdealer = CreatePed(0, current, CurrentLocation.x, CurrentLocation.y, CurrentLocation.z - 1, false, false)
|
||||
FreezeEntityPosition(methdealer, true)
|
||||
SetEntityHeading(methdealer, 220.0)
|
||||
SetEntityInvincible(methdealer, true)
|
||||
exports['qb-target']:AddTargetEntity(methdealer, {
|
||||
options = {
|
||||
{
|
||||
label = "Get Mission",
|
||||
icon = "fas fa-eye",
|
||||
action = function()
|
||||
SpawnMethCarPedChase()
|
||||
QBCore.Functions.Notify("Car Has Been Marked On Your Map", "success")
|
||||
end,
|
||||
},
|
||||
}
|
||||
})
|
||||
RegisterNetEvent("md-drugs:client:stealeph", function(data)
|
||||
if not progressbar('Stealing Ephedrine', 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:geteph", data.data)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:stealace", function(data)
|
||||
if not progressbar('Stealing Acetone', 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:getace", data.data)
|
||||
end)
|
||||
@@ -1,136 +1,74 @@
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
|
||||
local deliveryBlip = nil
|
||||
local PZone = nil
|
||||
local listen = false
|
||||
local carryPackage = nil
|
||||
|
||||
|
||||
RegisterNetEvent("md-drugs:client:getoxytruck")
|
||||
AddEventHandler("md-drugs:client:getoxytruck", function()
|
||||
if TriggerServerEvent('md-drugs:server:payfortruck') then
|
||||
end
|
||||
end)
|
||||
|
||||
function PolicecallOxy()
|
||||
print "Tell Your Dev They Didn't Follow The Readme"
|
||||
end
|
||||
|
||||
|
||||
RegisterNetEvent("md-drugs:Client:getoxylocation", function()
|
||||
local coords = Config.truckspawn
|
||||
local ModelHash = "burrito3" -- Use Compile-time hashes to get the hash of this model
|
||||
lib.requestModel(ModelHash, Config.requestModelTime)
|
||||
local oxycar = CreateVehicle(ModelHash,Config.truckspawn.x, Config.truckspawn.y,Config.truckspawn.z, Config.truckspawn.h, true, false)
|
||||
SetEntityHeading(oxycar, coords.w)
|
||||
RegisterNetEvent("md-drugs:client:GetOxyCar", function()
|
||||
lib.requestModel("burrito3", Config.RequestModelTime)
|
||||
local paid = lib.callback.await('md-drugs:server:payfortruck', false)
|
||||
if not paid then return end
|
||||
local loca = lib.callback.await('md-drugs:server:getLocs', false)
|
||||
local loc = loca.singleSpot.truckspawn
|
||||
local oxycar = CreateVehicle("burrito3",loc.x, loc.y,loc.z, loc.w, true, false)
|
||||
exports[Config.Fuel]:SetFuel(oxycar, 100.0)
|
||||
TriggerEvent("vehiclekeys:client:SetOwner", QBCore.Functions.GetPlate(oxycar))
|
||||
TriggerEvent('QBCore:Notify', 'Your truck is here', 'success')
|
||||
TriggerEvent("vehiclekeys:client:SetOwner", GetVehicleNumberPlateText(oxycar))
|
||||
Notify(Lang.oxy.truck, 'success')
|
||||
TriggerEvent("md-drugs:client:getoxylocationroute")
|
||||
SetVehicleEngineOn(oxycar, true, true)
|
||||
exports['qb-target']:AddTargetEntity(oxycar, {
|
||||
options = {
|
||||
{
|
||||
event = "md-drugs:client:getfromtrunk",
|
||||
icon = "fas fa-box-circle-check",
|
||||
label = "Get Package",
|
||||
},
|
||||
}
|
||||
})
|
||||
AddSingleModel(oxycar, { event = "md-drugs:client:getfromtrunk", icon = "fa-solid fa-box", label = Lang.targets.oxy.pack}, nil )
|
||||
end)
|
||||
|
||||
|
||||
RegisterNetEvent("md-drugs:client:getoxylocationroute")
|
||||
AddEventHandler("md-drugs:client:getoxylocationroute", function()
|
||||
Wait(100)
|
||||
local unlucky = math.random(1,100)
|
||||
local CurrentLocation = Config.oxylocations[math.random(#Config.oxylocations)]
|
||||
local unluck = math.random(1,100)
|
||||
if deliveryBlip ~= nil then
|
||||
RemoveBlip(deliveryBlip)
|
||||
end
|
||||
if CurrentLocation ~= nil then
|
||||
deliveryBlip = AddBlipForCoord(CurrentLocation)
|
||||
SetBlipSprite(deliveryBlip, 1)
|
||||
SetBlipDisplay(deliveryBlip, 2)
|
||||
SetBlipScale(deliveryBlip, 1.0)
|
||||
SetBlipAsShortRange(deliveryBlip, false)
|
||||
SetBlipColour(deliveryBlip, 27)
|
||||
BeginTextCommandSetBlipName("STRING")
|
||||
AddTextComponentSubstringPlayerName("drug Meet")
|
||||
EndTextCommandSetBlipName(deliveryBlip)
|
||||
SetBlipRoute(deliveryBlip, true)
|
||||
oxyzone = lib.zones.sphere({
|
||||
coords = CurrentLocation,
|
||||
radius = 2,
|
||||
onEnter = function()
|
||||
RemoveBlip(deliveryBlip)
|
||||
end,
|
||||
})
|
||||
RegisterNetEvent("md-drugs:client:getoxylocationroute", function()
|
||||
local config = lib.callback.await('md-drugs:server:getLocs', false)
|
||||
local loc = config.oxylocations[math.random(#config.oxylocations)]
|
||||
if loc ~= nil then
|
||||
SetNewWaypoint(loc.x, loc.y)
|
||||
local current = "g_m_y_famdnf_01"
|
||||
lib.requestModel(current, Config.RequestModelTime)
|
||||
local oxybuyer = CreatePed(0, current,loc.x,loc.y,loc.z-1, loc.w, false, false)
|
||||
Freeze(oxybuyer, true, loc.w)
|
||||
repeat
|
||||
Wait(1000)
|
||||
until #(GetEntityCoords(PlayerPedId()) - vector3(loc.x,loc.y,loc.z)) < 5.0
|
||||
PoliceCall(Config.PoliceAlertOxy)
|
||||
AddSingleModel(oxybuyer, { type = "client", label = Lang.targets.oxy.talk, icon = "fa-solid fa-dollar-sign",
|
||||
action = function()
|
||||
if carryPackage then
|
||||
if not progressbar(Lang.oxy.hand, 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:giveoxybox")
|
||||
DeleteEntity(oxybuyer)
|
||||
DetachEntity(carryPackage, true, true)
|
||||
DeleteObject(carryPackage)
|
||||
carryPackage = nil
|
||||
else
|
||||
Notify(Lang.oxy.empty, "error")
|
||||
end
|
||||
end}, oxybuyer)
|
||||
end
|
||||
if unlucky <= Config.PoliceAlertOxy then
|
||||
PolicecallOxy()
|
||||
end
|
||||
local current = "g_m_y_famdnf_01"
|
||||
lib.requestModel(current, Config.requestModelTime)
|
||||
oxybuyer = CreatePed(0, current,CurrentLocation.x,CurrentLocation.y,CurrentLocation.z-1, false, false)
|
||||
SetEntityHeading(oxybuyer, 180)
|
||||
FreezeEntityPosition(oxybuyer, true)
|
||||
SetEntityInvincible(oxybuyer, true)
|
||||
exports['qb-target']:AddTargetEntity(oxybuyer, {
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
label = "Talk To Buyer",
|
||||
icon = "fas fa-eye",
|
||||
event = "md-drugs:client:giveoxybox"
|
||||
},
|
||||
}
|
||||
})
|
||||
end)
|
||||
|
||||
|
||||
|
||||
RegisterNetEvent("md-drugs:client:getfromtrunk")
|
||||
AddEventHandler("md-drugs:client:getfromtrunk", function()
|
||||
RegisterNetEvent("md-drugs:client:getfromtrunk", function()
|
||||
if carryPackage then
|
||||
QBCore.Functions.Notify("You Cant Carry More Than One", "error")
|
||||
else
|
||||
local pos = GetEntityCoords(PlayerPedId(), true)
|
||||
RequestAnimDict('anim@heists@box_carry@')
|
||||
while (not HasAnimDictLoaded('anim@heists@box_carry@')) do
|
||||
Wait(7)
|
||||
end
|
||||
Notify(Lang.oxy.cantcarry, "error")
|
||||
else
|
||||
local pos = GetEntityCoords(PlayerPedId(), true)
|
||||
lib.requestAnimDict('anim@heists@box_carry@')
|
||||
TaskPlayAnim(PlayerPedId(), 'anim@heists@box_carry@', 'idle', 5.0, -1, -1, 50, 0, false, false, false)
|
||||
RequestModel("hei_prop_drug_statue_box_big")
|
||||
while not HasModelLoaded("hei_prop_drug_statue_box_big") do
|
||||
Wait(0)
|
||||
end
|
||||
lib.RequestModel("hei_prop_drug_statue_box_big")
|
||||
local object = CreateObject("hei_prop_drug_statue_box_big", pos.x, pos.y, pos.z, true, true, true)
|
||||
AttachEntityToEntity(object, PlayerPedId(), GetPedBoneIndex(PlayerPedId(), 57005), 0.05, 0.1, -0.3, 300.0, 250.0, 20.0, true, true, false, true, 1, true)
|
||||
carryPackage = object
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:giveoxybox")
|
||||
AddEventHandler("md-drugs:client:giveoxybox", function()
|
||||
if carryPackage then
|
||||
QBCore.Functions.Progressbar("drink_something", "handing over oxy", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
TriggerServerEvent("md-drugs:server:giveoxybox")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
DeleteEntity(oxybuyer)
|
||||
DetachEntity(carryPackage, true, true)
|
||||
DeleteObject(carryPackage)
|
||||
carryPackage = nil
|
||||
end)
|
||||
else
|
||||
QBCore.Functions.Notify("cant be empty handed idiot", "error")
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
RegisterNetEvent("md-drugs:client:giveoxybox", function(data)
|
||||
if carryPackage then
|
||||
if not progressbar(Lang.oxy.hand, 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:giveoxybox")
|
||||
DeleteEntity(data.ped)
|
||||
DetachEntity(carryPackage, true, true)
|
||||
DeleteObject(carryPackage)
|
||||
carryPackage = nil
|
||||
else
|
||||
Notify(Lang.oxy.empty, "error")
|
||||
end
|
||||
end)
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
|
||||
CreateThread(function()
|
||||
local config = lib.callback.await('md-drugs:server:getLocs', false)
|
||||
local num = lib.callback.await('md-drugs:server:GetMerchant', false)
|
||||
local model = {"g_m_y_famdnf_01", 's_m_m_doctor_01', 'u_m_m_jesus_01', "prop_cooker_03"}
|
||||
for k, v in pairs (model) do
|
||||
lib.requestModel(v, Config.RequestModelTime)
|
||||
end
|
||||
local tabdealer = CreatePed(0, 'g_m_y_famdnf_01',config.singleSpot.buylsdlabkit.x,config.singleSpot.buylsdlabkit.y,config.singleSpot.buylsdlabkit.z-1,config.singleSpot.buylsdlabkit.w, false, false)
|
||||
local heroinkitdealer = CreatePed(0,"g_m_y_famdnf_01",config.singleSpot.buyheroinlabkit.x, config.singleSpot.buyheroinlabkit.y, config.singleSpot.buyheroinlabkit.z-1, config.singleSpot.buyheroinlabkit.w, false, false)
|
||||
local SyrupLocation = CreatePed(0, 's_m_m_doctor_01', config.singleSpot.SyrupVendor.x,config.singleSpot.SyrupVendor.y,config.singleSpot.SyrupVendor.z-1, config.singleSpot.SyrupVendor.w, false, false)
|
||||
local WeedGuy = CreatePed(0,'u_m_m_jesus_01',config.singleSpot.WeedSaleman.x,config.singleSpot.WeedSaleman.y,config.singleSpot.WeedSaleman.z-1, config.singleSpot.WeedSaleman.w, false, false)
|
||||
local methdealer = CreatePed(0, "g_m_y_famdnf_01", config.singleSpot.MethHeistStart.x, config.singleSpot.MethHeistStart.y, config.singleSpot.MethHeistStart.z - 1, false, false)
|
||||
local travellingmerchant = CreatePed(0, "g_m_y_famdnf_01",num.x,num.y,num.z-1, num.w, false, false)
|
||||
Freeze(tabdealer, true,config.singleSpot.buylsdlabkit.w)
|
||||
Freeze(SyrupLocation, true, config.singleSpot.SyrupVendor.w)
|
||||
Freeze(heroinkitdealer, true, config.singleSpot.buyheroinlabkit.w)
|
||||
Freeze(WeedGuy, true, config.singleSpot.WeedSaleman.w)
|
||||
Freeze(methdealer, true, 220.0)
|
||||
Freeze(travellingmerchant, true, num.w)
|
||||
AddSingleModel(tabdealer,{ type = "client", label = Lang.targets.lsd.buy, icon = "fa-solid fa-money-bill", event = "md-drugs:client:buylabkit", distance = 2.0}, tabdealer )
|
||||
AddSingleModel(heroinkitdealer, { label = Lang.targets.heroin.kit, icon = "fa-solid fa-money-bill", event = "md-drugs:client:buyheroinlabkit", distance = 2.0}, nil )
|
||||
AddSingleModel(SyrupLocation, { type = "client", label = Lang.targets.lean.git, icon = "fa-solid fa-circle-info", event = "md-drugs:client:getsyruplocationtobuy", distance = 2.0}, nil )
|
||||
AddSingleModel(WeedGuy, {label = "Weed Shop",icon = "fa-solid fa-cannabis", action = function() makeMenu('WeedShop') lib.showContext('WeedShop')end}, nil)
|
||||
AddSingleModel(methdealer,{label = Lang.targets.meth.mission, icon = "fa-solid fa-circle-info", action = function() Notify(Lang.meth.mission, "success") SpawnMethCarPedChase() end,},nil )
|
||||
AddSingleModel(travellingmerchant, {label = Lang.targets.travel.travel, icon = "fa-solid fa-cart-shopping", action = function() makeMenu('travellingMerchant') lib.showContext('travellingMerchant') end}, nil)
|
||||
end)
|
||||
@@ -1,157 +1,20 @@
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
|
||||
RegisterCommand('prescriptionpad', function()
|
||||
if QBCore.Functions.GetPlayerData().job.name == Config.PharmaJob then
|
||||
lib.registerContext({
|
||||
id = 'prescriptionpad',
|
||||
title = "Prescription Pad",
|
||||
options = {
|
||||
{
|
||||
title = 'Give Vicodin',
|
||||
description = 'Give Vicodin ',
|
||||
icon = 'fa-solid fa-file-prescription',
|
||||
event = 'md-drugs:client:givevicodinprescription',
|
||||
},
|
||||
{
|
||||
title = 'Give Adderal',
|
||||
description = 'Give Adderal ',
|
||||
icon = 'fa-solid fa-file-prescription',
|
||||
event = 'md-drugs:client:giveadderalprescription',
|
||||
},
|
||||
{
|
||||
title = 'Give Morphine',
|
||||
description = 'Give Morphine ',
|
||||
icon = 'fa-solid fa-file-prescription',
|
||||
event = 'md-drugs:client:givemorphineprescription',
|
||||
|
||||
},
|
||||
{
|
||||
title = 'Give Xanax',
|
||||
description = 'Give Vicodin ',
|
||||
icon = 'fa-solid fa-file-prescription',
|
||||
event = 'md-drugs:client:givexanaxprescription',
|
||||
},
|
||||
}
|
||||
})
|
||||
lib.showContext('prescriptionpad')
|
||||
else
|
||||
QBCore.Functions.Notify("Youre Not A Medical Person", "error")
|
||||
end
|
||||
lib.callback.register("md-drugs:client:prescriptionpad", function(data, op)
|
||||
if getJobType() ~= 'ems' then return end
|
||||
local input = lib.inputDialog('Who To Give A Prescription To?',{
|
||||
{type = 'select', label = 'Player Name', options = data},
|
||||
{type = 'select', label = 'Prescription', options = op}})
|
||||
if not input[1] then return end
|
||||
if not progressbar(Lang.Pharma.write, 4000, 'notepad') then return end
|
||||
return {who = input[1], what = input[2]}
|
||||
end)
|
||||
|
||||
|
||||
RegisterNetEvent("md-drugs:client:givevicodinprescription")
|
||||
AddEventHandler("md-drugs:client:givevicodinprescription", function()
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
QBCore.Functions.Progressbar("drink_something", "Getting The Prescription Written", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
TriggerServerEvent("md-drugs:server:givevicodinprescription")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
end)
|
||||
RegisterNetEvent("md-drugs:client:giveadderalprescription")
|
||||
AddEventHandler("md-drugs:client:giveadderalprescription", function()
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
QBCore.Functions.Progressbar("drink_something", "Getting The Prescription Written", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
TriggerServerEvent("md-drugs:server:giveadderalprescription")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
RegisterNetEvent("md-drugs:client:fillprescription", function(data)
|
||||
if not progressbar(Lang.Pharma.fill, 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:fillprescription", data.data)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:givemorphineprescription")
|
||||
AddEventHandler("md-drugs:client:givemorphineprescription", function()
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
QBCore.Functions.Progressbar("drink_something", "Getting The Prescription Written", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
TriggerServerEvent("md-drugs:server:givemorphineprescription")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
end)
|
||||
RegisterNetEvent("md-drugs:client:givexanaxprescription")
|
||||
AddEventHandler("md-drugs:client:givexanaxprescription", function()
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
QBCore.Functions.Progressbar("drink_something", "Getting The Prescription Written", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
TriggerServerEvent("md-drugs:server:givexanaxprescription")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:fillprescription")
|
||||
AddEventHandler("md-drugs:client:fillprescription", function()
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
QBCore.Functions.Progressbar("drink_something", "Picking Up Your Prescription", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
TriggerServerEvent("md-drugs:server:fillprescription")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:openingvicodin")
|
||||
AddEventHandler("md-drugs:client:openingvicodin", function()
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
QBCore.Functions.Progressbar("drink_something", "Opening Bottle", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
end)
|
||||
|
||||
|
||||
RegisterNetEvent('md-drugs:client:takepharma', function(itemName)
|
||||
QBCore.Functions.Progressbar("use_lsd", "Get Pain Relief!", 1750, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
}, {
|
||||
animDict = "mp_suicide",
|
||||
anim = "pill",
|
||||
flags = 49,
|
||||
}, {}, {}, function() -- Done
|
||||
StopAnimTask(PlayerPedId(), "mp_suicide", "pill", 1.0)
|
||||
|
||||
if itemName == "vicodin" then
|
||||
exports['ps-buffs']:AddHealthBuff(10000, 20)
|
||||
elseif itemName == "adderal" then
|
||||
exports['ps-buffs']:StaminaBuffEffect(5000, 1.3)
|
||||
elseif itemName == "xanax" then
|
||||
exports['ps-buffs']:AddStressBuff(10000, 25)
|
||||
else
|
||||
exports['ps-buffs']:AddHealthBuff(10000, 40)
|
||||
end
|
||||
end, function() -- Cancel
|
||||
StopAnimTask(PlayerPedId(), "mp_suicide", "pill", 1.0)
|
||||
QBCore.Functions.Notify("Canceled", "error")
|
||||
end)
|
||||
lib.callback.register("md-drugs:client:unbottle", function()
|
||||
if not progressbar(Lang.Pharma.open, 4000, 'uncuff') then return end
|
||||
return true
|
||||
end)
|
||||
@@ -1,52 +1,29 @@
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
local shrooms = {}
|
||||
|
||||
|
||||
function LoadModel(hash)
|
||||
local function LoadModels(hash)
|
||||
hash = GetHashKey(hash)
|
||||
RequestModel(hash)
|
||||
while not HasModelLoaded(hash) do
|
||||
Wait(3000)
|
||||
local timeout = GetGameTimer() + 5000 -- 5-second timeout
|
||||
while not HasModelLoaded(hash) and GetGameTimer() < timeout do
|
||||
Wait(10)
|
||||
end
|
||||
if HasModelLoaded(hash) then return true end
|
||||
end
|
||||
|
||||
local function pick(loc)
|
||||
if not progressbar(Lang.Shrooms.pick, 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("shrooms:pickupCane", loc)
|
||||
end
|
||||
|
||||
RegisterNetEvent('shrooms:respawnCane', function(loc)
|
||||
local v = GlobalState.shrooms[loc]
|
||||
local hash = GetHashKey(v.model)
|
||||
--if not HasModelLoaded(hash) then LoadModel(hash) end
|
||||
if not shrooms[loc] then
|
||||
shrooms[loc] = CreateObject(hash, v.location, false, true, true)
|
||||
SetEntityAsMissionEntity(shrooms[loc], true, true)
|
||||
FreezeEntityPosition(shrooms[loc], true)
|
||||
SetEntityHeading(shrooms[loc], v.heading)
|
||||
exports['qb-target']:AddTargetEntity(shrooms[loc], {
|
||||
options = { {
|
||||
icon = "fas fa-hand",
|
||||
label = "pick shrooms",
|
||||
action = function()
|
||||
QBCore.Functions.Progressbar("pick_cane", "picking shrooms", 2000, false, true, {
|
||||
disableMovement = true, disableCarMovement = true, disableMouse = false, disableCombat = true, },
|
||||
{ animDict = 'amb@prop_human_bum_bin@idle_a', anim = 'idle_a', flags = 47, },
|
||||
{}, {}, function()
|
||||
TriggerServerEvent("shrooms:pickupCane", loc)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end, function() -- Cancel
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
end
|
||||
}
|
||||
},
|
||||
distance = 3.0
|
||||
})
|
||||
Freeze(shrooms[loc], true, v.heading)
|
||||
AddSingleModel(shrooms[loc],{ icon = "fas fa-hand", label = Lang.targets.shrooms.pick, action = function() pick(loc) end }, loc )
|
||||
end
|
||||
end)
|
||||
AddEventHandler('onResourceStart', function(resource)
|
||||
if resource == GetCurrentResourceName() then
|
||||
Wait(3000)
|
||||
LoadModel('mushroom')
|
||||
TriggerEvent('shrooms:init')
|
||||
end
|
||||
end)
|
||||
|
||||
AddEventHandler('onResourceStop', function(resourceName)
|
||||
if GetCurrentResourceName() == resourceName then
|
||||
@@ -64,63 +41,20 @@ RegisterNetEvent('shrooms:removeCane', function(loc)
|
||||
shrooms[loc] = nil
|
||||
end)
|
||||
|
||||
RegisterNetEvent('QBCore:Client:OnPlayerLoaded', function()
|
||||
Wait(3000)
|
||||
LoadModel('mushroom')
|
||||
TriggerEvent('shrooms:init')
|
||||
end)
|
||||
|
||||
|
||||
RegisterNetEvent("shrooms:init", function()
|
||||
RegisterNetEvent("shrooms:init", function()
|
||||
for k, v in pairs (GlobalState.shrooms) do
|
||||
local hash = GetHashKey(v.model)
|
||||
if not HasModelLoaded(hash) then LoadModel(hash) end
|
||||
if not HasModelLoaded(hash) then LoadModels(hash) end
|
||||
if not v.taken then
|
||||
shrooms[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z, false, true, true)
|
||||
SetEntityAsMissionEntity(shrooms[k], true, true)
|
||||
FreezeEntityPosition(shrooms[k], true)
|
||||
SetEntityHeading(shrooms[k], v.heading)
|
||||
exports['qb-target']:AddTargetEntity(shrooms[k], {
|
||||
options = { {
|
||||
icon = "fas fa-hand",
|
||||
label = "Pick shrooms",
|
||||
action = function()
|
||||
QBCore.Functions.Progressbar("pick_cane", "Picking Shrooms", 2000, false, true, {
|
||||
disableMovement = true, disableCarMovement = true, disableMouse = false, disableCombat = true, },
|
||||
{ animDict = 'amb@prop_human_bum_bin@idle_a', anim = 'idle_a', flags = 47, },
|
||||
{}, {}, function()
|
||||
TriggerServerEvent("shrooms:pickupCane", k)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end, function() -- Cancel
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
end
|
||||
}
|
||||
},
|
||||
distance = 3.0
|
||||
})
|
||||
Freeze(shrooms[k], true, v.heading)
|
||||
AddSingleModel(shrooms[k],{ icon = "fas fa-hand", label = Lang.targets.shrooms.pick, action = function() pick(k) end }, k )
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
RegisterNetEvent('md-drugs:client:takeshrooms', function()
|
||||
QBCore.Functions.Progressbar("use_lsd", "Have Fun!", 1750, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
}, {
|
||||
animDict = "mp_suicide",
|
||||
anim = "pill",
|
||||
flags = 49,
|
||||
}, {}, {}, function() -- Done
|
||||
StopAnimTask(PlayerPedId(), "mp_suicide", "pill", 1.0)
|
||||
TriggerEvent("evidence:client:SetStatus", "widepupils", 300)
|
||||
EcstasyEffect()
|
||||
-- exports["qb-smallresources"]:DoAcid(240000)
|
||||
end, function() -- Cancel
|
||||
StopAnimTask(PlayerPedId(), "mp_suicide", "pill", 1.0)
|
||||
QBCore.Functions.Notify("Canceled", "error")
|
||||
end)
|
||||
if not progressbar(Lang.Shrooms.eat, 500, 'eat') then return end
|
||||
TriggerEvent("evidence:client:SetStatus", "widepupils", 300)
|
||||
EcstasyEffect()
|
||||
end)
|
||||
@@ -1,687 +1,24 @@
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
|
||||
CreateThread(function()
|
||||
if Config.oxtarget then
|
||||
coketelein = exports.ox_target:addBoxZone({
|
||||
coords = Config.CokeTeleIn,
|
||||
size = vec(1,1,3),
|
||||
rotation = 0,
|
||||
debug = false,
|
||||
options = {
|
||||
{
|
||||
name = 'teleout',
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "Enter Building",
|
||||
distance = 5,
|
||||
onSelect = function()
|
||||
DoScreenFadeOut(500)
|
||||
Wait(1000)
|
||||
SetEntityCoords(PlayerPedId(),Config.CokeTeleOut.x, Config.CokeTeleOut.y, Config.CokeTeleOut.z)
|
||||
Wait(1000)
|
||||
DoScreenFadeIn(500)
|
||||
end,
|
||||
|
||||
},
|
||||
},
|
||||
})
|
||||
coketeleout = exports.ox_target:addBoxZone({
|
||||
coords = Config.CokeTeleOut,
|
||||
size = vec(1,1,3),
|
||||
rotation = 0,
|
||||
debug = false,
|
||||
options = {
|
||||
{
|
||||
name = 'teleout',
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "Exit Building",
|
||||
distance = 5,
|
||||
onSelect = function()
|
||||
DoScreenFadeOut(500)
|
||||
Wait(500)
|
||||
SetEntityCoords(PlayerPedId(),Config.CokeTeleIn)
|
||||
Wait(500)
|
||||
DoScreenFadeIn(500)
|
||||
end,
|
||||
|
||||
},
|
||||
},
|
||||
})
|
||||
exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47
|
||||
coords = vector3(1087.16, -3195.46, -38.99),
|
||||
size = vec3(2,2,2),
|
||||
debugPoly = false,
|
||||
rotation = 45,
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:makepowder",
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "chop it up",
|
||||
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
------------- lsd
|
||||
exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47
|
||||
coords = Config.lysergicacid,
|
||||
size = vec3(2,2,2),
|
||||
debugPoly = false,
|
||||
rotation = 45,
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:getlysergic",
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "stealing",
|
||||
},
|
||||
},
|
||||
})
|
||||
exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47
|
||||
coords = Config.diethylamide,
|
||||
size = vec3(2,2,2),
|
||||
debugPoly = false,
|
||||
rotation = 45,
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:getdiethylamide",
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "stealing",
|
||||
},
|
||||
},
|
||||
})
|
||||
exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47
|
||||
coords = Config.gettabs,
|
||||
size = vec3(2,2,2),
|
||||
debugPoly = false,
|
||||
rotation = 45,
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:buytabs",
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "Buy Tabs",
|
||||
|
||||
},
|
||||
},
|
||||
})
|
||||
------ heroin
|
||||
exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47
|
||||
coords = Config.dryplant,
|
||||
size = vec3(2,2,2),
|
||||
debugPoly = false,
|
||||
rotation = 45,
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:dryplant",
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "Dry out",
|
||||
|
||||
},
|
||||
},
|
||||
})
|
||||
exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47
|
||||
coords = Config.cutheroinone,
|
||||
size = vec3(2,2,2),
|
||||
debugPoly = false,
|
||||
rotation = 45,
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:cutheroin",
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "Cut Heroin",
|
||||
|
||||
},
|
||||
},
|
||||
})
|
||||
exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47
|
||||
coords = Config.fillneedle,
|
||||
size = vec3(2,2,2),
|
||||
debugPoly = false,
|
||||
rotation = 45,
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:fillneedle",
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "Fill Needles",
|
||||
|
||||
},
|
||||
},
|
||||
})
|
||||
------- crack
|
||||
exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47
|
||||
coords = Config.makecrack,
|
||||
size = vec3(2,2,2),
|
||||
debugPoly = false,
|
||||
rotation = 45,
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:makecrackone",
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "cook some crack",
|
||||
},
|
||||
},
|
||||
})
|
||||
exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47
|
||||
coords = Config.bagcrack,
|
||||
size = vec3(2,2,2),
|
||||
debugPoly = false,
|
||||
rotation = 45,
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:bagcrack",
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "bag some crack",
|
||||
|
||||
},
|
||||
},
|
||||
})
|
||||
------- pharma
|
||||
exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47
|
||||
coords = Config.FillPrescription,
|
||||
size = vec3(2,2,2),
|
||||
debugPoly = false,
|
||||
rotation = 45,
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:fillprescription",
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "Fill Prescription",
|
||||
},
|
||||
},
|
||||
})
|
||||
-------- oxy runs
|
||||
exports.ox_target:addBoxZone({
|
||||
coords = Config.Payfortruck,
|
||||
size = vec3(2,2,2),
|
||||
debugPoly = false,
|
||||
rotation = 45,
|
||||
options = {
|
||||
{
|
||||
event = "md-drugs:client:getoxytruck",
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "Pay For Truck",
|
||||
},
|
||||
}
|
||||
})
|
||||
------------ mescaline
|
||||
exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47
|
||||
coords = Config.DryOut,
|
||||
size = vec3(2,2,2),
|
||||
debugPoly = false,
|
||||
rotation = 45,
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:drymescaline",
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "Dry Out",
|
||||
|
||||
},
|
||||
},
|
||||
})
|
||||
exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47
|
||||
coords = Config.isosafrole,
|
||||
size = vec3(2,2,2),
|
||||
debugPoly = false,
|
||||
rotation = 45,
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:stealisosafrole",
|
||||
icon = 'fas fa-sign-in-alt',
|
||||
label = 'Steal Isosafrole',
|
||||
},
|
||||
},
|
||||
})
|
||||
exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47
|
||||
coords = Config.mdp2p,
|
||||
size = vec3(2,2,2),
|
||||
debugPoly = false,
|
||||
rotation = 45,
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:stealmdp2p",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Steal mdp2p',
|
||||
},
|
||||
},
|
||||
})
|
||||
exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47
|
||||
coords = Config.rawxtcloc,
|
||||
size = vec3(2,2,2),
|
||||
debugPoly = false,
|
||||
rotation = 45,
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:makingrawxtc",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Make Raw XTC',
|
||||
},
|
||||
},
|
||||
})
|
||||
exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47
|
||||
coords = Config.buypress,
|
||||
size = vec3(2,2,2),
|
||||
debugPoly = false,
|
||||
rotation = 45,
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:buypress",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Buy Press',
|
||||
},
|
||||
},
|
||||
})
|
||||
exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47
|
||||
coords = Config.stamp,
|
||||
size = vec3(2,2,2),
|
||||
debugPoly = false,
|
||||
rotation = 45,
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:stampwhite",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Make White Stamped Pills',
|
||||
},
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:stampred",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Make Red Stamped Pills',
|
||||
},
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:stamporange",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Make Orange Stamped Pills',
|
||||
},
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:stampblue",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Make Blue Stamped Pills',
|
||||
},
|
||||
},
|
||||
})
|
||||
--------------------------------------- XTC
|
||||
else
|
||||
|
||||
exports['qb-target']:AddBoxZone("coketelein",Config.CokeTeleIn,1.5, 1.75, { -- 963.37, -2122.95, 31.47
|
||||
name = "coketelein",
|
||||
heading = 156.0,
|
||||
debugPoly = false,
|
||||
minZ = Config.CokeTeleIn.z-2,
|
||||
maxZ = Config.CokeTeleIn.z+2,
|
||||
}, {
|
||||
options = {
|
||||
{
|
||||
name = 'teleout',
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "Enter Building",
|
||||
action = function()
|
||||
DoScreenFadeOut(500)
|
||||
Wait(500)
|
||||
SetEntityCoords(PlayerPedId(),Config.CokeTeleOut)
|
||||
Wait(500)
|
||||
DoScreenFadeIn(500)
|
||||
end,
|
||||
|
||||
},
|
||||
},
|
||||
})
|
||||
exports['qb-target']:AddBoxZone("CokeTeleOut",Config.CokeTeleOut,1.5, 1.75, { -- 963.37, -2122.95, 31.47
|
||||
name = "CokeTeleOut",
|
||||
heading = 156.0,
|
||||
debugPoly = false,
|
||||
minZ = Config.CokeTeleOut.z-2,
|
||||
maxZ = Config.CokeTeleOut.z+2,
|
||||
}, {
|
||||
options = {
|
||||
{
|
||||
name = 'teleout',
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "Exit Building",
|
||||
action = function()
|
||||
DoScreenFadeOut(500)
|
||||
Wait(500)
|
||||
SetEntityCoords(PlayerPedId(),Config.CokeTeleIn)
|
||||
Wait(500)
|
||||
DoScreenFadeIn(500)
|
||||
end,
|
||||
|
||||
},
|
||||
},
|
||||
})
|
||||
exports['qb-target']:AddBoxZone("makepowder",Config.MakePowder,1.5, 1.75, { -- 963.37, -2122.95, 31.47
|
||||
name = "makepowder",
|
||||
heading = 156.0,
|
||||
debugPoly = false,
|
||||
minZ = Config.MakePowder.z-2,
|
||||
maxZ = Config.MakePowder.z+2,
|
||||
}, {
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:makepowder",
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "chop it up",
|
||||
|
||||
},
|
||||
},
|
||||
})
|
||||
----- LSD
|
||||
exports['qb-target']:AddBoxZone("getlysergic",Config.lysergicacid,1.5, 1.75, { -- 963.37, -2122.95, 31.47
|
||||
name = "getlysergic",
|
||||
heading = 156.0,
|
||||
debugPoly = false,
|
||||
minZ = Config.lysergicacid.z-2,
|
||||
maxZ = Config.lysergicacid.z+2,
|
||||
}, {
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:getlysergic",
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "stealing",
|
||||
},
|
||||
},
|
||||
distance = 2.5
|
||||
})
|
||||
exports['qb-target']:AddBoxZone("getdiethylamide",Config.diethylamide,1.5, 1.75, { -- 963.37, -2122.95, 31.47
|
||||
name = "getdiethylamide",
|
||||
heading = 156.0,
|
||||
debugPoly = false,
|
||||
minZ = Config.diethylamide.z-2,
|
||||
maxZ = Config.diethylamide.z+2,
|
||||
}, {
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:getdiethylamide",
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "stealing",
|
||||
},
|
||||
},
|
||||
distance = 2.5
|
||||
})
|
||||
exports['qb-target']:AddBoxZone("buylabkit2",Config.gettabs,1.5, 1.75, { -- 963.37, -2122.95, 31.47
|
||||
name = "buylabkit2",
|
||||
heading = 156.0,
|
||||
debugPoly = false,
|
||||
minZ = Config.gettabs.z-2,
|
||||
maxZ = Config.gettabs.z+2,
|
||||
}, {
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:buytabs",
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "Buy Tabs",
|
||||
|
||||
},
|
||||
},
|
||||
distance = 2.5
|
||||
})
|
||||
exports['qb-target']:AddBoxZone("dryplant",Config.dryplant,1.5, 1.75, { -- 963.37, -2122.95, 31.47
|
||||
name = "dryplant",
|
||||
heading = 156.0,
|
||||
debugPoly = false,
|
||||
minZ = Config.dryplant.z-2,
|
||||
maxZ = Config.dryplant.z+2,
|
||||
}, {
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:dryplant",
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "Dry out",
|
||||
|
||||
},
|
||||
},
|
||||
distance = 2.5
|
||||
})
|
||||
exports['qb-target']:AddBoxZone("cutheroin",Config.cutheroinone,1.5, 1.75, { -- 963.37, -2122.95, 31.47
|
||||
name = "cutheroin",
|
||||
heading = 156.0,
|
||||
debugPoly = false,
|
||||
minZ = Config.cutheroinone.z-2,
|
||||
maxZ = Config.cutheroinone.z+2,
|
||||
}, {
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:cutheroin",
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "Cut Heroin",
|
||||
|
||||
},
|
||||
},
|
||||
distance = 2.5
|
||||
})
|
||||
|
||||
exports['qb-target']:AddBoxZone("fillneedle",Config.fillneedle,1.5, 1.75, { -- 963.37, -2122.95, 31.47
|
||||
name = "fillneedle",
|
||||
heading = 156.0,
|
||||
debugPoly = false,
|
||||
minZ = Config.fillneedle.z-2,
|
||||
maxZ = Config.fillneedle.z+2,
|
||||
}, {
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:fillneedle",
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "Fill Needles",
|
||||
|
||||
},
|
||||
},
|
||||
distance = 2.5
|
||||
})
|
||||
exports['qb-target']:AddBoxZone("crackmakeone",Config.makecrack,1.5, 1.75, { -- 963.37, -2122.95, 31.47
|
||||
name = "crackmakeone",
|
||||
heading = 156.0,
|
||||
debugPoly = false,
|
||||
minZ = Config.makecrack.z-2,
|
||||
maxZ = Config.makecrack.z+2,
|
||||
}, {
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:makecrackone",
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "cook some crack",
|
||||
|
||||
},
|
||||
},
|
||||
distance = 2.5
|
||||
})
|
||||
exports['qb-target']:AddBoxZone("bagcrack",Config.bagcrack,1.5, 1.75, { -- 963.37, -2122.95, 31.47
|
||||
name = "bagcrack",
|
||||
heading = 156.0,
|
||||
debugPoly = false,
|
||||
minZ = Config.bagcrack.z-2,
|
||||
maxZ = Config.bagcrack.z+2,
|
||||
}, {
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:bagcrack",
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "Bag some crack",
|
||||
|
||||
},
|
||||
},
|
||||
distance = 2.5
|
||||
})
|
||||
exports['qb-target']:AddBoxZone("pharmapresc",Config.FillPrescription,1.5, 1.75, { -- 963.37, -2122.95, 31.47
|
||||
name = "pharmapresc",
|
||||
heading = 156.0,
|
||||
debugPoly = false,
|
||||
minZ = Config.FillPrescription.z-2,
|
||||
maxZ = Config.FillPrescription.z+2,
|
||||
}, {
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:fillprescription",
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "Fill Prescription",
|
||||
|
||||
},
|
||||
},
|
||||
distance = 2.5
|
||||
})
|
||||
----------------------------------------- mescaline
|
||||
exports['qb-target']:AddBoxZone("drymescaline",Config.DryOut,1.5, 1.75, { -- 963.37, -2122.95, 31.47
|
||||
name = "drymescaline",
|
||||
heading = 11.0,
|
||||
debugPoly = false,
|
||||
minZ = Config.DryOut.z-2,
|
||||
maxZ = Config.DryOut.z+2,
|
||||
}, {
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:drymescaline",
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "Dry Out",
|
||||
|
||||
},
|
||||
},
|
||||
distance = 2.5
|
||||
})
|
||||
-------------- oxy run
|
||||
exports['qb-target']:AddBoxZone("getoxytruck",Config.Payfortruck,1.5, 1.75, { -- 963.37, .z-2122.95, 31.47
|
||||
name = "getoxytruck",
|
||||
heading = 11.0,
|
||||
debugPoly = false,
|
||||
minZ = Config.Payfortruck.z-2,
|
||||
maxZ = Config.Payfortruck.z+2,
|
||||
}, {
|
||||
options = {
|
||||
{
|
||||
event = "md-drugs:client:getoxytruck",
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "Pay For Truck",
|
||||
},
|
||||
}
|
||||
})
|
||||
--------------------------------------- XTC
|
||||
exports['qb-target']:AddBoxZone("stealisosafrole2",Config.isosafrole,1.5, 1.75, { -- 963.37, -2122.95, 31.47
|
||||
name = "stealisosafrole2",
|
||||
heading = 156.0,
|
||||
debugPoly = false,
|
||||
minZ = Config.isosafrole.z-2,
|
||||
maxZ = Config.isosafrole.z+2,
|
||||
}, {
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:stealisosafrole",
|
||||
icon = 'fas fa-sign-in-alt',
|
||||
label = 'Steal Isosafrole',
|
||||
},
|
||||
},
|
||||
distance = 2.5
|
||||
})
|
||||
exports['qb-target']:AddBoxZone("stealmdp2p",Config.mdp2p,1.5, 1.75, { -- 963.37, -2122.95, 31.47
|
||||
name = "stealmdp2p",
|
||||
heading = 156.0,
|
||||
debugPoly = false,
|
||||
minZ = Config.mdp2p.z-2,
|
||||
maxZ = Config.mdp2p.z+2,
|
||||
}, {
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:stealmdp2p",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Steal mdp2p',
|
||||
},
|
||||
},
|
||||
distance = 2.5
|
||||
})
|
||||
exports['qb-target']:AddBoxZone("makerawxtc",Config.rawxtcloc,1.5, 1.75, { -- 963.37, -2122.95, 31.47
|
||||
name = "makerawxtc",
|
||||
heading = 156.0,
|
||||
debugPoly = false,
|
||||
minZ = Config.rawxtcloc.z-2,
|
||||
maxZ = Config.rawxtcloc.z+2,
|
||||
}, {
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:makingrawxtc",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Make Raw XTC',
|
||||
},
|
||||
},
|
||||
distance = 2.5
|
||||
})
|
||||
exports['qb-target']:AddBoxZone("buypress",Config.buypress,1.5, 1.75, { -- 963.37, -2122.95, 31.47
|
||||
name = "buypress",
|
||||
heading = 156.0,
|
||||
debugPoly = false,
|
||||
minZ = Config.buypress.z-2,
|
||||
maxZ = Config.buypress.z+2,
|
||||
}, {
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:buypress",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Buy Press',
|
||||
},
|
||||
},
|
||||
distance = 2.5
|
||||
})
|
||||
|
||||
exports['qb-target']:AddBoxZone("stampwhite",Config.stamp,1.5, 1.75, { -- 963.37, -2122.95, 31.47
|
||||
name = "stampwhite",
|
||||
heading = 156.0,
|
||||
debugPoly = false,
|
||||
minZ = Config.stamp.z-2,
|
||||
maxZ = Config.stamp.z+2,
|
||||
}, {
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:stampwhite",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Make White Stamped Pills',
|
||||
},
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:stampred",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Make Red Stamped Pills',
|
||||
},
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:stamporange",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Make Orange Stamped Pills',
|
||||
},
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:stampblue",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Make Blue Stamped Pills',
|
||||
},
|
||||
},
|
||||
distance = 2.5
|
||||
})
|
||||
end
|
||||
local config = lib.callback.await('md-drugs:server:getLocs', false)
|
||||
if not config then print('Yo Dawg You Broke Your Locations.lua') return end
|
||||
AddBoxZoneSingle('telecokein', config.singleSpot.CokeTeleIn, {action = function()tele(config.singleSpot.CokeTeleOut)end, icon = 'fa-solid fa-door-open', label = Lang.targets.coke.enter}) -- coke
|
||||
AddBoxZoneSingle('telecokeout', config.singleSpot.CokeTeleOut, {action = function()tele(config.singleSpot.CokeTeleIn) end, icon = "fa-solid fa-door-closed", label = Lang.targets.coke.exit}) -- coke
|
||||
AddBoxZoneMulti('makepowder', config.MakePowder, {event = "md-drugs:client:makepowder", icon = "fa-solid fa-scissors", label = Lang.targets.coke.chop}) -- coke
|
||||
AddBoxZoneMulti('steallysergic', config.lysergicacid, {event = "md-drugs:client:getlysergic", icon = "fa-solid fa-prescription-bottle", label = Lang.targets.lsd.lys}) -- lsd
|
||||
AddBoxZoneMulti('stealdiethylamide', config.diethylamide, {event = "md-drugs:client:getdiethylamide", icon = "fa-solid fa-prescription-bottle", label = Lang.targets.lsd.die}) -- lsd
|
||||
AddBoxZoneMulti('gettabs', config.gettabs, {event = "md-drugs:client:buytabs", icon = "fa-solid fa-eye-dropper", label = Lang.targets.lsd.buyt}) -- lsd
|
||||
AddBoxZoneMulti('dryheroin', config.dryplant, {event = "md-drugs:client:dryplant", icon = "fa-solid fa-temperature-full", label = Lang.targets.heroin.dry}) -- heroin
|
||||
AddBoxZoneMulti('cutheroin', config.cutheroinone, {event = "md-drugs:client:cutheroin", icon = "fa-solid fa-flask", label = Lang.targets.heroin.cut}) -- heroin
|
||||
AddBoxZoneMulti('fillneedle', config.fillneedle, {event = "md-drugs:client:fillneedle", icon = "fa-solid fa-syringe", label = Lang.targets.heroin.fill}) -- heroin
|
||||
AddBoxZoneMulti('makecrack', config.makecrack, {event = "md-drugs:client:makecrackone", icon = "fa-solid fa-temperature-high", label = Lang.targets.crack.cook}) -- crack
|
||||
AddBoxZoneMulti('bagcrack', config.bagcrack, {event = "md-drugs:client:bagcrack", icon = "fa-solid fa-weight-scale", label = Lang.targets.crack.bag}) -- crack
|
||||
AddBoxZoneMulti('fillprescription', config.FillPrescription, {event = "md-drugs:client:fillprescription", icon = "fa-solid fa-prescription", label = Lang.targets.pha.fill}) -- pharma
|
||||
AddBoxZoneSingle('payfortruck', config.singleSpot.Payfortruck, {event = "md-drugs:client:GetOxyCar", icon = "fa-solid fa-truck-moving", label = Lang.targets.oxy.pay}) -- oxy runs
|
||||
AddBoxZoneSingle('drymescaline', config.singleSpot.DryOut, {event = "md-drugs:client:drymescaline", icon = "fa-solid fa-temperature-full", label = Lang.targets.mescaline.dry}) -- mescaline
|
||||
AddBoxZoneMulti('stealisosafrole', config.isosafrole, {event = "md-drugs:client:stealisosafrole", icon = "fa-solid fa-vial", label = Lang.targets.xtc.iso}) -- xtc
|
||||
AddBoxZoneMulti('stealmdp2p', config.mdp2p, {event = "md-drugs:client:stealmdp2p", icon = "fa-solid fa-vial", label = Lang.targets.xtc.mdp}) -- xtc
|
||||
AddBoxZoneMulti('rawxtcloc', config.rawxtcloc, {event = "md-drugs:client:makingrawxtc", icon = "fa-solid fa-tablets", label = Lang.targets.xtc.raw}) -- xtc
|
||||
AddBoxZoneSingle('buypress', config.singleSpot.buypress, {event = "md-drugs:client:buypress", icon = "fa-solid fa-mortar-pestle", label = Lang.targets.xtc.press}) -- xtc
|
||||
AddBoxZoneMulti('stamp', config.stamp, {event = "md-drugs:client:stampwhite", icon = "fa-solid fa-tablets", label = Lang.targets.xtc.stamp}) -- xtc
|
||||
end)
|
||||
@@ -1,99 +0,0 @@
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
|
||||
CreateThread(function()
|
||||
local current = "g_m_y_famdnf_01"
|
||||
lib.requestModel(current, Config.requestModelTime)
|
||||
local CurrentLocation = Config.Travellingmerchant[math.random(#Config.Travellingmerchant)]
|
||||
travellingmerchant = CreatePed(0, current,CurrentLocation.x,CurrentLocation.y,CurrentLocation.z-1, CurrentLocation.h, false, false)
|
||||
FreezeEntityPosition(travellingmerchant, true)
|
||||
SetEntityInvincible(travellingmerchant, true)
|
||||
if Config.OxInv then
|
||||
if Config.oxtarget then
|
||||
options = {
|
||||
{
|
||||
label = "Travelling Merchant",
|
||||
icon = "fas fa-eye",
|
||||
onSelect = function()
|
||||
lib.showContext('travellingmerchant')
|
||||
end,
|
||||
},
|
||||
}
|
||||
exports.ox_target:addLocalEntity(travellingmerchant, options)
|
||||
else
|
||||
exports['qb-target']:AddTargetEntity(travellingmerchant, {
|
||||
options = {
|
||||
{
|
||||
label = "Travelling Merchant",
|
||||
icon = "fas fa-eye",
|
||||
action = function()
|
||||
lib.showContext('travellingmerchant')
|
||||
end,
|
||||
},
|
||||
}
|
||||
})
|
||||
end
|
||||
else
|
||||
if Config.oxtarget then
|
||||
options = {
|
||||
{
|
||||
label = "Travelling Merchant",
|
||||
icon = "fas fa-eye",
|
||||
onSelect = function()
|
||||
TriggerServerEvent("inventory:server:OpenInventory", "shop", "travelling merchant", Config.Items)
|
||||
end,
|
||||
},
|
||||
}
|
||||
exports.ox_target:addLocalEntity(travellingmerchant, options)
|
||||
else
|
||||
exports['qb-target']:AddTargetEntity(travellingmerchant, {
|
||||
options = {
|
||||
{
|
||||
label = "Travelling Merchant",
|
||||
icon = "fas fa-eye",
|
||||
action = function()
|
||||
TriggerServerEvent("inventory:server:OpenInventory", "shop", "travelling merchant", Config.Items)
|
||||
end,
|
||||
},
|
||||
}
|
||||
})
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
CreateThread(function()
|
||||
local ShopMenu = {}
|
||||
|
||||
for k, v in pairs (Config.Items.items) do
|
||||
ShopMenu[#ShopMenu + 1] = {
|
||||
icon = "nui://"..Config.imagelink..QBCore.Shared.Items[v.name].image,
|
||||
header = v.label,
|
||||
title = v.label,
|
||||
event = "md-drugs:client:travellingmerchantox",
|
||||
args = {
|
||||
item = v.name,
|
||||
cost = v.price,
|
||||
amount = v.amount,
|
||||
}
|
||||
}
|
||||
|
||||
lib.registerContext({id = 'travellingmerchant',title = "Travelling Merchant", options = ShopMenu})
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
RegisterNetEvent("md-drugs:client:travellingmerchantox", function(data) local dialog
|
||||
local price = data.cost
|
||||
local settext = "Amnt: "..data.amount.." | Cost: "..price or "Cost: "..price
|
||||
local max = data.amount
|
||||
local dialog = exports.ox_lib:inputDialog(data.item .."!", {
|
||||
{ type = 'select', label = "Payment Type", default = "cash",
|
||||
options = {
|
||||
{ value = "cash"},
|
||||
{ value = "bank"},
|
||||
}
|
||||
},
|
||||
{ type = 'number', label = "Amount to buy", description = settext, min = 0, max = max, default = 1 },
|
||||
})
|
||||
if data.cost == "Free" then data.cost = 0 end
|
||||
TriggerServerEvent("md-drugs:server:travellingmerchantox", dialog[2], dialog[1], data.item, data.cost )
|
||||
end)
|
||||
@@ -1,13 +1,18 @@
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
local WeedPlant = {}
|
||||
local exploded = nil
|
||||
function LoadModel(hash)
|
||||
hash = GetHashKey(hash)
|
||||
RequestModel(hash)
|
||||
while not HasModelLoaded(hash) do
|
||||
Wait(3000)
|
||||
end
|
||||
end
|
||||
local exploded, drying = false, false
|
||||
|
||||
local function hasJob()
|
||||
if Config.Joblock then
|
||||
if getJobName() == Config.weedjob then
|
||||
return true else return false end
|
||||
else
|
||||
return true end
|
||||
end
|
||||
|
||||
local function pick(loc)
|
||||
if not progressbar(Lang.Weed.pick, 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("weed:pickupCane", loc)
|
||||
end
|
||||
|
||||
RegisterNetEvent('weed:respawnCane', function(loc)
|
||||
local v = GlobalState.WeedPlant[loc]
|
||||
@@ -15,34 +20,8 @@ RegisterNetEvent('weed:respawnCane', function(loc)
|
||||
if not HasModelLoaded(hash) then LoadModel(hash) end
|
||||
if not WeedPlant[loc] then
|
||||
WeedPlant[loc] = CreateObject(hash, v.location.x, v.location.y, v.location.z-3.5, false, true, true)
|
||||
SetEntityAsMissionEntity(WeedPlant[loc], true, true)
|
||||
FreezeEntityPosition(WeedPlant[loc], true)
|
||||
SetEntityHeading(WeedPlant[loc], v.heading)
|
||||
exports['qb-target']:AddTargetEntity(WeedPlant[loc], {
|
||||
options = {
|
||||
{
|
||||
icon = "fas fa-hand",
|
||||
label = "Pick Weed",
|
||||
action = function()
|
||||
QBCore.Functions.Progressbar("pick_cane", "picking Weed Leaves", 2000, false, true, {
|
||||
disableMovement = true, disableCarMovement = true, disableMouse = false, disableCombat = true, },
|
||||
{ animDict = 'amb@prop_human_bum_bin@idle_a', anim = 'idle_a', flags = 47, },
|
||||
{}, {}, function()
|
||||
TriggerServerEvent("weed:pickupCane", loc)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end, function() -- Cancel
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
end,
|
||||
canInteract = function()
|
||||
if Config.Joblock then
|
||||
if QBCore.Functions.GetPlayerData().job.name == Config.weedjob then
|
||||
return true end
|
||||
else
|
||||
return true end end,
|
||||
}
|
||||
}
|
||||
})
|
||||
Freeze(WeedPlant[loc],true, v.heading)
|
||||
AddSingleModel(WeedPlant[loc], {icon = "fas fa-hand",label = Lang.targets.weed.pick, action = function() pick(loc) end}, loc)
|
||||
end
|
||||
end)
|
||||
|
||||
@@ -54,53 +33,16 @@ end)
|
||||
RegisterNetEvent("weed:init", function()
|
||||
for k, v in pairs (GlobalState.WeedPlant) do
|
||||
local hash = GetHashKey(v.model)
|
||||
if not HasModelLoaded(hash) then LoadModel(hash) end
|
||||
lib.requestModel('prop_weed_01', 1000)
|
||||
if not v.taken then
|
||||
WeedPlant[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z-3.5, false, true, true)
|
||||
SetEntityAsMissionEntity(WeedPlant[k], true, true)
|
||||
FreezeEntityPosition(WeedPlant[k], true)
|
||||
SetEntityHeading(WeedPlant[k], v.heading)
|
||||
exports['qb-target']:AddTargetEntity(WeedPlant[k], {
|
||||
options = {
|
||||
{
|
||||
icon = "fas fa-hand",
|
||||
label = "Pick Weed",
|
||||
action = function()
|
||||
QBCore.Functions.Progressbar("pick_cane", "picking Weed Leaves", 2000, false, true, {
|
||||
disableMovement = true, disableCarMovement = true, disableMouse = false, disableCombat = true, },
|
||||
{ animDict = 'amb@prop_human_bum_bin@idle_a', anim = 'idle_a', flags = 47, },
|
||||
{}, {}, function()
|
||||
TriggerServerEvent("weed:pickupCane", k)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end, function() -- Cancel
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
end,
|
||||
canInteract = function()
|
||||
if Config.Joblock then
|
||||
if QBCore.Functions.GetPlayerData().job.name == Config.weedjob then
|
||||
return true end
|
||||
else
|
||||
return true end end,
|
||||
}
|
||||
}
|
||||
})
|
||||
print(WeedPlant[k])
|
||||
Freeze(WeedPlant[k],true, v.heading)
|
||||
AddSingleModel(WeedPlant[k], {icon = "fas fa-hand",label = Lang.targets.weed.pick, action = function() pick(k) end}, k)
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
AddEventHandler('onResourceStart', function(resource)
|
||||
if resource == GetCurrentResourceName() then
|
||||
LoadModel('bkr_prop_weed_lrg_01b')
|
||||
TriggerEvent('weed:init')
|
||||
end
|
||||
end)
|
||||
RegisterNetEvent('QBCore:Client:OnPlayerLoaded', function()
|
||||
Wait(3000)
|
||||
LoadModel('bkr_prop_weed_lrg_01b')
|
||||
TriggerEvent('weed:init')
|
||||
end)
|
||||
|
||||
AddEventHandler('onResourceStop', function(resourceName)
|
||||
if GetCurrentResourceName() == resourceName then
|
||||
SetModelAsNoLongerNeeded(GetHashKey('bkr_prop_weed_lrg_01b'))
|
||||
@@ -113,330 +55,78 @@ AddEventHandler('onResourceStop', function(resourceName)
|
||||
end)
|
||||
|
||||
CreateThread(function()
|
||||
local config = lib.callback.await('md-drugs:server:getLocs', false)
|
||||
AddBoxZoneMulti('weeddry', config.WeedDry, {
|
||||
name = 'dryweed',
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = Lang.targets.weed.dry,
|
||||
distance = 1,
|
||||
action = function()
|
||||
if not ItemCheck('wetcannabis') then return end
|
||||
if drying then
|
||||
Notify(Lang.Weed.busy, "error")
|
||||
else
|
||||
local loc = GetEntityCoords(PlayerPedId())
|
||||
local weedplant = CreateObject("bkr_prop_weed_drying_01a", loc.x, loc.y+.2, loc.z, true, false)
|
||||
drying = true
|
||||
FreezeEntityPosition(weedplant, true)
|
||||
Notify(Lang.Weed.wait, "success")
|
||||
Wait(math.random(1000,5000))
|
||||
Notify(Lang.Weed.take, "success")
|
||||
AddSingleModel(weedplant, {
|
||||
icon = "fa-solid fa-cannabis",
|
||||
label = Lang.targets.weed.dpick,
|
||||
action = function()
|
||||
DeleteEntity(weedplant)
|
||||
drying = false
|
||||
TriggerServerEvent('md-drugs:server:dryoutweed')
|
||||
end,
|
||||
canInteract = function()
|
||||
if hasJob() then return true end end
|
||||
}, nil)
|
||||
end
|
||||
end,
|
||||
canInteract = function()
|
||||
if hasJob() then return true end end
|
||||
})
|
||||
|
||||
AddBoxZoneSingle('teleinweedout', config.singleSpot.weedTeleout, { name = 'teleout', icon = "fa-solid fa-door-closed", label = Lang.targets.coke.exit, distance = 2.0, action = function() SetEntityCoords(PlayerPedId(),config.singleSpot.weedTelein) end,
|
||||
canInteract = function() if hasJob() then return true end end
|
||||
})
|
||||
AddBoxZoneSingle('teleinweedin', config.singleSpot.weedTelein, { name = 'teleout', icon = "fa-solid fa-door-open", label = Lang.targets.coke.enter, distance = 2.0, action = function() SetEntityCoords(PlayerPedId(),config.singleSpot.weedTeleout) end,
|
||||
canInteract = function() if hasJob() then return true end end
|
||||
})
|
||||
AddBoxZoneSingle('MakeButterCrafting', config.singleSpot.MakeButter, {label = Lang.targets.weed.butt, action = function() lib.showContext('ButterCraft') end, icon = "fa-solid fa-cookie",
|
||||
canInteract = function() if hasJob() then return true end end
|
||||
})
|
||||
|
||||
for k, v in pairs (Config.WeedDry) do
|
||||
|
||||
exports['qb-target']:AddBoxZone("weeddry"..k,v,1.5, 1.75, { -- 963.37, .z-2122.95, 31.47
|
||||
name = "weeddry"..k,
|
||||
heading = 11.0,
|
||||
debugPoly = false,
|
||||
minZ = v.z-2,
|
||||
maxZ = v.z+2,
|
||||
}, {
|
||||
options = {
|
||||
{
|
||||
name = 'dryweed',
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "Dry Weed",
|
||||
distance = 1,
|
||||
items = "wetcannabis",
|
||||
action = function()
|
||||
if drying then
|
||||
QBCore.Functions.Notify("Already Drying One Out", "error")
|
||||
else
|
||||
local loc = GetEntityCoords(PlayerPedId())
|
||||
local weedplant = CreateObject("bkr_prop_weed_drying_01a", loc.x, loc.y+.2, loc.z, true, false)
|
||||
drying = true
|
||||
FreezeEntityPosition(weedplant, true)
|
||||
QBCore.Functions.Notify("Wait A little Bit To Dry", "success")
|
||||
Wait(math.random(1000,5000))
|
||||
QBCore.Functions.Notify("Take Down The Weed", "success")
|
||||
exports['qb-target']:AddTargetEntity(weedplant, {
|
||||
options = {
|
||||
{
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "Pick Up Weed",
|
||||
action = function()
|
||||
DeleteEntity(weedplant)
|
||||
drying = false
|
||||
TriggerServerEvent('md-drugs:server:dryoutweed')
|
||||
end,
|
||||
canInteract = function()
|
||||
if Config.Joblock then
|
||||
if QBCore.Functions.GetPlayerData().job.name == Config.weedjob then
|
||||
return true end
|
||||
else
|
||||
return true end end,
|
||||
}
|
||||
}
|
||||
})
|
||||
end
|
||||
end,
|
||||
canInteract = function()
|
||||
if Config.Joblock then
|
||||
if QBCore.Functions.GetPlayerData().job.name == Config.weedjob then
|
||||
return true end
|
||||
else
|
||||
return true end end,
|
||||
},
|
||||
},
|
||||
})
|
||||
end
|
||||
exports['qb-target']:AddBoxZone("teleinweed",Config.Telein,1.5, 1.75, { -- 963.37, .z-2122.95, 31.47
|
||||
name = "teleinweed",
|
||||
heading = 11.0,
|
||||
debugPoly = false,
|
||||
minZ = Config.Telein.z-2,
|
||||
maxZ = Config.Telein.z+2,
|
||||
}, {
|
||||
options = {
|
||||
{
|
||||
name = 'teleout',
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "Enter Building",
|
||||
distance = 5,
|
||||
action = function()
|
||||
SetEntityCoords(PlayerPedId(),Config.Teleout)
|
||||
|
||||
end,
|
||||
canInteract = function()
|
||||
if Config.Joblock then
|
||||
if QBCore.Functions.GetPlayerData().job.name == Config.weedjob then
|
||||
return true end
|
||||
else
|
||||
return true end end,
|
||||
|
||||
},
|
||||
},
|
||||
})
|
||||
exports['qb-target']:AddBoxZone("teleinweedout",Config.Teleout,1.5, 1.75, { -- 963.37, .z-2122.95, 31.47
|
||||
name = "teleinweedout",
|
||||
heading = 11.0,
|
||||
debugPoly = false,
|
||||
minZ = Config.Teleout.z-2,
|
||||
maxZ = Config.Teleout.z+2,
|
||||
}, {
|
||||
options = {
|
||||
{
|
||||
name = 'teleout',
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "Exit Building",
|
||||
distance = 5,
|
||||
action = function()
|
||||
SetEntityCoords(PlayerPedId(),Config.Telein)
|
||||
|
||||
end,
|
||||
canInteract = function()
|
||||
if Config.Joblock then
|
||||
if QBCore.Functions.GetPlayerData().job.name == Config.weedjob then
|
||||
return true end
|
||||
else
|
||||
return true end end,
|
||||
|
||||
},
|
||||
},
|
||||
})
|
||||
exports['qb-target']:AddBoxZone("MakeButter",Config.MakeButter,1.5, 1.75, { -- 963.37, .z-2122.95, 31.47
|
||||
name = "MakeButter",
|
||||
heading = 11.0,
|
||||
debugPoly = false,
|
||||
minZ = Config.MakeButter.z-2,
|
||||
maxZ = Config.MakeButter.z+2,
|
||||
}, {
|
||||
options = {
|
||||
{
|
||||
name = 'butter',
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "Make Butter",
|
||||
action = function()
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
QBCore.Functions.Progressbar("drink_something", "Making Canna Butter", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:makebutter")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 3, 8) -- NumberOfCircles,
|
||||
end)
|
||||
end,
|
||||
canInteract = function()
|
||||
if Config.Joblock then
|
||||
if QBCore.Functions.GetPlayerData().job.name == Config.weedjob then
|
||||
return true end
|
||||
else
|
||||
return true end end,
|
||||
},
|
||||
{
|
||||
name = 'makebrownies',
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "Make Brownies",
|
||||
item = "cannabutter",
|
||||
action = function()
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
QBCore.Functions.Progressbar("drink_something", "Making Special Brownies", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:makebrownies")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 3, 8) -- NumberOfCircles,
|
||||
end)
|
||||
end,
|
||||
canInteract = function()
|
||||
if Config.Joblock then
|
||||
if QBCore.Functions.GetPlayerData().job.name == Config.weedjob then
|
||||
return true end
|
||||
else
|
||||
return true end end,
|
||||
},
|
||||
{
|
||||
name = 'makecookies',
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "Make Cookies",
|
||||
item = "cannabutter",
|
||||
action = function()
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
QBCore.Functions.Progressbar("drink_something", "Making Special Cookies", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:makecookies")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 3, 8) -- NumberOfCircles,
|
||||
end)
|
||||
end,
|
||||
canInteract = function()
|
||||
if Config.Joblock then
|
||||
if QBCore.Functions.GetPlayerData().job.name == Config.weedjob then
|
||||
return true end
|
||||
else
|
||||
return true end end,
|
||||
},
|
||||
{
|
||||
name = 'makechocolate',
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "Make Chocolate",
|
||||
item = "cannabutter",
|
||||
action = function()
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
QBCore.Functions.Progressbar("drink_something", "Making Special Chocolate", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:makechocolate")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 3, 8) -- NumberOfCircles,
|
||||
end)
|
||||
end,
|
||||
canInteract = function()
|
||||
if Config.Joblock then
|
||||
if QBCore.Functions.GetPlayerData().job.name == Config.weedjob then
|
||||
return true end
|
||||
else
|
||||
return true end end,
|
||||
},
|
||||
{
|
||||
name = 'makemuffin',
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "Make Muffin",
|
||||
item = "cannabutter",
|
||||
action = function()
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
QBCore.Functions.Progressbar("drink_something", "Making Special Muffin", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:makemuffin")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 3, 8) -- NumberOfCircles,
|
||||
end)
|
||||
end,
|
||||
canInteract = function()
|
||||
if Config.Joblock then
|
||||
if QBCore.Functions.GetPlayerData().job.name == Config.weedjob then
|
||||
return true end
|
||||
else
|
||||
return true end end,
|
||||
},
|
||||
},
|
||||
})
|
||||
exports['qb-target']:AddBoxZone("makeoil",Config.MakeOil,1.5, 1.75, { -- 963.37, .z-2122.95, 31.47
|
||||
name = "makeoil",
|
||||
heading = 11.0,
|
||||
debugPoly = false,
|
||||
minZ = Config.MakeOil.z-2,
|
||||
maxZ = Config.MakeOil.z+2,
|
||||
}, {
|
||||
options = {
|
||||
{
|
||||
name = 'Oil',
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "Make Oil",
|
||||
action = function()
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
QBCore.Functions.Progressbar("drink_something", "Making Wax Oil", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:makeoil")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
local explosion = math.random(1,100)
|
||||
local loc = GetEntityCoords(PlayerPedId())
|
||||
if explosion <= 99 then
|
||||
AddExplosion(loc.x, loc.y, loc.z, 49, 10, true, false, true, true)
|
||||
exploded = true
|
||||
QBCore.Functions.Notify("Stove Is Too Hot Wait 30 Seconds To Cool Down", "error")
|
||||
Wait(1000 * 30)
|
||||
exploded = nil
|
||||
end
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 3, 8) -- NumberOfCircles,
|
||||
end)
|
||||
end,
|
||||
canInteract = function()
|
||||
if exploded == nil then return true end
|
||||
end,
|
||||
},
|
||||
},
|
||||
})
|
||||
AddBoxZoneSingle('makeoil',config.singleSpot.MakeOil, {
|
||||
name = 'Oil',
|
||||
icon = "fa-solid fa-oil-can",
|
||||
label = Lang.targets.weed.oil,
|
||||
action = function()
|
||||
if not ItemCheckMulti({'butane', 'grindedweed'}) then return end
|
||||
if not minigame() then
|
||||
local loc = GetEntityCoords(PlayerPedId())
|
||||
AddExplosion(loc.x, loc.y, loc.z, 49, 10, true, false, true)
|
||||
exploded = true
|
||||
Notify(Lang.Weed.stovehot, "error")
|
||||
Wait(1000 * 30)
|
||||
exploded = false
|
||||
return end
|
||||
if not progressbar(Lang.Weed.shat, 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:makeoil")
|
||||
end,
|
||||
canInteract = function()
|
||||
if hasJob() and exploded == false then return true end
|
||||
end,
|
||||
})
|
||||
local stove = CreateObject("prop_cooker_03",config.singleSpot.MakeButter.x, config.singleSpot.MakeButter.y, config.singleSpot.MakeButter.z-1, true, false)
|
||||
SetEntityHeading(stove, 270.00)
|
||||
FreezeEntityPosition(stove, true)
|
||||
local stove2 = CreateObject("prop_cooker_03",config.singleSpot.MakeOil.x,config.singleSpot.MakeOil.y, config.singleSpot.MakeOil.z-1, true, false)
|
||||
SetEntityHeading(stove2, 90.00)
|
||||
FreezeEntityPosition(stove2, true)
|
||||
end)
|
||||
|
||||
CreateThread(function()
|
||||
@@ -445,155 +135,59 @@ CreateThread(function()
|
||||
BikerWeedFarm.Security.Set(BikerWeedFarm.Security.upgrade)
|
||||
BikerWeedFarm.Details.Enable(BikerWeedFarm.Details.chairs, true)
|
||||
BikerWeedFarm.Details.Enable({BikerWeedFarm.Details.production, BikerWeedFarm.Details.chairs, BikerWeedFarm.Details.drying}, true)
|
||||
BikerWeedFarm.Plant1.Clear(false)
|
||||
BikerWeedFarm.Plant2.Clear(false)
|
||||
BikerWeedFarm.Plant3.Clear(false)
|
||||
BikerWeedFarm.Plant4.Clear(false)
|
||||
BikerWeedFarm.Plant5.Clear(false)
|
||||
BikerWeedFarm.Plant6.Clear(false)
|
||||
BikerWeedFarm.Plant7.Clear(false)
|
||||
BikerWeedFarm.Plant8.Clear(false)
|
||||
BikerWeedFarm.Plant9.Clear(false)
|
||||
BikerWeedFarm.Plant1.Clear(false) BikerWeedFarm.Plant2.Clear(false) BikerWeedFarm.Plant3.Clear(false)
|
||||
BikerWeedFarm.Plant4.Clear(false) BikerWeedFarm.Plant5.Clear(false) BikerWeedFarm.Plant6.Clear(false)
|
||||
BikerWeedFarm.Plant7.Clear(false) BikerWeedFarm.Plant8.Clear(false) BikerWeedFarm.Plant9.Clear(false)
|
||||
RefreshInterior(BikerWeedFarm.interiorId)
|
||||
stove = CreateObject("prop_cooker_03",vector3(1045.49, -3198.46, -38.15-1), true, false)
|
||||
SetEntityHeading(stove, 270.00)
|
||||
FreezeEntityPosition(stove, true)
|
||||
stove2 = CreateObject("prop_cooker_03",vector3(1038.90, -3198.66, -38.17-1), true, false)
|
||||
SetEntityHeading(stove2, 90.00)
|
||||
FreezeEntityPosition(stove2, true)
|
||||
end)
|
||||
|
||||
RegisterNetEvent('md-drugs:client:bluntwraps', function(args)
|
||||
lib.registerContext({
|
||||
id = 'bluntroll',
|
||||
title = 'Blunt Types',
|
||||
menu = 'bluntroll',
|
||||
options = {
|
||||
{
|
||||
title = 'Roll Blunt',
|
||||
description = 'Roll A Regular Blunt',
|
||||
icon = 'check',
|
||||
serverEvent = 'md-drugs:server:rollblunt',
|
||||
},
|
||||
{
|
||||
title = 'Dip Blunt Wrap In Lean',
|
||||
description = 'Roll A Lean Blunt',
|
||||
icon = 'check',
|
||||
serverEvent = 'md-drugs:server:rollleanblunt',
|
||||
},
|
||||
{
|
||||
title = 'Dip Blunt Wrap In Dextro',
|
||||
description = 'Roll A Dextro Blunt',
|
||||
icon = 'check',
|
||||
serverEvent = 'md-drugs:server:rolldextroblunt',
|
||||
},
|
||||
{
|
||||
title = 'Roll A Chewy Blunt',
|
||||
description = 'Roll A Chewy Blunt',
|
||||
icon = 'check',
|
||||
serverEvent = 'md-drugs:server:rollchewyblunt',
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
lib.showContext('bluntroll')
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:rollanim", function()
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
Wait(4000)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
|
||||
|
||||
|
||||
RegisterNetEvent("md-drugs:client:dodabs", function()
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
AlienEffect()
|
||||
if not progressbar('Doing Dabs', 4000, 'bong2') then AlienEffect() return end
|
||||
AlienEffect()
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:edibles", function()
|
||||
QBCore.Functions.Progressbar("use_lsd", "Eating Edibles", 1750, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
}, {
|
||||
animDict = "mp_suicide",
|
||||
anim = "pill",
|
||||
flags = 49,
|
||||
}, {}, {}, function()
|
||||
AlienEffect()
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
end)
|
||||
|
||||
CreateThread(function()
|
||||
local WeedShop = {}
|
||||
local current = "u_m_m_jesus_01"
|
||||
lib.requestModel(current, Config.requestModelTime)
|
||||
local CurrentLocation = vector3(1030.46, -3203.63, -38.2)
|
||||
WeedGuy = CreatePed(0,current,CurrentLocation.x,CurrentLocation.y,CurrentLocation.z-1, CurrentLocation.h, false, false)
|
||||
FreezeEntityPosition(WeedGuy, true)
|
||||
SetEntityInvincible(WeedGuy, true)
|
||||
SetEntityHeading(WeedGuy, 270.0)
|
||||
exports['qb-target']:AddTargetEntity(WeedGuy, {
|
||||
options = {
|
||||
{
|
||||
label = "Weed Shop",
|
||||
icon = "fas fa-eye",
|
||||
action = function()
|
||||
lib.showContext('WeedShop')
|
||||
end,
|
||||
|
||||
},
|
||||
}
|
||||
|
||||
})
|
||||
for k, v in pairs (Config.Weed.items) do
|
||||
WeedShop[#WeedShop + 1] = {
|
||||
icon = "nui://"..Config.imagelink..QBCore.Shared.Items[v.name].image,
|
||||
header = v.label,
|
||||
title = v.label,
|
||||
event = "md-drugs:client:WeedShop",
|
||||
args = {
|
||||
item = v.name,
|
||||
cost = v.price,
|
||||
amount = v.amount,
|
||||
}
|
||||
}
|
||||
|
||||
lib.registerContext({id = 'WeedShop',title = "Weed Shop", options = WeedShop})
|
||||
local function createBluntOptions(contextId, contextTitle, eventLabelPrefix, tableName)
|
||||
local options = {}
|
||||
local items = lib.callback.await('md-drugs:server:GetRecipe', false,'weed',tableName)
|
||||
for k, v in pairs(items) do
|
||||
local label = {}
|
||||
local item = ''
|
||||
for m, d in pairs(v.take) do table.insert(label, GetLabel(m) .. ' X ' .. d) end
|
||||
for m, d in pairs(v.give) do item = m end
|
||||
options[#options + 1] = {
|
||||
icon = GetImage(item),
|
||||
description = table.concat(label, ", "),
|
||||
title = GetLabel(item),
|
||||
event = "md-drugs:client:MakeWeedItems",
|
||||
args = {
|
||||
item = item,
|
||||
recipe = 'weed',
|
||||
num = k,
|
||||
label = eventLabelPrefix .. GetLabel(item),
|
||||
table = tableName
|
||||
}
|
||||
}
|
||||
end
|
||||
sorter(options, 'title')
|
||||
lib.registerContext({ id = contextId, title = contextTitle, options = options})
|
||||
end
|
||||
|
||||
CreateThread(function()
|
||||
createBluntOptions('ButterCraft', "Edible Cooking", 'Cooking A ', 'edibles')
|
||||
createBluntOptions('mddrugsblunts', "Roll Blunts", 'Rolling A ', 'blunts')
|
||||
createBluntOptions('mddrugsbluntwraps', "Dipping Syrup", 'Dipping Syrup To Make ', 'bluntwrap')
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:WeedShop", function(data)
|
||||
local price = data.cost
|
||||
local settext = "Amnt: "..data.amount.." | Cost: "..price or "Cost: "..price
|
||||
local max = data.amount
|
||||
local dialog = exports.ox_lib:inputDialog(data.item .."!", {
|
||||
{ type = 'select', label = "Payment Type", default = "cash",
|
||||
options = {
|
||||
{ value = "cash"},
|
||||
{ value = "bank"},
|
||||
}
|
||||
},
|
||||
{ type = 'number', label = "Amount to buy", description = settext, min = 0, max = max, default = 1 },
|
||||
})
|
||||
if data.cost == "Free" then data.cost = 0 end
|
||||
TriggerServerEvent("md-drugs:server:travellingmerchantox", dialog[2], dialog[1], data.item, data.cost )
|
||||
RegisterNetEvent("md-drugs:client:MakeWeedItems", function(data)
|
||||
if not minigame() then return end
|
||||
if not progressbar('Making ' .. data.item, 4000, 'uncuff') then return end
|
||||
TriggerServerEvent('md-drugs:server:MakeWeedItems', data)
|
||||
end)
|
||||
|
||||
RegisterNetEvent('md-drugs:client:smokeblunts', function(itemName)
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'smoke'})
|
||||
TriggerEvent("evidence:client:SetStatus", "widepupils", 300)
|
||||
Wait(1000)
|
||||
if itemName == "blunts" then
|
||||
AlienEffect()
|
||||
elseif itemName == "leanblunts" or itemName == "dextroblunts" then
|
||||
EcstasyEffect()
|
||||
else
|
||||
TrevorEffect()
|
||||
end
|
||||
RegisterNetEvent('md-drugs:client:makeBluntWrap', function(data)
|
||||
lib.showContext('mddrugsbluntwraps')
|
||||
end)
|
||||
|
||||
RegisterNetEvent('md-drugs:client:rollBlunt', function(data)
|
||||
lib.showContext('mddrugsblunts')
|
||||
end)
|
||||
@@ -1,456 +1,48 @@
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
local miss = false
|
||||
|
||||
local deliveryBlip = nil
|
||||
function PoliceCallWholesale()
|
||||
print " tell your devs they didnt do something"
|
||||
end
|
||||
|
||||
RegisterNetEvent("md-drugs:client:getloccoke")
|
||||
AddEventHandler("md-drugs:client:getloccoke", function()
|
||||
local unlucky = math.random(1,100)
|
||||
local CurrentLocation = Config.oxylocations[math.random(#Config.oxylocations)]
|
||||
local unluck = math.random(1,100)
|
||||
if deliveryBlip ~= nil then
|
||||
RemoveBlip(deliveryBlip)
|
||||
RegisterNetEvent("md-drugs:client:GetLocation", function(drug)
|
||||
if not GetCops(Config.PoliceCount) then return end
|
||||
if miss then
|
||||
Notify(Lang.Wholesale.al, 'error')
|
||||
else
|
||||
local loc = drug.location
|
||||
local timer = 0
|
||||
miss = true
|
||||
SetNewWaypoint(loc.x, loc.y)
|
||||
lib.requestModel("g_m_y_famdnf_01", Config.RequestModelTime)
|
||||
local current = "g_m_y_famdnf_01"
|
||||
local drugdealer = CreatePed(0, current,loc.x,loc.y,loc.z-1, 90.0, false, false)
|
||||
FreezeEntityPosition(drugdealer, true)
|
||||
SetEntityInvincible(drugdealer, true)
|
||||
AddMultiModel(drugdealer, {{
|
||||
label = Lang.targets.Wholesale.talk,
|
||||
icon = "fas fa-eye",
|
||||
action = function()
|
||||
local luck = math.random(1,100)
|
||||
if luck <= Config.SuccessfulChance then
|
||||
if not progressbar("Wholesaling Drugs", 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:SuccessSale", drug)
|
||||
else
|
||||
progressbar("YOU FUCKED NOW", 4000, 'uncuff')
|
||||
SetUpPeds()
|
||||
end
|
||||
Wait(3000)
|
||||
DeleteEntity(drugdealer)
|
||||
miss = false
|
||||
end
|
||||
}},drugdealer )
|
||||
repeat
|
||||
Wait(1000)
|
||||
timer = timer + 1
|
||||
until #(GetEntityCoords(PlayerPedId()) - vector3(loc.x, loc.y, loc.z) ) < 4.0 or timer == Config.WholesaleTimeout + 1
|
||||
PoliceCall(Config.AlertPoliceWholesale)
|
||||
if timer <= Config.WholesaleTimeout or #(GetEntityCoords(PlayerPedId()) - vector3(loc.x, loc.y, loc.z) ) < 4.0 then
|
||||
timer = 0
|
||||
else
|
||||
Notify('The Buyer Waited To Long', 'error')
|
||||
DeleteEntity(drugdealer)
|
||||
end
|
||||
end
|
||||
if unlucky <= Config.AlertPoliceWholesale then
|
||||
PoliceCallWholesale()
|
||||
end
|
||||
deliveryBlip = AddBlipForCoord(CurrentLocation)
|
||||
SetBlipSprite(deliveryBlip, 1)
|
||||
SetBlipDisplay(deliveryBlip, 2)
|
||||
SetBlipScale(deliveryBlip, 1.0)
|
||||
SetBlipAsShortRange(deliveryBlip, false)
|
||||
SetBlipColour(deliveryBlip, 27)
|
||||
BeginTextCommandSetBlipName("STRING")
|
||||
AddTextComponentSubstringPlayerName("drug Meet")
|
||||
EndTextCommandSetBlipName(deliveryBlip)
|
||||
SetBlipRoute(deliveryBlip, true)
|
||||
druglocation = CircleZone:Create(CurrentLocation, 5,{ name = "cokesell", debugPoly = false })
|
||||
druglocation:onPlayerInOut(function(isPointInside) if isPointInside then RemoveBlip(deliveryBlip) end end)
|
||||
lib.requestModel("g_m_y_famdnf_01", Config.requestModelTime)
|
||||
local current = "g_m_y_famdnf_01"
|
||||
drugdealer = CreatePed(0, current,CurrentLocation.x,CurrentLocation.y,CurrentLocation.z-1, 90.0, false, false)
|
||||
FreezeEntityPosition(drugdealer, true)
|
||||
SetEntityInvincible(drugdealer, true)
|
||||
exports['qb-target']:AddTargetEntity(drugdealer, {
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
label = "Talk To Buyer",
|
||||
icon = "fas fa-eye",
|
||||
action = function()
|
||||
local luck = math.random(1,100)
|
||||
local ped = GetEntityCoords(PlayerPedId())
|
||||
if luck <= Config.SuccessfulChance then
|
||||
TriggerEvent("md-drugs:client:successsalecoke")
|
||||
else
|
||||
|
||||
TriggerEvent("md-drugs:client:setupcoke")
|
||||
Wait(3000)
|
||||
SetUpPeds()
|
||||
|
||||
end
|
||||
end,
|
||||
},
|
||||
},
|
||||
distance = 2.0
|
||||
})
|
||||
|
||||
|
||||
end)
|
||||
|
||||
|
||||
|
||||
RegisterNetEvent("md-drugs:client:successsalecoke")
|
||||
AddEventHandler("md-drugs:client:successsalecoke", function()
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
QBCore.Functions.Progressbar("drink_something", "Wholesaling Drugs", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
TriggerServerEvent("md-drugs:server:wholesalecoke")
|
||||
Citizen.Wait(4000)
|
||||
|
||||
DeleteEntity(drugdealer)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:setupcoke")
|
||||
AddEventHandler("md-drugs:client:setupcoke", function()
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
QBCore.Functions.Progressbar("drink_something", "YOU FUCKED NOW", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
Citizen.Wait(4000)
|
||||
DeleteEntity(drugdealer)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
end)
|
||||
----------heroin
|
||||
RegisterNetEvent("md-drugs:client:getloccrack")
|
||||
AddEventHandler("md-drugs:client:getloccrack", function()
|
||||
local unlucky = math.random(1,100)
|
||||
local CurrentLocation = Config.oxylocations[math.random(#Config.oxylocations)]
|
||||
local unluck = math.random(1,100)
|
||||
if deliveryBlip ~= nil then
|
||||
RemoveBlip(deliveryBlip)
|
||||
end
|
||||
if unlucky <= Config.AlertPoliceWholesale then
|
||||
PoliceCallWholesale()
|
||||
end
|
||||
deliveryBlip = AddBlipForCoord(CurrentLocation)
|
||||
SetBlipSprite(deliveryBlip, 1)
|
||||
SetBlipDisplay(deliveryBlip, 2)
|
||||
SetBlipScale(deliveryBlip, 1.0)
|
||||
SetBlipAsShortRange(deliveryBlip, false)
|
||||
SetBlipColour(deliveryBlip, 27)
|
||||
BeginTextCommandSetBlipName("STRING")
|
||||
AddTextComponentSubstringPlayerName("drug Meet")
|
||||
EndTextCommandSetBlipName(deliveryBlip)
|
||||
SetBlipRoute(deliveryBlip, true)
|
||||
druglocation = CircleZone:Create(CurrentLocation, 5,{ name = "cracksell", debugPoly = false })
|
||||
druglocation:onPlayerInOut(function(isPointInside) if isPointInside then RemoveBlip(deliveryBlip) end end)
|
||||
lib.requestModel("g_m_y_famdnf_01", Config.requestModelTime)
|
||||
local current = "g_m_y_famdnf_01"
|
||||
drugdealer = CreatePed(0, current,CurrentLocation.x,CurrentLocation.y,CurrentLocation.z-1, 90.0, false, false)
|
||||
FreezeEntityPosition(drugdealer, true)
|
||||
SetEntityInvincible(drugdealer, true)
|
||||
exports['qb-target']:AddTargetEntity(drugdealer, {
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
label = "Talk To Buyer",
|
||||
icon = "fas fa-eye",
|
||||
action = function()
|
||||
local luck = math.random(1,100)
|
||||
local ped = GetEntityCoords(PlayerPedId())
|
||||
if luck <= Config.SuccessfulChance then
|
||||
TriggerEvent("md-drugs:client:successsalecrack")
|
||||
else
|
||||
|
||||
TriggerEvent("md-drugs:client:setupcrack")
|
||||
Wait(3000)
|
||||
SetUpPeds()
|
||||
|
||||
end
|
||||
end,
|
||||
},
|
||||
},
|
||||
distance = 2.0
|
||||
})
|
||||
|
||||
|
||||
end)
|
||||
|
||||
|
||||
|
||||
RegisterNetEvent("md-drugs:client:successsalecrack")
|
||||
AddEventHandler("md-drugs:client:successsalecrack", function()
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
QBCore.Functions.Progressbar("drink_something", "Wholesaling Drugs", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
TriggerServerEvent("md-drugs:server:wholesalecrack")
|
||||
Citizen.Wait(4000)
|
||||
|
||||
DeleteEntity(drugdealer)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:setupcrack")
|
||||
AddEventHandler("md-drugs:client:setupcrack", function()
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
QBCore.Functions.Progressbar("drink_something", "YOU FUCKED NOW", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
Citizen.Wait(4000)
|
||||
DeleteEntity(drugdealer)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
end)
|
||||
----------------------------- heroin
|
||||
RegisterNetEvent("md-drugs:client:getlocheroin")
|
||||
AddEventHandler("md-drugs:client:getlocheroin", function()
|
||||
local unlucky = math.random(1,100)
|
||||
local CurrentLocation = Config.oxylocations[math.random(#Config.oxylocations)]
|
||||
local unluck = math.random(1,100)
|
||||
if deliveryBlip ~= nil then
|
||||
RemoveBlip(deliveryBlip)
|
||||
end
|
||||
if unlucky <= Config.AlertPoliceWholesale then
|
||||
PoliceCallWholesale()
|
||||
end
|
||||
deliveryBlip = AddBlipForCoord(CurrentLocation)
|
||||
SetBlipSprite(deliveryBlip, 1)
|
||||
SetBlipDisplay(deliveryBlip, 2)
|
||||
SetBlipScale(deliveryBlip, 1.0)
|
||||
SetBlipAsShortRange(deliveryBlip, false)
|
||||
SetBlipColour(deliveryBlip, 27)
|
||||
BeginTextCommandSetBlipName("STRING")
|
||||
AddTextComponentSubstringPlayerName("drug Meet")
|
||||
EndTextCommandSetBlipName(deliveryBlip)
|
||||
SetBlipRoute(deliveryBlip, true)
|
||||
druglocation = CircleZone:Create(CurrentLocation, 5,{ name = "heroinsell", debugPoly = false })
|
||||
druglocation:onPlayerInOut(function(isPointInside) if isPointInside then RemoveBlip(deliveryBlip) end end)
|
||||
lib.requestModel("g_m_y_famdnf_01", Config.requestModelTime)
|
||||
local current = "g_m_y_famdnf_01"
|
||||
drugdealer = CreatePed(0, current,CurrentLocation.x,CurrentLocation.y,CurrentLocation.z-1, 90.0, false, false)
|
||||
FreezeEntityPosition(drugdealer, true)
|
||||
SetEntityInvincible(drugdealer, true)
|
||||
exports['qb-target']:AddTargetEntity(drugdealer, {
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
label = "Talk To Buyer",
|
||||
icon = "fas fa-eye",
|
||||
action = function()
|
||||
local luck = math.random(1,100)
|
||||
local ped = GetEntityCoords(PlayerPedId())
|
||||
if luck <= Config.SuccessfulChance then
|
||||
TriggerEvent("md-drugs:client:successsaleheroin")
|
||||
else
|
||||
|
||||
TriggerEvent("md-drugs:client:setupheroin")
|
||||
Wait(3000)
|
||||
SetUpPeds()
|
||||
|
||||
end
|
||||
end,
|
||||
},
|
||||
},
|
||||
distance = 2.0
|
||||
})
|
||||
|
||||
|
||||
|
||||
end)
|
||||
|
||||
|
||||
|
||||
RegisterNetEvent("md-drugs:client:successsaleheroin")
|
||||
AddEventHandler("md-drugs:client:successsaleheroin", function()
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
QBCore.Functions.Progressbar("drink_something", "Wholesaling Drugs", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
TriggerServerEvent("md-drugs:server:wholesaleheroin")
|
||||
DeleteEntity(drugdealer)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:setupheroin")
|
||||
AddEventHandler("md-drugs:client:setupheroin", function()
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
QBCore.Functions.Progressbar("drink_something", "YOU FUCKED NOW", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
DeleteEntity(drugdealer)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
end)
|
||||
--------------------------- lsd
|
||||
RegisterNetEvent("md-drugs:client:getloclsd")
|
||||
AddEventHandler("md-drugs:client:getloclsd", function()
|
||||
local unlucky = math.random(1,100)
|
||||
local CurrentLocation = Config.oxylocations[math.random(#Config.oxylocations)]
|
||||
local unluck = math.random(1,100)
|
||||
if deliveryBlip ~= nil then
|
||||
RemoveBlip(deliveryBlip)
|
||||
end
|
||||
if unlucky <= Config.AlertPoliceWholesale then
|
||||
PoliceCallWholesale()
|
||||
end
|
||||
deliveryBlip = AddBlipForCoord(CurrentLocation)
|
||||
SetBlipSprite(deliveryBlip, 1)
|
||||
SetBlipDisplay(deliveryBlip, 2)
|
||||
SetBlipScale(deliveryBlip, 1.0)
|
||||
SetBlipAsShortRange(deliveryBlip, false)
|
||||
SetBlipColour(deliveryBlip, 27)
|
||||
BeginTextCommandSetBlipName("STRING")
|
||||
AddTextComponentSubstringPlayerName("drug Meet")
|
||||
EndTextCommandSetBlipName(deliveryBlip)
|
||||
SetBlipRoute(deliveryBlip, true)
|
||||
druglocation = CircleZone:Create(CurrentLocation, 5,{ name = "lsdsell", debugPoly = false })
|
||||
druglocation:onPlayerInOut(function(isPointInside) if isPointInside then RemoveBlip(deliveryBlip) end end)
|
||||
lib.requestModel("g_m_y_famdnf_01", Config.requestModelTime)
|
||||
local current = "g_m_y_famdnf_01"
|
||||
drugdealer = CreatePed(0, current,CurrentLocation.x,CurrentLocation.y,CurrentLocation.z-1, 90.0, false, false)
|
||||
FreezeEntityPosition(drugdealer, true)
|
||||
SetEntityInvincible(drugdealer, true)
|
||||
exports['qb-target']:AddTargetEntity(drugdealer, {
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
label = "Talk To Buyer",
|
||||
icon = "fas fa-eye",
|
||||
action = function()
|
||||
local luck = math.random(1,100)
|
||||
local ped = GetEntityCoords(PlayerPedId())
|
||||
if luck <= Config.SuccessfulChance then
|
||||
TriggerEvent("md-drugs:client:successsalelsd")
|
||||
else
|
||||
|
||||
TriggerEvent("md-drugs:client:setuplsd")
|
||||
Wait(3000)
|
||||
SetUpPeds()
|
||||
end
|
||||
end,
|
||||
},
|
||||
},
|
||||
distance = 2.0
|
||||
})
|
||||
|
||||
|
||||
|
||||
end)
|
||||
|
||||
|
||||
RegisterNetEvent("md-drugs:client:successsalelsd")
|
||||
AddEventHandler("md-drugs:client:successsalelsd", function()
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
QBCore.Functions.Progressbar("drink_something", "Wholesaling Drugs", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
TriggerServerEvent("md-drugs:server:wholesalelsd")
|
||||
DeleteEntity(drugdealer)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:setuplsd")
|
||||
AddEventHandler("md-drugs:client:setuplsd", function()
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
QBCore.Functions.Progressbar("drink_something", "YOU FUCKED NOW", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
|
||||
DeleteEntity(drugdealer)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
end)
|
||||
------------------------- xtc
|
||||
RegisterNetEvent("md-drugs:client:getlocxtc")
|
||||
AddEventHandler("md-drugs:client:getlocxtc", function()
|
||||
local unlucky = math.random(1,100)
|
||||
local CurrentLocation = Config.oxylocations[math.random(#Config.oxylocations)]
|
||||
local unluck = math.random(1,100)
|
||||
if deliveryBlip ~= nil then
|
||||
RemoveBlip(deliveryBlip)
|
||||
end
|
||||
if unlucky <= Config.AlertPoliceWholesale then
|
||||
PoliceCallWholesale()
|
||||
end
|
||||
deliveryBlip = AddBlipForCoord(CurrentLocation)
|
||||
SetBlipSprite(deliveryBlip, 1)
|
||||
SetBlipDisplay(deliveryBlip, 2)
|
||||
SetBlipScale(deliveryBlip, 1.0)
|
||||
SetBlipAsShortRange(deliveryBlip, false)
|
||||
SetBlipColour(deliveryBlip, 27)
|
||||
BeginTextCommandSetBlipName("STRING")
|
||||
AddTextComponentSubstringPlayerName("drug Meet")
|
||||
EndTextCommandSetBlipName(deliveryBlip)
|
||||
SetBlipRoute(deliveryBlip, true)
|
||||
druglocation = CircleZone:Create(CurrentLocation, 5,{ name = "xtcsell", debugPoly = false })
|
||||
druglocation:onPlayerInOut(function(isPointInside) if isPointInside then RemoveBlip(deliveryBlip) end end)
|
||||
lib.requestModel("g_m_y_famdnf_01", Config.requestModelTime)
|
||||
local current = "g_m_y_famdnf_01"
|
||||
drugdealer = CreatePed(0, current,CurrentLocation.x,CurrentLocation.y,CurrentLocation.z-1, 90.0, false, false)
|
||||
FreezeEntityPosition(drugdealer, true)
|
||||
SetEntityInvincible(drugdealer, true)
|
||||
exports['qb-target']:AddTargetEntity(drugdealer, {
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
label = "Talk To Buyer",
|
||||
icon = "fas fa-eye",
|
||||
action = function()
|
||||
local luck = math.random(1,100)
|
||||
local ped = GetEntityCoords(PlayerPedId())
|
||||
if luck <= Config.SuccessfulChance then
|
||||
TriggerEvent("md-drugs:client:successsalextc")
|
||||
else
|
||||
|
||||
TriggerEvent("md-drugs:client:setupxtc")
|
||||
Wait(3000)
|
||||
SetUpPeds()
|
||||
|
||||
end
|
||||
end,
|
||||
},
|
||||
},
|
||||
distance = 2.0
|
||||
})
|
||||
|
||||
|
||||
|
||||
end)
|
||||
|
||||
|
||||
RegisterNetEvent("md-drugs:client:successsalextc")
|
||||
AddEventHandler("md-drugs:client:successsalextc", function()
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
QBCore.Functions.Progressbar("drink_something", "Wholesaling Drugs", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
ClearPedTasks(PlayerPedId())
|
||||
TriggerServerEvent("md-drugs:server:wholesalextc")
|
||||
DeleteEntity(drugdealer)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:setupxtc")
|
||||
AddEventHandler("md-drugs:client:setupxtc", function()
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
QBCore.Functions.Progressbar("drink_something", "YOU FUCKED NOW", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
ClearPedTasks(PlayerPedId())
|
||||
|
||||
DeleteEntity(drugdealer)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
end)
|
||||
@@ -1,837 +1,157 @@
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
local xtcpress = false
|
||||
RegisterNetEvent("md-drugs:client:setpressquad")
|
||||
AddEventHandler("md-drugs:client:setpressquad", function()
|
||||
if xtcpress then
|
||||
QBCore.Functions.Notify('You Have A Press Out Already', 'error')
|
||||
else
|
||||
local PedCoords = GetEntityCoords(PlayerPedId())
|
||||
|
||||
RegisterNetEvent("md-drugs:client:setpress", function(type)
|
||||
if xtcpress then
|
||||
Notify(Lang.xtc.out, 'error')
|
||||
else
|
||||
local coords, head = StartRay2()
|
||||
xtcpress = true
|
||||
progressbar('Setting Press On The Ground', 4000, 'uncuff')
|
||||
local press = CreateObject("bkr_prop_coke_press_01aa", coords.x, coords.y, coords.z, true, false, false)
|
||||
PlaceObjectOnGroundProperly(press)
|
||||
Freeze(press, true, head)
|
||||
local options = {
|
||||
{ icon = "fas fa-eye", label = Lang.targets.xtc.make, distance = 2.0, action = function() TriggerEvent("md-drugs:client:XTCMenu", type) end,
|
||||
canInteract = function() if xtcpress then return true end end
|
||||
},
|
||||
{icon = "fas fa-eye", label = Lang.targets.xtc.pick, action = function() TriggerEvent("md-drugs:client:GetPressBack", type, press) end, distance = 2.0,
|
||||
canInteract = function() if xtcpress then return true end end
|
||||
},
|
||||
}
|
||||
AddMultiModel(press, options, nil)
|
||||
end
|
||||
end)
|
||||
|
||||
lib.callback.register('md-drugs:client:setpress', function(type)
|
||||
if xtcpress then
|
||||
Notify(Lang.xtc.out, 'error')
|
||||
return false
|
||||
else
|
||||
local coords, head = StartRay2()
|
||||
xtcpress = true
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
Wait(4000)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
quadpress = CreateObject("bkr_prop_coke_press_01b", PedCoords.x+1, PedCoords.y+1, PedCoords.z-1, true, false)
|
||||
PlaceObjectOnGroundProperly(quadpress)
|
||||
exports['qb-target']:AddTargetEntity(quadpress, {
|
||||
options = {
|
||||
{
|
||||
event = "md-drugs:client:makextcquad",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Make White quad Stack',
|
||||
|
||||
},
|
||||
{
|
||||
event = "md-drugs:client:makeredxtcquad",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Make Red quad Stack',
|
||||
|
||||
},
|
||||
{
|
||||
event = "md-drugs:client:makeorangextcquad",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Make orange quad Stack',
|
||||
},
|
||||
{
|
||||
event = "md-drugs:client:makebluextcquad",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Make blue quad Stack',
|
||||
},
|
||||
{
|
||||
event = "md-drugs:client:getquadpressback",
|
||||
icon = "fas fa-eye",
|
||||
label = "Pick Up",
|
||||
canInteract = function()
|
||||
if xtcpress then return true end end
|
||||
progressbar('Setting Press On The Ground', 4000, 'uncuff')
|
||||
local press = CreateObject("bkr_prop_coke_press_01aa", coords.x, coords.y, coords.z, true, false, false)
|
||||
PlaceObjectOnGroundProperly(press)
|
||||
Freeze(press, true, head)
|
||||
local options = {
|
||||
{ icon = "fa-solid fa-tablets", label = Lang.targets.xtc.make, distance = 2.0, action = function() TriggerEvent("md-drugs:client:XTCMenu", type) end,
|
||||
canInteract = function() if xtcpress then return true end end
|
||||
},
|
||||
{icon = "fas fa-eye", label = Lang.targets.xtc.pick, action = function() TriggerEvent("md-drugs:client:GetPressBack", type, press) end, distance = 2.0,
|
||||
canInteract = function() if xtcpress then return true end end
|
||||
},
|
||||
}
|
||||
AddMultiModel(press, options, nil)
|
||||
return true, GetEntityCoords(press)
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:XTCMenu", function(type)
|
||||
local event = "md-drugs:client:MakeXTC"
|
||||
lib.registerContext({
|
||||
id = 'XTCmenu',
|
||||
title = 'XTC Menu',
|
||||
options = {
|
||||
{icon = GetImage('white_xtc'), title = 'White XTC', description = '1 X Raw XTC', event = event, args = { data = type, color = 'white'}},
|
||||
{icon = GetImage('red_xtc'), title = 'Red XTC', description = '1 X Raw XTC and 1 X Loose Coke', event = event, args = { data = type, color = 'red'}},
|
||||
{icon = GetImage('orange_xtc'), title = 'Orange XTC', description = '1 X Raw XTC and 1 X Heroin Vial', event = event, args = { data = type, color = 'orange'}},
|
||||
{icon = GetImage('blue_xtc'), title = 'Blue XTC', description = '1 X Raw XTC and 1 X Crack Rock', event = event, args = { data = type, color = 'blue'}},
|
||||
}
|
||||
})
|
||||
lib.showContext('XTCmenu')
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:GetPressBack", function(type, press)
|
||||
if not progressbar(Lang.xtc.pickup, 5000, 'uncuff') then return end
|
||||
DeleteObject(press)
|
||||
xtcpress = false
|
||||
TriggerServerEvent("md-drugs:server:getpressback", type)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:stealisosafrole", function(data)
|
||||
if not minigame() then Notify(Lang.xtc.fail, "error") return end
|
||||
if not progressbar(Lang.xtc.iso, 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:stealisosafrole",data.data)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:stealmdp2p", function(data)
|
||||
if not minigame() then Notify(Lang.xtc.fail, "error") return end
|
||||
if not progressbar(Lang.xtc.mdp2p, 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:stealmdp2p", data.data)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:makingrawxtc", function(data)
|
||||
if not ItemCheck('isosafrole') then return end
|
||||
if not ItemCheck('mdp2p') then return end
|
||||
if not progressbar(Lang.xtc.raw, 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:makingrawxtc",data.data)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:MakeXTC", function(data)
|
||||
if not ItemCheck('raw_xtc') then return end
|
||||
if not progressbar(Lang.xtc.pressing, 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:makextc",data)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:stampwhite", function(data)
|
||||
lib.registerContext({ id = 'stampxtc', title = 'Stamp XTC Menu',
|
||||
options = {
|
||||
{ icon = GetImage('white_xtc'), title = 'White XTC',
|
||||
onSelect = function()
|
||||
if not minigame() then Notify(Lang.xtc.fail, "error") return end
|
||||
if not progressbar(string.format(Lang.xtc.stamp, 'White'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:stampwhite",data.data)
|
||||
end
|
||||
},
|
||||
{ icon = GetImage('red_xtc'), title = 'Red XTC',
|
||||
onSelect = function()
|
||||
if not minigame() then Notify(Lang.xtc.fail, "error") return end
|
||||
if not progressbar(string.format(Lang.xtc.stamp, 'Red'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:stampred", data.data)
|
||||
end
|
||||
},
|
||||
{ icon = GetImage('orange_xtc'), title = 'Orange XTC',
|
||||
onSelect = function()
|
||||
if not minigame() then Notify(Lang.xtc.fail, "error") return end
|
||||
if not progressbar(string.format(Lang.xtc.stamp, 'Orange'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:stamporange", data.data)
|
||||
end,
|
||||
},
|
||||
{ icon = GetImage('blue_xtc'), title = 'Blue XTC',
|
||||
onSelect = function()
|
||||
if not minigame() then Notify(Lang.xtc.fail, "error") return end
|
||||
if not progressbar(string.format(Lang.xtc.stamp, 'Blue'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:stampblue", data.data)
|
||||
end
|
||||
},
|
||||
}
|
||||
})
|
||||
end
|
||||
lib.showContext('stampxtc')
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:setpresstriple")
|
||||
AddEventHandler("md-drugs:client:setpresstriple", function()
|
||||
if xtcpress then
|
||||
QBCore.Functions.Notify('You Have A Press Out Already', 'error')
|
||||
else
|
||||
local PedCoords = GetEntityCoords(PlayerPedId())
|
||||
xtcpress = true
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
Wait(4000)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
triplepress = CreateObject("bkr_prop_coke_press_01b", PedCoords.x+1, PedCoords.y+1, PedCoords.z-1, true, false)
|
||||
PlaceObjectOnGroundProperly(triplepress)
|
||||
exports['qb-target']:AddTargetEntity(triplepress, {
|
||||
options = {
|
||||
{
|
||||
event = "md-drugs:client:makextctriple",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Make White triple Stack',
|
||||
},
|
||||
{
|
||||
event = "md-drugs:client:makeredxtctriple",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Make Red triple Stack',
|
||||
},
|
||||
{
|
||||
event = "md-drugs:client:makeorangextctriple",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Make orange triple Stack',
|
||||
},
|
||||
{
|
||||
event = "md-drugs:client:makebluextctriple",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Make blue triple Stack',
|
||||
},
|
||||
{
|
||||
event = "md-drugs:client:gettriplepressback",
|
||||
icon = "fas fa-eye",
|
||||
label = "Pick Up",
|
||||
canInteract = function()
|
||||
if xtcpress then return true end end
|
||||
},
|
||||
}
|
||||
})
|
||||
end
|
||||
RegisterNetEvent("md-drugs:client:getsinglepress", function()
|
||||
if not progressbar(Lang.xtc.buyp, 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:buypress")
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:setpressdual")
|
||||
AddEventHandler("md-drugs:client:setpressdual", function()
|
||||
if xtcpress then
|
||||
QBCore.Functions.Notify('You Have A Press Out Already', 'error')
|
||||
else
|
||||
local PedCoords = GetEntityCoords(PlayerPedId())
|
||||
xtcpress = true
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
Wait(4000)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
dualpress = CreateObject("bkr_prop_coke_press_01b", PedCoords.x+1, PedCoords.y+1, PedCoords.z-1, true, false)
|
||||
PlaceObjectOnGroundProperly(dualpress)
|
||||
exports['qb-target']:AddTargetEntity(dualpress, {
|
||||
options = {
|
||||
{
|
||||
event = "md-drugs:client:makextcdual",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Make White dual Stack',
|
||||
|
||||
},
|
||||
{
|
||||
event = "md-drugs:client:makeredxtcdual",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Make Red dual Stack',
|
||||
|
||||
},
|
||||
{
|
||||
event = "md-drugs:client:makeorangextcdual",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Make orange dual Stack',
|
||||
|
||||
},
|
||||
{
|
||||
event = "md-drugs:client:makebluextcdual",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Make blue dual Stack',
|
||||
},
|
||||
{
|
||||
event = "md-drugs:client:getdualpressback",
|
||||
icon = "fas fa-eye",
|
||||
label = "Pick Up",
|
||||
canInteract = function()
|
||||
if xtcpress then return true end end
|
||||
},
|
||||
}
|
||||
})
|
||||
end
|
||||
RegisterNetEvent("md-drugs:client:exchangepresses", function(data)
|
||||
if not progressbar(Lang.xtc.buyp, 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:upgradepress", data.data)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:setpresssingle")
|
||||
AddEventHandler("md-drugs:client:setpresssingle", function()
|
||||
if xtcpress then
|
||||
QBCore.Functions.Notify('You Have A Press Out Already', 'error')
|
||||
else
|
||||
local PedCoords = GetEntityCoords(PlayerPedId())
|
||||
xtcpress = true
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
Wait(4000)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
singlepress = CreateObject("bkr_prop_coke_press_01aa", PedCoords.x+1, PedCoords.y+1, PedCoords.z-1, true, false)
|
||||
PlaceObjectOnGroundProperly(singlepress)
|
||||
exports['qb-target']:AddTargetEntity(singlepress, {
|
||||
options = {
|
||||
{
|
||||
event = "md-drugs:client:makextcsingle",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Make White Single Stack',
|
||||
|
||||
},
|
||||
{
|
||||
event = "md-drugs:client:makeredxtcsingle",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Make Red Single Stack',
|
||||
|
||||
},
|
||||
{
|
||||
event = "md-drugs:client:makeorangextcsingle",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Make orange Single Stack',
|
||||
|
||||
},
|
||||
{
|
||||
event = "md-drugs:client:makebluextcsingle",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Make blue Single Stack',
|
||||
|
||||
},
|
||||
{
|
||||
event = "md-drugs:client:getsinglepressback",
|
||||
icon = "fas fa-eye",
|
||||
label = "Pick Up",
|
||||
canInteract = function()
|
||||
if xtcpress then return true end end
|
||||
},
|
||||
}
|
||||
})
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:getsinglepressback")
|
||||
AddEventHandler("md-drugs:client:getsinglepressback", function()
|
||||
xtcpress = false
|
||||
DeleteObject(singlepress)
|
||||
TriggerServerEvent("md-drugs:server:getsinglepressback")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:getdualpressback")
|
||||
AddEventHandler("md-drugs:client:getdualpressback", function()
|
||||
xtcpress = false
|
||||
DeleteObject(dualpress)
|
||||
TriggerServerEvent("md-drugs:server:getdualpressback")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:gettriplepressback")
|
||||
AddEventHandler("md-drugs:client:gettriplepressback", function()
|
||||
xtcpress = false
|
||||
DeleteObject(triplepress)
|
||||
TriggerServerEvent("md-drugs:server:gettriplepressback")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:getquadpressback")
|
||||
AddEventHandler("md-drugs:client:getquadpressback", function()
|
||||
xtcpress = false
|
||||
DeleteObject(quadpress)
|
||||
TriggerServerEvent("md-drugs:server:getquadpressback")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:stealisosafrole")
|
||||
AddEventHandler("md-drugs:client:stealisosafrole", function()
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
QBCore.Functions.Progressbar("drink_something", "Stealing Isosafrole", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:stealisosafrole")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 1, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:stealmdp2p")
|
||||
AddEventHandler("md-drugs:client:stealmdp2p", function()
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
QBCore.Functions.Progressbar("drink_something", "Stealing MDP2P", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:stealmdp2p")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 1, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:makingrawxtc")
|
||||
AddEventHandler("md-drugs:client:makingrawxtc", function()
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
QBCore.Functions.Progressbar("drink_something", "Making Raw Ecstacy", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:makingrawxtc")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 1, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
---------------------------- unstamped just xtc
|
||||
RegisterNetEvent("md-drugs:client:makextcsingle")
|
||||
AddEventHandler("md-drugs:client:makextcsingle", function()
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
QBCore.Functions.Progressbar("drink_something", "Making Unstamped Single Stack Ecstacy", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:makextcsingle")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 4, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:makextcdual")
|
||||
AddEventHandler("md-drugs:client:makextcdual", function()
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
QBCore.Functions.Progressbar("drink_something", "Making Unstamped Dual Stack Ecstacy", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:makextcdual")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 3, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:makextctriple")
|
||||
AddEventHandler("md-drugs:client:makextctriple", function()
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
QBCore.Functions.Progressbar("drink_something", "Making Unstamped Triple Stack Ecstacy", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:makextctriple")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 2, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:makextcquad")
|
||||
AddEventHandler("md-drugs:client:makextcquad", function()
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
QBCore.Functions.Progressbar("drink_something", "Making Unstamped Quad Stack Ecstacy", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:makextcquad")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 1, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
-------------------------------------------------
|
||||
RegisterNetEvent("md-drugs:client:makeredxtcsingle")
|
||||
AddEventHandler("md-drugs:client:makeredxtcsingle", function()
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
QBCore.Functions.Progressbar("drink_something", "Making Unstamped Red Single Stack Ecstacy", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:makeredxtcsingle")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 4, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:makeredxtcdual")
|
||||
AddEventHandler("md-drugs:client:makeredxtcdual", function()
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
QBCore.Functions.Progressbar("drink_something", "Making Unstamped Red Dual Stack Ecstacy", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:makeredxtcdual")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 3, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:makeredxtctriple")
|
||||
AddEventHandler("md-drugs:client:makeredxtctriple", function()
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
QBCore.Functions.Progressbar("drink_something", "Making Unstamped Red Triple Stack Ecstacy", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:makeredxtctriple")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 2, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:makeredxtcquad")
|
||||
AddEventHandler("md-drugs:client:makeredxtcquad", function()
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
QBCore.Functions.Progressbar("drink_something", "Making Unstamped Red Quad Stack Ecstacy", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:makeredxtcquad")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 1, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
--------------------------------------------------------------- making orange unstamped
|
||||
RegisterNetEvent("md-drugs:client:makeorangextcsingle")
|
||||
AddEventHandler("md-drugs:client:makeorangextcsingle", function()
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
QBCore.Functions.Progressbar("drink_something", "Making Unstamped Orange Single Stack Ecstacy", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:makeorangextcsingle")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 4, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:makeorangextcdual")
|
||||
AddEventHandler("md-drugs:client:makeorangextcdual", function()
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
QBCore.Functions.Progressbar("drink_something", "Making Unstamped Orange Dual Stack Ecstacy", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:makeorangextcdual")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 3, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:makeorangextctriple")
|
||||
AddEventHandler("md-drugs:client:makeorangextctriple", function()
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
QBCore.Functions.Progressbar("drink_something", "Making Unstamped Orange Triple Stack Ecstacy", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:makeorangextctriple")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 2, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:makeorangextcquad")
|
||||
AddEventHandler("md-drugs:client:makeorangextcquad", function()
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
QBCore.Functions.Progressbar("drink_something", "Making Unstamped Orange Quad Stack Ecstacy", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:makeorangextcquad")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 1, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
--------------------------------------- blue unstamped
|
||||
RegisterNetEvent("md-drugs:client:makebluextcsingle")
|
||||
AddEventHandler("md-drugs:client:makebluextcsingle", function()
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
QBCore.Functions.Progressbar("drink_something", "Making Unstamped Orange Single Stack Ecstacy", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:makebluextcsingle")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 4, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:makebluextcdual")
|
||||
AddEventHandler("md-drugs:client:makebluextcdual", function()
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
QBCore.Functions.Progressbar("drink_something", "Making Unstamped Blue Dual Stack Ecstacy", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:makebluextcdual")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 3, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:makebluextctriple")
|
||||
AddEventHandler("md-drugs:client:makebluextctriple", function()
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
QBCore.Functions.Progressbar("drink_something", "Making Unstamped Blue Triple Stack Ecstacy", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:makebluextctriple")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 2, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:makebluextcquad")
|
||||
AddEventHandler("md-drugs:client:makebluextcquad", function()
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
QBCore.Functions.Progressbar("drink_something", "Making Unstamped Blue Quad Stack Ecstacy", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:makebluextcquad")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 1, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
------------------------------------------------------------------ Stamping
|
||||
RegisterNetEvent("md-drugs:client:stampwhite")
|
||||
AddEventHandler("md-drugs:client:stampwhite", function()
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
QBCore.Functions.Progressbar("drink_something", "Making Stamped Pills", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:stampwhite")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 2, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:stampred")
|
||||
AddEventHandler("md-drugs:client:stampred", function()
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
QBCore.Functions.Progressbar("drink_something", "Making Stamped Pills", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:stampred")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 2, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:stamporange")
|
||||
AddEventHandler("md-drugs:client:stamporange", function()
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
QBCore.Functions.Progressbar("drink_something", "Making Stamped Pills", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:stamporange")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 2, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:stampblue")
|
||||
AddEventHandler("md-drugs:client:stampblue", function()
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
QBCore.Functions.Progressbar("drink_something", "Making Stamped Pills", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:stampblue")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 2, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:getsinglepress")
|
||||
AddEventHandler("md-drugs:client:getsinglepress", function()
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
QBCore.Functions.Progressbar("drink_something", "Buying Press", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
TriggerServerEvent("md-drugs:server:buypress")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
|
||||
end)
|
||||
end)
|
||||
RegisterNetEvent("md-drugs:client:exchangepresses")
|
||||
AddEventHandler("md-drugs:client:exchangepresses", function()
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'})
|
||||
QBCore.Functions.Progressbar("drink_something", "Buying Press", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
TriggerServerEvent("md-drugs:server:upgradepress")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
|
||||
end)
|
||||
end)
|
||||
RegisterNetEvent("md-drugs:client:buypress")
|
||||
AddEventHandler("md-drugs:client:buypress", function()
|
||||
RegisterNetEvent("md-drugs:client:buypress", function()
|
||||
local img = GetImage('singlepress')
|
||||
lib.registerContext({
|
||||
id = 'buypresses',
|
||||
title = 'Purchase Presses',
|
||||
options = {
|
||||
|
||||
{
|
||||
title = 'Single Press',
|
||||
description = 'Buy a single press for 20k',
|
||||
icon = "fa-solid fa-wallet",
|
||||
event = 'md-drugs:client:getsinglepress',
|
||||
},
|
||||
{
|
||||
title = 'Exchange Single For Dual',
|
||||
description = '20 of each unstamped single stack pill and your single press ',
|
||||
icon = "fa-solid fa-wallet",
|
||||
event = 'md-drugs:client:exchangepresses',
|
||||
},
|
||||
{
|
||||
title = 'Exchange Dual For Triple',
|
||||
description = '50 of each unstamped dual stack pill and your dual press ',
|
||||
icon = "fa-solid fa-wallet",
|
||||
event = 'md-drugs:client:exchangepresses',
|
||||
},
|
||||
{
|
||||
title = 'Exchange Triple For Quad',
|
||||
description = '150 of each unstamped Triple stack pill and your triple press ',
|
||||
icon = "fa-solid fa-wallet",
|
||||
event = 'md-drugs:client:exchangepresses',
|
||||
}
|
||||
}
|
||||
id = 'buypresses',
|
||||
title = 'Purchase Presses',
|
||||
options = {
|
||||
{title = Lang.xtc.press.title.single, description = Lang.xtc.press.des.single, icon = img, event = 'md-drugs:client:getsinglepress'},
|
||||
{title = Lang.xtc.press.title.dual, description = Lang.xtc.press.des.dual, icon = img, event = 'md-drugs:client:exchangepresses', args = {data = 'dual'}},
|
||||
{title = Lang.xtc.press.title.triple, description = Lang.xtc.press.des.triple, icon = img, event = 'md-drugs:client:exchangepresses', args = {data = 'triple'}},
|
||||
{title = Lang.xtc.press.title.quad, description = Lang.xtc.press.des.quad, icon = img, event = 'md-drugs:client:exchangepresses', args = {data = 'quad'}}
|
||||
}
|
||||
})
|
||||
lib.showContext('buypresses')
|
||||
end)
|
||||
|
||||
|
||||
@@ -3,31 +3,28 @@ author "mustache_dom"
|
||||
description "drugs by mustache dom"
|
||||
fx_version "cerulean"
|
||||
game "gta5"
|
||||
version '3.0.0'
|
||||
version '3.9.0'
|
||||
client_scripts {
|
||||
'client/**.lua',
|
||||
'@PolyZone/client.lua',
|
||||
'@PolyZone/CircleZone.lua',
|
||||
}
|
||||
|
||||
server_scripts {
|
||||
'server/**.lua',
|
||||
'server/functions.lua',
|
||||
'server/**.lua',
|
||||
'@oxmysql/lib/MySQL.lua',
|
||||
|
||||
}
|
||||
|
||||
shared_scripts {
|
||||
'shared/config.lua',
|
||||
'@ox_lib/init.lua',
|
||||
'shared/**.lua',
|
||||
}
|
||||
|
||||
|
||||
lua54 'yes'
|
||||
|
||||
|
||||
dependency 'bob74_ipl'
|
||||
files {
|
||||
'stream/mushroom.ytyp'
|
||||
'stream/mushroom.ytyp',
|
||||
'stream/mushroom.ydr'
|
||||
}
|
||||
|
||||
data_file 'DLC_ITYP_REQUEST' 'stream/mushroom.ytyp'
|
||||
|
Before Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 5.0 KiB |
|
Before Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 6.3 KiB |
|
Before Width: | Height: | Size: 61 KiB |
|
Before Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 7.0 KiB |
|
Before Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 5.9 KiB |
|
Before Width: | Height: | Size: 5.2 KiB |
|
Before Width: | Height: | Size: 5.2 KiB |
|
Before Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 6.5 KiB |
|
Before Width: | Height: | Size: 6.5 KiB |
|
Before Width: | Height: | Size: 6.4 KiB |
|
Before Width: | Height: | Size: 51 KiB |
|
Before Width: | Height: | Size: 52 KiB |
|
Before Width: | Height: | Size: 80 KiB |
|
Before Width: | Height: | Size: 60 KiB |
|
Before Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 6.5 KiB |
|
Before Width: | Height: | Size: 8.2 KiB |
|
Before Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 5.1 KiB |
|
Before Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 62 KiB |
|
Before Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 52 KiB |
|
Before Width: | Height: | Size: 102 KiB |
|
Before Width: | Height: | Size: 105 KiB |
|
Before Width: | Height: | Size: 104 KiB |
|
Before Width: | Height: | Size: 218 KiB |
|
Before Width: | Height: | Size: 9.5 KiB |
|
Before Width: | Height: | Size: 62 KiB |
|
Before Width: | Height: | Size: 5.0 KiB |
|
Before Width: | Height: | Size: 5.2 KiB |
|
Before Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 203 KiB |
|
Before Width: | Height: | Size: 6.5 KiB |
|
Before Width: | Height: | Size: 6.9 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 9.4 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 7.3 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 9.8 KiB |