Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0e55a18676 | ||
|
|
28d4244243 | ||
|
|
ff5a86b3f3 | ||
|
|
0f80534168 | ||
|
|
30f12ebbe5 | ||
|
|
fdd4b0cb7b | ||
|
|
32af7ae59a | ||
|
|
c08ff45617 | ||
|
|
97af3833b7 | ||
|
|
4e48857437 | ||
|
|
c3084abc78 | ||
|
|
d97cd43951 | ||
|
|
7ceaa97b5f | ||
|
|
11e7015672 | ||
|
|
c7eca0285b | ||
|
|
fdc28723bc | ||
|
|
1d82b8beba | ||
|
|
5db30458eb | ||
|
|
b5297bd109 | ||
|
|
547ba993d4 | ||
|
|
c380c75149 | ||
|
|
9c0723d4c7 | ||
|
|
c3aaf67421 | ||
|
|
addce12081 | ||
|
|
a975406031 | ||
|
|
c752baffda | ||
|
|
fc8a623067 | ||
|
|
c1c8b8cb86 | ||
|
|
690db7ce55 | ||
|
|
d46e28e8f2 | ||
|
|
fb500dc502 | ||
|
|
df9584711a | ||
|
|
66934fd68a | ||
|
|
ebc47ba5d7 | ||
|
|
d2f70d78ed | ||
|
|
0ed22eb62b | ||
|
|
a02e333688 | ||
|
|
50aca1d946 | ||
|
|
257c0e8d97 | ||
|
|
d250006a03 | ||
|
|
9a1704b08b | ||
|
|
c31f9e4d4e | ||
|
|
3ba3c5bc9d | ||
|
|
ec5e4f0e15 | ||
|
|
0b6b7e178b | ||
|
|
feb1d6e7d5 | ||
|
|
2c1401f9a3 | ||
|
|
d41944d3e3 | ||
|
|
b79c9fba17 | ||
|
|
e93ce41218 | ||
|
|
49a8749ddf | ||
|
|
767914043f | ||
|
|
6198b50400 | ||
|
|
0e94b82a96 | ||
|
|
5032d561ff | ||
|
|
4d51671d7d | ||
|
|
d21e71e00a | ||
|
|
ad3e35c3dc | ||
|
|
52c6eaec91 | ||
|
|
69879dd0df | ||
|
|
cab8646830 | ||
|
|
1a44099624 | ||
|
|
ecd80656af | ||
|
|
b6c9338792 | ||
|
|
861476ad71 | ||
|
|
20da44cf88 | ||
|
|
ab81a09922 | ||
|
|
a37ed02864 | ||
|
|
8909a96033 | ||
|
|
3c206491dd | ||
|
|
532ef823e2 | ||
|
|
76f228c1ac | ||
|
|
8811f7e73c | ||
|
|
e3262e2886 | ||
|
|
291ac27e36 | ||
|
|
2765eef9b3 | ||
|
|
0599c60864 | ||
|
|
880479b435 | ||
|
|
1f3d7154aa | ||
|
|
d9fcb11930 | ||
|
|
af0efacfe9 | ||
|
|
bf9d435b03 | ||
|
|
c47b69ceca | ||
|
|
108bed7443 | ||
|
|
59c094fdae | ||
|
|
f28a358c5c | ||
|
|
7cc5485864 | ||
|
|
ef328ac90c | ||
|
|
891d4abf73 | ||
|
|
52cf323a20 | ||
|
|
87c4aa77a7 | ||
|
|
e8337514e7 | ||
|
|
c4664ae5fb | ||
|
|
68723ac088 | ||
|
|
9f4339a4ea | ||
|
|
3364968e85 | ||
|
|
689bc79868 | ||
|
|
2764466d4c | ||
|
|
e4c41458dc | ||
|
|
b5eb60834f | ||
|
|
804eba41c9 | ||
|
|
3c05cf79c3 | ||
|
|
9511a46dad | ||
|
|
25f9979731 | ||
|
|
a079efd5c8 | ||
|
|
ca50437751 | ||
|
|
51059f6aed | ||
|
|
683eaff7de | ||
|
|
37f86bf50d | ||
|
|
3574ecef5b | ||
|
|
daa1a4f8a3 | ||
|
|
314f7381d1 | ||
|
|
2fd900ec22 | ||
|
|
3c8b654b28 | ||
|
|
e3caf16b53 | ||
|
|
49f43b997b | ||
|
|
94c6458037 | ||
|
|
2dd8729dc9 | ||
|
|
a86a342f4d | ||
|
|
4fdef3cf30 | ||
|
|
1b29aaa3b0 | ||
|
|
9e84111da3 | ||
|
|
7422c9d57b | ||
|
|
8e2dc89398 | ||
|
|
d199e017c2 | ||
|
|
4cacab3c7c | ||
|
|
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 | ||
|
|
7d9d4a030d | ||
|
|
83ac3cb39b | ||
|
|
216eca4494 | ||
|
|
d60d10a5a5 | ||
|
|
d9fbf56164 | ||
|
|
bd79cba415 | ||
|
|
ed620e7038 | ||
|
|
088b8f2674 | ||
|
|
5363c3d533 | ||
|
|
a51835a825 | ||
|
|
99259b5434 | ||
|
|
27b9f75a6e | ||
|
|
aaa60b9a2c | ||
|
|
499b4a97cc | ||
|
|
29c507f677 | ||
|
|
a24ee482b8 | ||
|
|
f8a928a76b | ||
|
|
60d11b200c | ||
|
|
cceb82c139 | ||
|
|
d494ec8c88 | ||
|
|
d63e0d3d78 | ||
|
|
6c1e984ff5 | ||
|
|
e592da8230 | ||
|
|
0e04e0b156 | ||
|
|
cea5054554 | ||
|
|
bdc392f134 | ||
|
|
a3da2844ce | ||
|
|
1439a22ce0 | ||
|
|
134a80d986 | ||
|
|
e174078b5f | ||
|
|
0cc50f7010 | ||
|
|
9774b52a6c | ||
|
|
1157b5378f | ||
|
|
c04c28985a | ||
|
|
a8439dcd0b | ||
|
|
f0b851653d | ||
|
|
af81673f3b | ||
|
|
bbed82e3e1 | ||
|
|
51841fb5c9 | ||
|
|
a7e4f8bf71 | ||
|
|
b1cf8a900c | ||
|
|
345f4418a3 | ||
|
|
217f5c1608 | ||
|
|
4af79e9792 | ||
|
|
6f2a3431a9 | ||
|
|
94c05a1753 | ||
|
|
a42889b454 | ||
|
|
eb804a5594 | ||
|
|
3d7569f73f | ||
|
|
e31a478eeb | ||
|
|
436b0b0472 | ||
|
|
01f960c6c0 | ||
|
|
435ae9f8e1 | ||
|
|
c30ba23479 | ||
|
|
4ad0de9692 | ||
|
|
36888a55e8 | ||
|
|
45d2e5e72f | ||
|
|
6afbaa0512 | ||
|
|
04ae430093 | ||
|
|
2e9024708b | ||
|
|
fbdc8b23b6 | ||
|
|
a3f7c5dff0 | ||
|
|
9270fa4f5f | ||
|
|
ecf068582e | ||
|
|
f21ee5bf26 | ||
|
|
36fb81f1fe | ||
|
|
1704765e2e | ||
|
|
be78294766 | ||
|
|
2c3f9ea216 | ||
|
|
e29ded10a1 | ||
|
|
fb1cf80ade | ||
|
|
2b2427f46e | ||
|
|
d81d023efc | ||
|
|
8667a0d7b7 | ||
|
|
575da36175 | ||
|
|
399592ae7f | ||
|
|
10232d32ac |
No files matched your search
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"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",
|
||||
"targets"
|
||||
]
|
||||
}
|
||||
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 22 KiB |
@@ -0,0 +1,25 @@
|
||||
fx_version 'cerulean'
|
||||
game 'gta5'
|
||||
|
||||
lua54 'yes'
|
||||
this_is_a_map 'yes'
|
||||
|
||||
author 'Atenea'
|
||||
description 'Balloon / MD-Drugs'
|
||||
version '1.0.1'
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
-- INCLUDED FILES
|
||||
---------------------------------------------------------------------------
|
||||
files {
|
||||
'stream/*.ytyp',
|
||||
}
|
||||
|
||||
data_file 'DLC_ITYP_REQUEST' 'stream/*.ytyp'
|
||||
|
||||
dependency '/assetpacks'
|
||||
|
||||
|
||||
escrow_ignore {
|
||||
'stream/*.ydr',
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
Thank you for your purchase!
|
||||
We hope you enjoy this prop ♥
|
||||
|
||||
Author: Atenea Store | Atenea
|
||||
|
||||
-- IMPORTANT --
|
||||
/Please read below.
|
||||
|
||||
► If you rename the folder or files I will not be responsible if it does not work correctly afterwards.
|
||||
|
||||
► If you encounter any problems, errors, or have any questions related to our prop, JOIN OUR DISCORD.
|
||||
Don't hesitate to open a ticket, we’ll assist you as quickly as possible.
|
||||
|
||||
https://discord.gg/mam8Nmg49d
|
||||
|
||||
SCRIPTS
|
||||
https://discord.gg/S5WZ7ecKDc
|
||||
|
||||
Make sure you’ve already READ our post on FiveM/Tebex/Discord.
|
||||
Atenea from the Atenea Store Team.
|
||||
@@ -0,0 +1,35 @@
|
||||
if not Config.Drugs['TravellingMerchant'] then return end
|
||||
local function spawn()
|
||||
local data = Bridge.Callback.Trigger('md-drugs:server:GetMerchant')
|
||||
local model = 's_m_m_trucker_01'
|
||||
requestModel(model)
|
||||
local ped = CreatePed(4, model, data.loc.x, data.loc.y, data.loc.z, data.loc.w, false, true)
|
||||
Freeze(ped, true, data.loc.w)
|
||||
Bridge.Target.AddLocalEntity(ped, {
|
||||
{
|
||||
icon = Bridge.Language.Locale('merchant.targetIcon'),
|
||||
label = Bridge.Language.Locale('merchant.targetOpen'),
|
||||
action = function()
|
||||
local options = {}
|
||||
for k, v in pairs (data.items) do
|
||||
local itemInfo = Bridge.Inventory.GetItemInfo(k)
|
||||
options[#options+1] = {
|
||||
title = itemInfo.label,
|
||||
description = '$'..v,
|
||||
icon = itemInfo.image,
|
||||
onSelect = function()
|
||||
TriggerServerEvent('md-drugs:server:purchaseGoods', k)
|
||||
end
|
||||
}
|
||||
end
|
||||
Bridge.Menu.Open({
|
||||
id = 'merchant_menu',
|
||||
title = Bridge.Language.Locale('merchant.menuTitle'),
|
||||
options = options
|
||||
})
|
||||
end
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = ped
|
||||
end
|
||||
spawn()
|
||||
@@ -1,146 +1,210 @@
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
local CocaPlant = {}
|
||||
local cuttingcoke = nil
|
||||
local baggingcoke = nil
|
||||
local locations = Config.Cocaine.Locations
|
||||
|
||||
function LoadModel(hash)
|
||||
hash = GetHashKey(hash)
|
||||
RequestModel(hash)
|
||||
while not HasModelLoaded(hash) do
|
||||
Wait(3000)
|
||||
local function CutCoke(coords, offset, rotation)
|
||||
cuttingcoke = true
|
||||
local animDict, animName = "anim@amb@business@coc@coc_unpack_cut_left@", "coke_cut_v5_coccutter"
|
||||
Bridge.Anim.RequestDict(animDict, 500)
|
||||
local animDuration = GetAnimDuration(animDict, animName) * 1000
|
||||
local ped = PlayerPedId()
|
||||
local scenePos, sceneRot = vector3(coords.x + offset.x, coords.y + offset.y,coords.z + offset.z), rotation
|
||||
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"}
|
||||
},
|
||||
}
|
||||
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
|
||||
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)
|
||||
cuttingcoke = nil
|
||||
end
|
||||
|
||||
local function BagCoke(coords, offset, rotation)
|
||||
baggingcoke = true
|
||||
local ver = ""
|
||||
local animDict, animName = "anim@amb@business@meth@meth_smash_weight_check@", "break_weigh_"..ver.."char01"
|
||||
Bridge.Anim.RequestDict(animDict, 500)
|
||||
local animDuration = GetAnimDuration(animDict, animName) * 1000
|
||||
local ped = PlayerPedId()
|
||||
local scenePos, sceneRot = vector3(coords.x + offset.x, coords.y + offset.y,coords.z + offset.z +0.03), rotation
|
||||
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 = "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_fakeid_clipboard_01a", animName = "break_weigh_"..ver.."clipboard"},
|
||||
}
|
||||
}
|
||||
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
|
||||
scenesList[#scenesList+1] = scene
|
||||
end
|
||||
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
|
||||
})
|
||||
DisableCamCollisionForEntity(ped)
|
||||
FreezeEntityPosition(ped, true)
|
||||
for i=1, #scenesList, 1 do
|
||||
NetworkStartSynchronisedScene(scenesList[i])
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterNetEvent('coke:removeCane', function(loc)
|
||||
if DoesEntityExist(CocaPlant[loc]) then DeleteEntity(CocaPlant[loc]) end
|
||||
CocaPlant[loc] = nil
|
||||
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
|
||||
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
|
||||
})
|
||||
end
|
||||
Wait(animDuration-11000)
|
||||
for i=1, #scenesList, 1 do
|
||||
NetworkStopSynchronisedScene(scenesList[i])
|
||||
end
|
||||
end)
|
||||
|
||||
AddEventHandler('onResourceStart', function(resource)
|
||||
if resource == GetCurrentResourceName() then
|
||||
LoadModel('prop_plant_01a')
|
||||
TriggerEvent('coke:init')
|
||||
for i=1, #entitiesList, 1 do
|
||||
DeleteEntity(entitiesList[i])
|
||||
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'))
|
||||
for k, v in pairs(CocaPlant) do
|
||||
if DoesEntityExist(v) then
|
||||
DeleteEntity(v) SetEntityAsNoLongerNeeded(v)
|
||||
RemoveAnimDict(animDict)
|
||||
FreezeEntityPosition(ped, false)
|
||||
baggingcoke = nil
|
||||
end
|
||||
|
||||
for k, v in pairs (locations.MakePowder) do
|
||||
Bridge.Target.AddBoxZone('cocaplant'..k, v.loc, v.size, v.loc.w or 180.0, {
|
||||
{
|
||||
label = Bridge.Language.Locale('coke.targetMakePow'),
|
||||
icon = Bridge.Language.Locale('coke.targetMakePowIcon'),
|
||||
action = function()
|
||||
if not itemCheck('coca_leaf') then return end
|
||||
if not progressbar(Bridge.Language.Locale('coke.makePow')) then return end
|
||||
TriggerServerEvent("md-drugs:server:makepowder", k)
|
||||
end,
|
||||
canInteract = function()
|
||||
return handleGang(v.gang)
|
||||
end
|
||||
end
|
||||
end
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = 'cocaplant'..k
|
||||
end
|
||||
|
||||
for k, v in pairs (locations.CuttingCoke) do
|
||||
Bridge.Target.AddBoxZone('cutcoke'..k, v.loc, v.size, v.loc.w or 180.0, {
|
||||
{
|
||||
label = Bridge.Language.Locale('coke.targetCutCoke'),
|
||||
icon = Bridge.Language.Locale('coke.targetCutCokeIcon'),
|
||||
action = function()
|
||||
if not itemCheck('bakingsoda') then return end
|
||||
CutCoke(v.loc, v.offset, v.rotation)
|
||||
TriggerServerEvent("md-drugs:server:cutcokeone", k)
|
||||
end,
|
||||
canInteract = function()
|
||||
if not handleGang(v.gang) then return false end
|
||||
if cuttingcoke ~= nil or baggingcoke ~= nil then return false end
|
||||
return true
|
||||
end,
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = 'cutcoke'..k
|
||||
end
|
||||
|
||||
for k, v in pairs (locations.BaggingCoke) do
|
||||
Bridge.Target.AddBoxZone('bagcoke'..k, v.loc, v.size, v.loc.w or 180.0, {
|
||||
{
|
||||
label = Bridge.Language.Locale('coke.targetBagCoke'),
|
||||
icon = Bridge.Language.Locale('coke.targetBagCokeIcon'),
|
||||
action = function()
|
||||
if not itemCheck('empty_weed_bag') then return end
|
||||
BagCoke(v.loc, v.offset, v.rotation)
|
||||
TriggerServerEvent("md-drugs:server:bagcoke", k)
|
||||
end,
|
||||
canInteract = function()
|
||||
if not handleGang(v.gang) then return false end
|
||||
if cuttingcoke ~= nil or baggingcoke ~= nil then return false end
|
||||
return true
|
||||
end
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = 'bagcoke'..k
|
||||
end
|
||||
|
||||
for k, v in pairs (locations.cokeTele) do
|
||||
Bridge.Target.AddBoxZone('coke_tele'..k, v.inside, v.size, v.inside.w or 180.0,{
|
||||
{
|
||||
icon = Bridge.Language.Locale('coke.teleOutIcon'),
|
||||
label = Bridge.Language.Locale('coke.teleOut'),
|
||||
action = function()
|
||||
SetEntityCoords(PlayerPedId(), v.outside)
|
||||
end,
|
||||
canInteract = function()
|
||||
return handleGang(v.gang)
|
||||
end
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = 'coke_tele'..k
|
||||
Bridge.Target.AddBoxZone('coke_teleout'..k, v.outside, v.size, v.outside.w or 180.0,{
|
||||
{
|
||||
icon = Bridge.Language.Locale('coke.teleInIcon'),
|
||||
label = Bridge.Language.Locale('coke.teleIn'),
|
||||
action = function()
|
||||
SetEntityCoords(PlayerPedId(), v.inside)
|
||||
end,
|
||||
canInteract = function()
|
||||
return handleGang(v.gang)
|
||||
end
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = 'coke_teleout'..k
|
||||
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)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:makepowder")
|
||||
AddEventHandler("md-drugs:client:makepowder", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
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)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:cutcokeone")
|
||||
AddEventHandler("md-drugs:client:cutcokeone", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "cutting coke to increase profits yeeee!", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
TriggerServerEvent("md-drugs:server:cutcokeone")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:bagcoke")
|
||||
AddEventHandler("md-drugs:client:bagcoke", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Bilbo Baggin this bitch!", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
TriggerServerEvent("md-drugs:server:bagcoke")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
end)
|
||||
@@ -1,24 +1,146 @@
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
if not Config.Drugs['consumables'] then return end
|
||||
|
||||
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 == "cokebaggystagetwo" or itemName == "cokebaggystagethree" or itemName == "baggedcracked" or itemName == "baggedcrackedstagetwo" or itemName == "baggedcrackedstagethree" then
|
||||
CokeBaggyEffect()
|
||||
else
|
||||
TrevorEffect()
|
||||
end
|
||||
end)
|
||||
Bridge.Callback.Register('md-drugs:client:consumedrugs', function(time, effect, anim, progresstext, status, item)
|
||||
Bridge.Anim.RequestDict(anim.dict)
|
||||
if not progressbar(progresstext .. Bridge.Inventory.GetItemInfo(item).label.. "!", 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)
|
||||
|
||||
local function EcstasyEffect()
|
||||
local startStamina = 50
|
||||
SetFlash(0, 0, 500, 20000, 500)
|
||||
while startStamina > 0 do
|
||||
Wait(1000)
|
||||
startStamina = startStamina - 1
|
||||
RestorePlayerStamina(PlayerId(), 1.0)
|
||||
if math.random(1, 100) < 51 then
|
||||
SetFlash(0, 0, 500, 7000, 500)
|
||||
ShakeGameplayCam('SMALL_EXPLOSION_SHAKE', 0.08)
|
||||
end
|
||||
end
|
||||
if IsPedRunning(PlayerPedId()) then
|
||||
SetPedToRagdoll(PlayerPedId(), math.random(1000, 3000), math.random(1000, 3000), 3, 0, 0, 0)
|
||||
end
|
||||
startStamina = 0
|
||||
end
|
||||
|
||||
local function TrevorEffect()
|
||||
StartScreenEffect("DrugsTrevorClownsFightIn", 3.0, 0)
|
||||
Wait(3000)
|
||||
StartScreenEffect("DrugsTrevorClownsFight", 3.0, 0)
|
||||
Wait(3000)
|
||||
StartScreenEffect("DrugsTrevorClownsFightOut", 3.0, 0)
|
||||
StopScreenEffect("DrugsTrevorClownsFight")
|
||||
StopScreenEffect("DrugsTrevorClownsFightIn")
|
||||
StopScreenEffect("DrugsTrevorClownsFightOut")
|
||||
end
|
||||
|
||||
local function MethBagEffect()
|
||||
local startStamina = 30
|
||||
TrevorEffect()
|
||||
SetRunSprintMultiplierForPlayer(PlayerId(), 1.49)
|
||||
while startStamina > 0 do
|
||||
Wait(1000)
|
||||
if math.random(5, 100) < 10 then
|
||||
RestorePlayerStamina(PlayerId(), 1.0)
|
||||
end
|
||||
startStamina = startStamina - 1
|
||||
if math.random(5, 100) < 51 then
|
||||
TrevorEffect()
|
||||
end
|
||||
end
|
||||
startStamina = 0
|
||||
SetRunSprintMultiplierForPlayer(PlayerId(), 1.0)
|
||||
end
|
||||
|
||||
local function AlienEffect()
|
||||
StartScreenEffect("DrugsMichaelAliensFightIn", 3.0, 0)
|
||||
Wait(math.random(5000, 8000))
|
||||
StartScreenEffect("DrugsMichaelAliensFight", 3.0, 0)
|
||||
Wait(math.random(5000, 8000))
|
||||
StartScreenEffect("DrugsMichaelAliensFightOut", 3.0, 0)
|
||||
StopScreenEffect("DrugsMichaelAliensFightIn")
|
||||
StopScreenEffect("DrugsMichaelAliensFight")
|
||||
StopScreenEffect("DrugsMichaelAliensFightOut")
|
||||
end
|
||||
|
||||
local function CokeBaggyEffect()
|
||||
local startStamina = 20
|
||||
local ped = PlayerPedId()
|
||||
AlienEffect()
|
||||
SetRunSprintMultiplierForPlayer(PlayerId(), 1.1)
|
||||
while startStamina > 0 do
|
||||
Wait(1000)
|
||||
if math.random(1, 100) < 20 then
|
||||
RestorePlayerStamina(PlayerId(), 1.0)
|
||||
end
|
||||
startStamina = startStamina - 1
|
||||
if math.random(1, 100) < 10 and IsPedRunning(ped) then
|
||||
SetPedToRagdoll(ped, math.random(1000, 3000), math.random(1000, 3000), 3, 0, 0, 0)
|
||||
end
|
||||
if math.random(1, 300) < 10 then
|
||||
AlienEffect()
|
||||
Wait(math.random(3000, 6000))
|
||||
end
|
||||
end
|
||||
if IsPedRunning(ped) then
|
||||
SetPedToRagdoll(ped, math.random(1000, 3000), math.random(1000, 3000), 3, 0, 0, 0)
|
||||
end
|
||||
|
||||
startStamina = 0
|
||||
SetRunSprintMultiplierForPlayer(PlayerId(), 1.0)
|
||||
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()
|
||||
end
|
||||
end)
|
||||
@@ -1,312 +1,227 @@
|
||||
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 inZone = false
|
||||
local buyers = {}
|
||||
|
||||
-- Functions
|
||||
local function LoadAnimDict(dict)
|
||||
RequestAnimDict(dict)
|
||||
while not HasAnimDictLoaded(dict) do
|
||||
Wait(0)
|
||||
local function walkAway(targ)
|
||||
FreezeEntityPosition(targ, false)
|
||||
ClearPedTasks(targ)
|
||||
end
|
||||
|
||||
local function sellDrug(item, amount, price, targ)
|
||||
PoliceCall(20)
|
||||
if IsPedInAnyVehicle(PlayerPedId(), true) then
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('Cornerselling.inVeh'), 'error')
|
||||
walkAway(targ)
|
||||
return
|
||||
end
|
||||
|
||||
if not progressbar(Bridge.Language.Locale('Cornerselling.selling', Bridge.Inventory.GetItemInfo(item).label, price)) then
|
||||
walkAway(targ)
|
||||
return
|
||||
end
|
||||
buyers[targ] = 'sold'
|
||||
TriggerServerEvent('md-drugs:server:sellCornerDrugs', item, amount, price, NetworkGetNetworkIdFromEntity(targ))
|
||||
walkAway(targ)
|
||||
end
|
||||
|
||||
local function deny(targ)
|
||||
PoliceCall(20)
|
||||
buyers[targ] = 'sold'
|
||||
if not progressbar(Bridge.Language.Locale('Cornerselling.deny'), 4000, {
|
||||
dict = 'anim@amb@casino@brawl@fights@argue@',
|
||||
clip = 'arguement_loop_mp_m_brawler_01',
|
||||
flag = 49
|
||||
}) then return end
|
||||
walkAway(targ)
|
||||
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 = {}
|
||||
end
|
||||
|
||||
local function PoliceCall()
|
||||
-- if Config.PoliceCallChance <= math.random(1, 100) then
|
||||
-- TriggerServerEvent('police:server:policeAlert', 'Drug sale in progress')
|
||||
-- end
|
||||
end
|
||||
|
||||
local function RobberyPed()
|
||||
if Config.UseTarget then
|
||||
exports['qb-target']:AddEntityZone('stealingPed', stealingPed, {
|
||||
name = 'stealingPed',
|
||||
debugPoly = false,
|
||||
}, {
|
||||
options = {
|
||||
{
|
||||
icon = 'fas fa-magnifying-glass',
|
||||
label = "take back",
|
||||
action = function()
|
||||
local player = PlayerPedId()
|
||||
exports["rpemotes"]:EmoteCommandStart("pickup", 0)
|
||||
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 = {}
|
||||
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)
|
||||
local function getClosestPed()
|
||||
local coords = GetEntityCoords(PlayerPedId())
|
||||
local distance = 10.0
|
||||
local pedList = GetGamePool('CPed')
|
||||
local closestDistance = 1000.0
|
||||
local PED = nil
|
||||
for i = 1, #pedList do
|
||||
local ped = pedList[i]
|
||||
if ped ~= PlayerPedId() then
|
||||
local pedCoords = GetEntityCoords(ped)
|
||||
local dist = #(coords - pedCoords)
|
||||
if dist < closestDistance then
|
||||
PED = ped
|
||||
closestDistance = dist
|
||||
end
|
||||
end)
|
||||
end
|
||||
end
|
||||
if PED and closestDistance < distance then
|
||||
return PED, closestDistance
|
||||
else
|
||||
return nil
|
||||
end
|
||||
end
|
||||
|
||||
local function SellToPed(ped)
|
||||
hasTarget = true
|
||||
local function findPed()
|
||||
local targ = nil
|
||||
|
||||
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 <= Config.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 = Config.DrugsPrice[currentOfferDrug.item]
|
||||
local randomPrice = math.random(ddata.min, ddata.max) * bagAmount
|
||||
if scamChance <= Config.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 <= Config.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 <= Config.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)
|
||||
repeat
|
||||
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 <= Config.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']:AddEntityZone('sellingPed', ped, {
|
||||
name = 'sellingPed',
|
||||
debugPoly = false,
|
||||
}, {
|
||||
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
|
||||
exports['qb-target']:RemoveZone('sellingPed')
|
||||
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
|
||||
exports["rpemotes"]:EmoteCommandStart("point", 0)
|
||||
Wait(650)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
SetPedKeepTask(entity, false)
|
||||
SetEntityAsNoLongerNeeded(entity)
|
||||
ClearPedTasksImmediately(entity)
|
||||
lastPed[#lastPed + 1] = entity
|
||||
exports['qb-target']:RemoveZone('sellingPed')
|
||||
PoliceCall()
|
||||
end)
|
||||
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)
|
||||
targ = getClosestPed()
|
||||
if IsPedInAnyVehicle(targ, false) or GetEntityHealth(targ) == 0 or not IsPedHuman(targ) then
|
||||
targ = nil
|
||||
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 >= Config.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
|
||||
else
|
||||
QBCore.Functions.Notify("not enough pork", "error")
|
||||
if buyers[targ] then
|
||||
targ = nil
|
||||
end
|
||||
if inZone then
|
||||
targ = nil
|
||||
end
|
||||
until targ ~= nil or sell == false
|
||||
|
||||
if not sell then return end
|
||||
buyers[targ] = true
|
||||
|
||||
Bridge.HelpText.ShowHelpText(Bridge.Language.Locale('Cornerselling.wait'))
|
||||
|
||||
repeat
|
||||
Wait(1000)
|
||||
TaskGoToCoordAnyMeans(targ, GetEntityCoords(PlayerPedId()), 1.0, 0, 0, 0, 0)
|
||||
until #(GetEntityCoords(PlayerPedId()) - GetEntityCoords(targ)) < 2.0 or sell == false or inZone
|
||||
|
||||
if not sell then return end
|
||||
|
||||
TaskTurnPedToFaceEntity(targ, PlayerPedId(), -1)
|
||||
Bridge.HelpText.HideHelpText()
|
||||
CreateThread(function()
|
||||
Wait(45000)
|
||||
walkAway(targ)
|
||||
buyers[targ] = 'sold'
|
||||
end)
|
||||
end)
|
||||
return targ
|
||||
end
|
||||
|
||||
RegisterNetEvent('police:SetCopCount', function(amount)
|
||||
CurrentCops = amount
|
||||
end)
|
||||
local function checkItems()
|
||||
local has = false
|
||||
for k, v in pairs (GlobalState.DrugNames) do
|
||||
if Bridge.Inventory.HasItem(v) then
|
||||
has = true
|
||||
break
|
||||
end
|
||||
end
|
||||
if not has then
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('Cornerselling.nodrugs', 'error'))
|
||||
return false
|
||||
end
|
||||
return true
|
||||
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)
|
||||
local function Cornersell()
|
||||
if inZone then sell = false return end
|
||||
|
||||
if not sell then
|
||||
return
|
||||
end
|
||||
|
||||
local hasDrugs = checkItems()
|
||||
if not hasDrugs then
|
||||
sell = false
|
||||
return
|
||||
end
|
||||
|
||||
Bridge.HelpText.ShowHelpText(Bridge.Language.Locale('Cornerselling.searching'))
|
||||
|
||||
local targ = findPed()
|
||||
local data = Bridge.Callback.Trigger('md-drugs:server:cornerselling:getAvailableDrugs', NetworkGetNetworkIdFromEntity(targ))
|
||||
if data == false then
|
||||
sell = false
|
||||
return
|
||||
end
|
||||
|
||||
if data == 'robbed' then
|
||||
TaskGoStraightToCoord(targ, -1858.232910, -1242.395630, 8.60510, 100.0, -1, 0.0, 0.0)
|
||||
SetPedMoveRateOverride(targ, 10.0)
|
||||
local got = false
|
||||
Bridge.Target.AddLocalEntity(targ, {
|
||||
{
|
||||
label = Bridge.Language.Locale('Cornerselling.targetTakeBack'),
|
||||
icon = Bridge.Language.Locale("Cornerselling.targetTakeBackIcon"),
|
||||
action = function()
|
||||
got = true
|
||||
TriggerServerEvent('md-drugs:server:getBackRobbed', NetworkGetNetworkIdFromEntity(targ))
|
||||
Cornersell()
|
||||
end,
|
||||
canInteract = function()
|
||||
if IsEntityDead(targ) and not got then
|
||||
return true
|
||||
end
|
||||
end,
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = targ
|
||||
else
|
||||
Bridge.Anim.RequestDict("rcmme_tracey1")
|
||||
TaskStartScenarioInPlace(targ, "WORLD_HUMAN_STAND_IMPATIENT_UPRIGHT", 0, false)
|
||||
FreezeEntityPosition(targ, true)
|
||||
Bridge.Target.AddLocalEntity(targ, {
|
||||
{
|
||||
label = Bridge.Language.Locale('Cornerselling.targetSell', data.amount, Bridge.Inventory.GetItemInfo(data.item).label, data.price),
|
||||
icon = Bridge.Language.Locale("Cornerselling.targetSellIcon"),
|
||||
action = function()
|
||||
sellDrug(data.item, data.amount, data.price, targ)
|
||||
Cornersell()
|
||||
end,
|
||||
canInteract = function()
|
||||
if buyers[targ] ~= 'sold' and sell then
|
||||
return true
|
||||
end
|
||||
end,
|
||||
},
|
||||
{
|
||||
label = Bridge.Language.Locale('Cornerselling.targetDeny'),
|
||||
icon = Bridge.Language.Locale("Cornerselling.targetDenyIcon"),
|
||||
action = function()
|
||||
deny(targ)
|
||||
walkAway(targ)
|
||||
Cornersell()
|
||||
end,
|
||||
canInteract = function()
|
||||
if buyers[targ] == true and sell then
|
||||
return true
|
||||
end
|
||||
end
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = targ
|
||||
end
|
||||
end
|
||||
|
||||
RegisterNetEvent('md-drugs:client:cornerselling', function()
|
||||
if inZone then
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('Cornerselling.inNoSellZone'), 'error')
|
||||
return
|
||||
end
|
||||
if sell then
|
||||
sell = false
|
||||
Bridge.HelpText.HideHelpText()
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('Cornerselling.stopped'), 'error')
|
||||
else
|
||||
sell = true
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('Cornerselling.start'), 'success')
|
||||
Cornersell()
|
||||
end
|
||||
end)
|
||||
|
||||
CreateThread(function()
|
||||
for k, v in pairs (Config.Cornerselling.noSellZones) do
|
||||
Bridge.Point.Register(
|
||||
'MDDRUGNOSELLZONE'..k,
|
||||
v.loc,
|
||||
((v.width or 10.0) + (v.length or 10.0)) / 2,
|
||||
nil,
|
||||
function()
|
||||
inZone = true
|
||||
end,
|
||||
function(point, data)
|
||||
inZone = false
|
||||
end
|
||||
)
|
||||
end
|
||||
end)
|
||||
@@ -1,40 +1,43 @@
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
local locations = Config.Crack.Locations
|
||||
|
||||
RegisterNetEvent("md-drugs:client:makecrackone")
|
||||
AddEventHandler("md-drugs:client:makecrackone", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
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()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
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)
|
||||
end)
|
||||
for k, v in pairs (locations.makecrack) do
|
||||
Bridge.Target.AddBoxZone('makeCrack'..k, v.loc, v.size, v.loc.w or 180.0, {
|
||||
{
|
||||
label = Bridge.Language.Locale('crack.targetMake'),
|
||||
icon = Bridge.Language.Locale('crack.makeIcon'),
|
||||
action = function()
|
||||
if not itemCheck('bakingsoda') then return end
|
||||
if not minigame() then
|
||||
TriggerServerEvent("md-drugs:server:failcrackone", k)
|
||||
return
|
||||
end
|
||||
if not progressbar(Bridge.Language.Locale('crack.cook')) then return end
|
||||
TriggerServerEvent('md-drugs:server:makecrackone', k)
|
||||
end,
|
||||
canInteract = function()
|
||||
if not handleGang(v.gang) then return false end
|
||||
return true
|
||||
end
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = 'makeCrack'..k
|
||||
end
|
||||
|
||||
for k, v in pairs (locations.bagcrack) do
|
||||
Bridge.Target.AddBoxZone('bagCrack'..k, v.loc, v.size, v.loc.w or 180.0, {
|
||||
{
|
||||
label = Bridge.Language.Locale('crack.targetBag'),
|
||||
icon = Bridge.Language.Locale('crack.bagIcon'),
|
||||
action = function()
|
||||
if not itemCheck('empty_weed_bag') then return end
|
||||
if not progressbar(Bridge.Language.Locale('crack.bag')) then return end
|
||||
TriggerServerEvent("md-drugs:server:bagcrack", k)
|
||||
end,
|
||||
canInteract = function()
|
||||
if not handleGang(v.gang) then return false end
|
||||
return true
|
||||
end
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = 'bagCrack'..k
|
||||
end
|
||||
@@ -1,351 +1,83 @@
|
||||
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
|
||||
if not Config.Drugs['deliveries'] then return end
|
||||
local dealer = {}
|
||||
local buyer = nil
|
||||
|
||||
-- Handlers
|
||||
repeat Wait(100) until GlobalState.MDDrugDealers ~= nil
|
||||
|
||||
AddStateBagChangeHandler('isLoggedIn', nil, function(_, _, value)
|
||||
if value then
|
||||
QBCore.Functions.TriggerCallback('md-drugs:server:RequestConfig', function(DealerConfig)
|
||||
Config.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(Config.Dealers) do
|
||||
local dealerCoords = vector3(v.coords.x, v.coords.y, v.coords.z)
|
||||
if #(pCoords - dealerCoords) < 2 then
|
||||
currentDealer = k
|
||||
break
|
||||
local function SpawnDealer()
|
||||
if #dealer >= 1 then
|
||||
for k,v in pairs (dealer) do
|
||||
DeletePed(v)
|
||||
end
|
||||
dealer = {}
|
||||
end
|
||||
end
|
||||
|
||||
local function OpenDealerShop()
|
||||
GetClosestDealer()
|
||||
local repItems = {}
|
||||
repItems.label = Config.Dealers[currentDealer]["name"]
|
||||
repItems.items = {}
|
||||
repItems.slots = 30
|
||||
for k, _ in pairs(Config.Dealers[currentDealer]["products"]) do
|
||||
if QBCore.Functions.GetPlayerData().metadata["dealerrep"] >= Config.Dealers[currentDealer]["products"][k].minrep then
|
||||
repItems.items[k] = Config.Dealers[currentDealer]["products"][k]
|
||||
end
|
||||
end
|
||||
TriggerServerEvent("inventory:server:OpenInventory", "shop", "Dealer_"..Config.Dealers[currentDealer]["name"], repItems)
|
||||
end
|
||||
|
||||
|
||||
|
||||
local function RandomDeliveryItemOnRep()
|
||||
local myRep = QBCore.Functions.GetPlayerData().metadata["dealerrep"]
|
||||
local availableItems = {}
|
||||
for k, _ in pairs(Config.DeliveryItems) do
|
||||
if Config.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, #Config.DeliveryLocations)
|
||||
|
||||
waitingDelivery = {
|
||||
["coords"] = Config.DeliveryLocations[location]["coords"],
|
||||
["locationLabel"] = Config.DeliveryLocations[location]["label"],
|
||||
["amount"] = amount,
|
||||
["dealer"] = currentDealer,
|
||||
["itemData"] = Config.DeliveryItems[item],
|
||||
["item"] = item
|
||||
}
|
||||
if Config.Debug == true then
|
||||
print(Config.DeliveryLocations[location]["coords"])
|
||||
print(Config.DeliveryLocations[location]["label"])
|
||||
end
|
||||
end
|
||||
|
||||
TriggerServerEvent('md-drugs:server:giveDeliveryItems', waitingDelivery)
|
||||
SetTimeout(2000, function()
|
||||
TriggerServerEvent('qb-phone:server:sendNewMail', {
|
||||
sender = Config.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 PoliceCall()
|
||||
-- local random = math.random(1, 100)
|
||||
-- if random <= Config.PoliceCallChance then
|
||||
-- TriggerServerEvent('police:server:policeAlert', 'Suspicous activity')
|
||||
-- end
|
||||
end
|
||||
|
||||
local function DeliverStuff()
|
||||
if deliveryTimeout > 0 then
|
||||
Wait(500)
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
PoliceCall()
|
||||
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(Config.Dealers) == nil then return end
|
||||
|
||||
for k,v in pairs(Config.Dealers) 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 = Config.Dealers[currentDealer]["time"]["min"]
|
||||
local max = Config.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()
|
||||
OpenDealerShop()
|
||||
end,
|
||||
canInteract = function()
|
||||
GetClosestDealer()
|
||||
local hours = GetClockHours()
|
||||
local min = Config.Dealers[currentDealer]["time"]["min"]
|
||||
local max = Config.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
|
||||
|
||||
end
|
||||
|
||||
-- Events
|
||||
|
||||
RegisterNetEvent('md-drugs:client:RefreshDealers', function(DealerData)
|
||||
if not Config.UseTarget and dealerCombo then dealerCombo:destroy() end
|
||||
Config.Dealers = DealerData
|
||||
Wait(1000)
|
||||
InitZones()
|
||||
end)
|
||||
|
||||
RegisterNetEvent('md-drugs:client:updateDealerItems', function(itemData, amount)
|
||||
TriggerServerEvent('md-drugs:server:updateDealerItems', itemData, amount, currentDealer)
|
||||
end)
|
||||
|
||||
RegisterNetEvent('md-drugs:client:setDealerItems', function(itemData, amount, dealer)
|
||||
Config.Dealers[dealer]["products"][itemData.slot].amount = Config.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
|
||||
for k,v in pairs(GlobalState.MDDrugDealers) do
|
||||
requestModel(v.model)
|
||||
dealer[k] = CreatePed(0, v.model, v.coords.x, v.coords.y, v.coords.z-1, v.coords.w, false, false)
|
||||
Freeze(dealer[k], true, v.coords.w)
|
||||
Bridge.Target.AddLocalEntity(dealer[k], {
|
||||
{
|
||||
icon = Bridge.Language.Locale('Deliveries.targetGetDelIcon'),
|
||||
label = Bridge.Language.Locale('Deliveries.targetGetDel'),
|
||||
action = function()
|
||||
TriggerServerEvent('md-drugs:server:requestDelivery', k)
|
||||
end,
|
||||
},
|
||||
{
|
||||
icon = Bridge.Language.Locale('Deliveries.targetOpenShopIcon'),
|
||||
label = Bridge.Language.Locale('Deliveries.targetOpenShop'),
|
||||
action = function()
|
||||
local rep = GetRep()
|
||||
local options = {}
|
||||
for m, d in pairs (Config.Deliveries.Recipes) do
|
||||
if rep.dealerrep >= d.minrep then
|
||||
options[#options+1] = {
|
||||
title = Bridge.Inventory.GetItemInfo(d.name).label,
|
||||
description = '$' .. d.price,
|
||||
icon = Bridge.Inventory.GetItemInfo(d.name).image,
|
||||
onSelect = function()
|
||||
TriggerServerEvent('md-drugs:server:buyItemDealer', m, k)
|
||||
end,
|
||||
}
|
||||
end
|
||||
end
|
||||
}
|
||||
},
|
||||
distance = 1.5
|
||||
Bridge.Menu.Open({
|
||||
id = 'DealerMenu',
|
||||
title = Bridge.Language.Locale('Deliveries.shopHeader'),
|
||||
description = Bridge.Language.Locale('Deliveries.shopHeader'),
|
||||
options = options
|
||||
})
|
||||
end,
|
||||
}
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
SpawnDealer()
|
||||
|
||||
RegisterNetEvent('md-drugs:client:RefreshDealers', function()
|
||||
SpawnDealer()
|
||||
end)
|
||||
|
||||
RegisterNetEvent('md-drugs:client:sendDeliveryMail', function(type, deliveryData)
|
||||
if type == 'perfect' then
|
||||
TriggerServerEvent('qb-phone:server:sendNewMail', {
|
||||
sender = Config.Dealers[deliveryData["dealer"]]["name"],
|
||||
subject = "Delivery",
|
||||
message = "You did it"
|
||||
})
|
||||
elseif type == 'bad' then
|
||||
TriggerServerEvent('qb-phone:server:sendNewMail', {
|
||||
sender = Config.Dealers[deliveryData["dealer"]]["name"],
|
||||
subject = "Delivery",
|
||||
message = "You Fucked Me Over"
|
||||
})
|
||||
elseif type == 'late' then
|
||||
TriggerServerEvent('qb-phone:server:sendNewMail', {
|
||||
sender = Config.Dealers[deliveryData["dealer"]]["name"],
|
||||
subject = "Delivery",
|
||||
message = "Better Late Than Dead"
|
||||
})
|
||||
RegisterNetEvent('md-drugs:client:setLocation', function(data)
|
||||
if buyer then
|
||||
DeletePed(buyer)
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterCommand('checkrep', function()
|
||||
local drugrep = QBCore.Functions.GetPlayerData().metadata["dealerrep"]
|
||||
QBCore.Functions.Notify("Current Rep: "..drugrep)
|
||||
local coord = data.coords
|
||||
SetNewWaypoint(coord.x, coord.y)
|
||||
requestModel("g_m_y_famdnf_01")
|
||||
buyer = CreatePed(0, "g_m_y_famdnf_01",coord.x, coord.y, coord.z-1, coord.w, false, false)
|
||||
Freeze(buyer, true, coord.w)
|
||||
Bridge.Target.AddLocalEntity(buyer , {
|
||||
{
|
||||
icon = Bridge.Language.Locale('Deliveries.targetHandOffIcon'),
|
||||
label = Bridge.Language.Locale('Deliveries.targetHandOff'),
|
||||
action = function()
|
||||
if not progressbar(Bridge.Language.Locale('Deliveries.delivering')) then return end
|
||||
TriggerServerEvent('md-drugs:server:giveDeliveryItems')
|
||||
Wait(400)
|
||||
DeletePed(buyer)
|
||||
end,
|
||||
}
|
||||
})
|
||||
end)
|
||||
@@ -0,0 +1,382 @@
|
||||
|
||||
local minigametype = Config.minigametype
|
||||
|
||||
function requestModel(ped, timeout)
|
||||
timeout = timeout or 15000
|
||||
local startTime = GetGameTimer()
|
||||
RequestModel(ped)
|
||||
while not HasModelLoaded(ped) do
|
||||
Wait(0)
|
||||
if GetGameTimer() - startTime > timeout then
|
||||
Bridge.Prints.Debug('requestModel timed out', ped, GetGameTimer() - startTime)
|
||||
return false
|
||||
end
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
function minigame()
|
||||
local time = 0
|
||||
local game = Config.Minigames
|
||||
if minigametype == 'ps_circle' then
|
||||
local check = exports['ps-ui']:Circle(false, game['ps_circle'].amount, game['ps_circle'].speed)
|
||||
return check
|
||||
elseif minigametype == 'ps_maze' then
|
||||
local check = exports['ps-ui']:Maze(false, game['ps_maze'].timelimit)
|
||||
return check
|
||||
elseif minigametype == 'ps_scrambler' then
|
||||
local check = exports['ps-ui']:Scrambler(false, game['ps_scrambler'].type, game['ps_scrambler'].time, game['ps_scrambler'].mirrored)
|
||||
return check
|
||||
elseif minigametype == 'ps_var' then
|
||||
local check = exports['ps-ui']:VarHack(false, game['ps_var'].numBlocks, game['ps_var'].time)
|
||||
return check
|
||||
elseif minigametype == 'ps_thermite' then
|
||||
local check = exports['ps-ui']:Thermite(false, game['ps_thermite'].time, game['ps_thermite'].gridsize, game['ps_thermite'].incorrect)
|
||||
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 GetRep()
|
||||
local rep = Bridge.Callback.Trigger('md-drugs:server:GetRep')
|
||||
return rep
|
||||
end
|
||||
|
||||
function PoliceCall(chance)
|
||||
local math = math.random(1,100)
|
||||
if math <= chance then
|
||||
Bridge.Dispatch.SendAlert({
|
||||
message = Bridge.Language.Locale('Dispatch.header'),
|
||||
code = Bridge.Language.Locale('Dispatch.code'),
|
||||
coords = GetEntityCoords(PlayerPedId()),
|
||||
jobs = {"police"},
|
||||
blipData = {
|
||||
sprite = 161,
|
||||
color = 1,
|
||||
scale = 1.0
|
||||
},
|
||||
time = 300000,
|
||||
icon = Bridge.Language.Locale('Dispatch.icon')
|
||||
})
|
||||
else
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
function GetCops(number)
|
||||
if number == 0 then return true end
|
||||
local amount = Bridge.Callback.Trigger('md-drugs:server:GetCoppers')
|
||||
if amount >= number then return true else Bridge.Notify.SendNotify(string.format(Bridge.Language.Locale('Catches.YouNeedMoreCops'), number - amount), '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
|
||||
|
||||
local function RotationToDirection(rotation)
|
||||
local adjustedRotation = {
|
||||
x = (math.pi / 180) * rotation.x,
|
||||
y = (math.pi / 180) * rotation.y,
|
||||
z = (math.pi / 180) * rotation.z
|
||||
}
|
||||
local direction = {
|
||||
x = -math.sin(adjustedRotation.z) * math.abs(math.cos(adjustedRotation.x)),
|
||||
y = math.cos(adjustedRotation.z) * math.abs(math.cos(adjustedRotation.x)),
|
||||
z = math.sin(adjustedRotation.x)
|
||||
}
|
||||
return direction
|
||||
end
|
||||
|
||||
local function RayCastGamePlayCamera(distance)
|
||||
local currentRenderingCam = false
|
||||
if not IsGameplayCamRendering() then
|
||||
currentRenderingCam = GetRenderingCam()
|
||||
end
|
||||
|
||||
local cameraRotation = not currentRenderingCam and GetGameplayCamRot() or GetCamRot(currentRenderingCam, 2)
|
||||
local cameraCoord = not currentRenderingCam and GetGameplayCamCoord() or GetCamCoord(currentRenderingCam)
|
||||
local direction = RotationToDirection(cameraRotation)
|
||||
local destination = {
|
||||
x = cameraCoord.x + direction.x * distance,
|
||||
y = cameraCoord.y + direction.y * distance,
|
||||
z = cameraCoord.z + direction.z * distance
|
||||
}
|
||||
local _, hit, endCoords, surfaceNormal, entityHit = GetShapeTestResult(StartShapeTestRay(cameraCoord.x, cameraCoord.y, cameraCoord.z, destination.x, destination.y, destination.z, -1, PlayerPedId(), 0))
|
||||
return _, hit, endCoords, surfaceNormal, entityHit
|
||||
end
|
||||
|
||||
local function ray()
|
||||
local _, hit, endCoords, surfaceNormal, entityHit = RayCastGamePlayCamera(1000.0)
|
||||
return hit, endCoords, surfaceNormal, entityHit
|
||||
end
|
||||
|
||||
local created = false
|
||||
local heading = 180.0
|
||||
function StartRay()
|
||||
local run = true
|
||||
local pedcoord = GetEntityCoords(PlayerPedId())
|
||||
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, endCoords, surfaceNormal, entityHit = ray()
|
||||
if not created then
|
||||
created = true
|
||||
Bridge.HelpText.ShowHelpText([[[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
|
||||
Bridge.HelpText.HideHelpText()
|
||||
run = false
|
||||
DeleteObject(table)
|
||||
created = false
|
||||
return endCoords, heading
|
||||
end
|
||||
|
||||
if IsControlPressed(0, 178) then
|
||||
Bridge.HelpText.HideHelpText()
|
||||
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())
|
||||
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, endCoords, surfaceNormal, entityHit = ray()
|
||||
if not created then
|
||||
created = true
|
||||
Bridge.HelpText.ShowHelpText([[[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
|
||||
Bridge.HelpText.HideHelpText()
|
||||
run = false
|
||||
DeleteObject(table)
|
||||
created = false
|
||||
return endCoords, heading
|
||||
end
|
||||
|
||||
if IsControlPressed(0, 178) then
|
||||
Bridge.HelpText.HideHelpText()
|
||||
run = false
|
||||
created = false
|
||||
DeleteObject(table)
|
||||
return nil, nil
|
||||
end
|
||||
Wait(0)
|
||||
until run == false
|
||||
end
|
||||
|
||||
Bridge.Callback.Register('md-drugs:client:uncuff', function(data)
|
||||
if not progressbar(data) then return end
|
||||
return true
|
||||
end)
|
||||
|
||||
RegisterCommand('DrugRep', function()
|
||||
if not Config.TierSystem then return end
|
||||
local rep = GetRep()
|
||||
Bridge.Menu.Open({
|
||||
id = 'drugrep',
|
||||
title = Bridge.Language.Locale('DrugRep.header'),
|
||||
description = Bridge.Language.Locale('DrugRep.increased'),
|
||||
options = {
|
||||
{icon = Bridge.Language.Locale('DrugRep.coke.icon'), title = Bridge.Language.Locale('DrugRep.coke.title', rep.coke)},
|
||||
{icon = Bridge.Language.Locale('DrugRep.heroin.icon'), title = Bridge.Language.Locale('DrugRep.heroin.title', rep.heroin)},
|
||||
{icon = Bridge.Language.Locale('DrugRep.lsd.icon'), title = Bridge.Language.Locale('DrugRep.lsd.title', rep.lsd)},
|
||||
{icon = Bridge.Language.Locale('DrugRep.dealerrep.icon'), title = Bridge.Language.Locale('DrugRep.dealerrep.title', rep.dealerrep)},
|
||||
{icon = Bridge.Language.Locale('DrugRep.cornerselling.icon'), title = Bridge.Language.Locale('DrugRep.cornerselling.title', rep.cornerselling.rep), description = Bridge.Language.Locale('DrugRep.cornerselling.description', rep.cornerselling.label) }
|
||||
}
|
||||
})
|
||||
end, false)
|
||||
|
||||
if Bridge.Framework.GetResourceName() == 'es_extended' then
|
||||
function handleGang(gang)
|
||||
return true
|
||||
end
|
||||
else
|
||||
function handleGang(gang)
|
||||
if not gang then
|
||||
return true
|
||||
end
|
||||
if #gang == 0 then
|
||||
return true
|
||||
end
|
||||
local data = Bridge.Framework.GetPlayerData()
|
||||
if not data.gang then
|
||||
return false
|
||||
end
|
||||
return data.gang.name == gang
|
||||
end
|
||||
end
|
||||
|
||||
if Config.Emotes == 'scully' then
|
||||
function playEmote(emote)
|
||||
exports.scully_emotemenu:playEmoteByCommand(emote, 0)
|
||||
end
|
||||
function stopEmote()
|
||||
exports.scully_emotemenu:cancelEmote()
|
||||
end
|
||||
end
|
||||
|
||||
if Config.Emotes == 'dpemotes' then
|
||||
function playEmote(emote)
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {emote})
|
||||
end
|
||||
function stopEmote()
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {"c"})
|
||||
end
|
||||
end
|
||||
|
||||
if Config.Emotes == 'rpemotes' then
|
||||
function playEmote(emote)
|
||||
exports["rpemotes"]:EmoteCommandStart(emote, 0)
|
||||
end
|
||||
function stopEmote()
|
||||
exports["rpemotes"]:EmoteCancel()
|
||||
end
|
||||
end
|
||||
|
||||
local animation = nil
|
||||
|
||||
function progressbar(text, time, emote, cancel)
|
||||
local animData
|
||||
if type(emote) == 'string' then
|
||||
playEmote(emote)
|
||||
animation = emote
|
||||
elseif type(emote) == 'table' then
|
||||
animData = emote
|
||||
if emote.prop and not emote.prop.model then
|
||||
emote.prop = nil
|
||||
end
|
||||
end
|
||||
local success = Bridge.ProgressBar.Open({
|
||||
duration = time or 5000,
|
||||
label = text or 'LAZY AF DEVS',
|
||||
canCancel = true,
|
||||
disable = cancel or Config.ProgressBar.Disables,
|
||||
anim = animData or Config.DefaultAnimation,
|
||||
prop = animData and animData.prop or nil
|
||||
})
|
||||
if animation then
|
||||
animation = nil
|
||||
stopEmote()
|
||||
end
|
||||
return success
|
||||
end
|
||||
|
||||
function itemCheck(item)
|
||||
if not Bridge.Inventory.HasItem(item) then
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('Catches.itemMissings', Bridge.Inventory.GetItemInfo(item).label), 'error')
|
||||
return false
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
AddEventHandler('onResourceStop', function(resourceName)
|
||||
if GetCurrentResourceName() ~= resourceName then return end
|
||||
for k, v in pairs (targets) do
|
||||
if type(v) == 'number' then
|
||||
Bridge.Target.RemoveLocalEntity(v)
|
||||
if DoesEntityExist(v) then
|
||||
DeleteEntity(v)
|
||||
end
|
||||
else
|
||||
Bridge.Target.RemoveZone(v)
|
||||
end
|
||||
end
|
||||
end)
|
||||
@@ -1,322 +1,155 @@
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
local CocaPlant = {}
|
||||
local PoppyPlants = {}
|
||||
if not Config.Drugs['heroin'] then return end
|
||||
local herointable = false
|
||||
local dirty = false
|
||||
|
||||
function LoadModel(hash)
|
||||
hash = GetHashKey(hash)
|
||||
RequestModel(hash)
|
||||
while not HasModelLoaded(hash) do
|
||||
Wait(3000)
|
||||
end
|
||||
end
|
||||
local locations = Config.Heroin.Locations
|
||||
|
||||
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)
|
||||
Bridge.Target.AddLocalEntity(heroinlabkit, {
|
||||
{
|
||||
icon = Bridge.Language.Locale('heroin.cookIcon'),
|
||||
label = Bridge.Language.Locale('heroin.targetCook'),
|
||||
action = function()
|
||||
if not itemCheck('emptyvial') then return end
|
||||
|
||||
if not minigame() then
|
||||
dirty = true
|
||||
TriggerServerEvent("md-drugs:server:failheatingheroin")
|
||||
local coords = GetEntityCoords(heroinlabkit)
|
||||
AddExplosion(coords.x, coords.y, coords.z-1.0, 34, 0.0, true, false, true)
|
||||
SetParticleFxLoopedAlpha(heroinkit, 3.0)
|
||||
SetPedToRagdoll(PlayerPedId(), 1300, 1300, 0, 0, 0, 0)
|
||||
return
|
||||
end
|
||||
if not progressbar(Bridge.Language.Locale('heroin.pbCook')) then return end
|
||||
TriggerServerEvent("md-drugs:server:heatliquidheroin")
|
||||
end,
|
||||
canInteract = function()
|
||||
if not dirty then return true end
|
||||
end
|
||||
},
|
||||
{
|
||||
icon = Bridge.Language.Locale('heroin.targetPickupIcon'),
|
||||
label = Bridge.Language.Locale('heroin.targetPickup'),
|
||||
action = function()
|
||||
if not progressbar(Bridge.Language.Locale('heroin.pbPickup')) then return end
|
||||
herointable = false
|
||||
DeleteObject(heroinlabkit)
|
||||
TriggerServerEvent("md-drugs:server:getheroinlabkitback")
|
||||
end,
|
||||
canInteract = function()
|
||||
if not dirty then return true end
|
||||
return false
|
||||
end
|
||||
},
|
||||
{
|
||||
icon = Bridge.Language.Locale('heroin.targetCleanIcon'),
|
||||
label = Bridge.Language.Locale('heroin.targetClean'),
|
||||
action = function()
|
||||
if not itemCheck('cleaningkit') then return end
|
||||
if not progressbar(Bridge.Language.Locale('heroin.pbClean'), 4000, 'clean') then return end
|
||||
local done = Bridge.Callback.Trigger('md-drugs:server:removeCleaningKitHeroin', false)
|
||||
if done then dirty = false end
|
||||
end,
|
||||
canInteract = function()
|
||||
if dirty then return true end
|
||||
return false
|
||||
end
|
||||
}})
|
||||
targets[#targets+1] = heroinlabkit
|
||||
end
|
||||
|
||||
CreateThread(function()
|
||||
local Ped = "g_m_y_famdnf_01"
|
||||
RequestModel(Ped)
|
||||
while not HasModelLoaded(Ped) do
|
||||
Wait(0)
|
||||
end
|
||||
labkitlocation = Config.buyheroinlabkit
|
||||
heroinkitdealer = CreatePed(0, Ped,labkitlocation-1, 180.0, false, false)
|
||||
FreezeEntityPosition(heroinkitdealer, true)
|
||||
SetEntityInvincible(heroinkitdealer, true)
|
||||
exports['qb-target']:AddTargetEntity(heroinkitdealer, {
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
label = "Talk To Buyer",
|
||||
icon = "fas fa-eye",
|
||||
event = "md-drugs:client:buyheroinlabkit"
|
||||
},
|
||||
},
|
||||
distance = 2.0
|
||||
})
|
||||
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
|
||||
})
|
||||
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
|
||||
})
|
||||
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'))
|
||||
for k, v in pairs(PoppyPlants) do
|
||||
if DoesEntityExist(v) then
|
||||
DeleteEntity(v) SetEntityAsNoLongerNeeded(v)
|
||||
for k, v in pairs (locations.dryplant) do
|
||||
Bridge.Target.AddBoxZone('dryHeroin'..k, v.loc, v.size, v.loc.w or 180.0, {
|
||||
{
|
||||
label = Bridge.Language.Locale('heroin.targetDry'),
|
||||
icon = Bridge.Language.Locale('heroin.dryIcon'),
|
||||
action = function()
|
||||
if not progressbar(Bridge.Language.Locale('heroin.pbDry')) then return end
|
||||
TriggerServerEvent("md-drugs:server:dryplant", k)
|
||||
end,
|
||||
canInteract = function()
|
||||
return handleGang(v.gang)
|
||||
end
|
||||
end
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = 'dryHeroin'..k
|
||||
end
|
||||
|
||||
for k, v in pairs (locations.cutheroinone) do
|
||||
Bridge.Target.AddBoxZone('cutHeroin'..k, v.loc, v.size, v.loc.w or 180.0, {
|
||||
{
|
||||
label = Bridge.Language.Locale('heroin.targetCutHeroin'),
|
||||
icon = Bridge.Language.Locale('heroin.cutIcon'),
|
||||
action = function()
|
||||
if not itemCheck('bakingsoda') then return end
|
||||
if not progressbar(Bridge.Language.Locale('heroin.pbCutHeroin')) then return end
|
||||
TriggerServerEvent("md-drugs:server:cutheroin", k)
|
||||
end,
|
||||
canInteract = function()
|
||||
return handleGang(v.gang)
|
||||
end
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = 'cutHeroin'..k
|
||||
end
|
||||
|
||||
local peds = {}
|
||||
for k, v in pairs (locations.buyKit) do
|
||||
requestModel(v.ped, 1000)
|
||||
peds[k] = CreatePed(4, v.ped, v.loc.x, v.loc.y, v.loc.z, v.loc.w, false, false)
|
||||
Freeze(peds[k], true, v.loc.w)
|
||||
SetBlockingOfNonTemporaryEvents(peds[k], true)
|
||||
SetEntityInvincible(peds[k], true)
|
||||
Bridge.Target.AddLocalEntity(peds[k], {
|
||||
{
|
||||
label = Bridge.Language.Locale('heroin.targetBuyKit'),
|
||||
icon = Bridge.Language.Locale('heroin.buyIcon'),
|
||||
action = function()
|
||||
if not progressbar(Bridge.Language.Locale('heroin.pbBuyKit')) then return end
|
||||
TriggerServerEvent("md-drugs:server:getheroinlabkit", k)
|
||||
end,
|
||||
canInteract = function()
|
||||
if not handleGang(v.gang) then return false end
|
||||
return true
|
||||
end
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = peds[k]
|
||||
end
|
||||
|
||||
|
||||
Bridge.Callback.Register("md-drugs:client:setheroinlabkit", function()
|
||||
if herointable then
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('heroin.tableout'), 'error')
|
||||
return false
|
||||
else
|
||||
herointable = true
|
||||
local location, head = StartRay()
|
||||
if not location then herointable = false return end
|
||||
if not progressbar(Bridge.Language.Locale('heroin.placing')) then return end
|
||||
createLabKit(location, head)
|
||||
return true, location
|
||||
end
|
||||
DeleteObject(heroinlabkit)
|
||||
DeleteObject(dirtylabkitheroin)
|
||||
end)
|
||||
---- plant stop end
|
||||
|
||||
RegisterNetEvent("md-drugs:client:dryplant")
|
||||
AddEventHandler("md-drugs:client:dryplant", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
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()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
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)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:buyheroinlabkit")
|
||||
AddEventHandler("md-drugs:client:buyheroinlabkit", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
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)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:setheroinlabkit")
|
||||
AddEventHandler("md-drugs:client:setheroinlabkit", function()
|
||||
local PedCoords = GetEntityCoords(PlayerPedId())
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
heroinlabkit = CreateObject("v_ret_ml_tablea", PedCoords.x+1, PedCoords.y+1, PedCoords.z-1, true, false)
|
||||
SetVehicleOnGroundProperly(heroinlabkit)
|
||||
exports['qb-target']:AddTargetEntity(heroinlabkit, {
|
||||
options = {
|
||||
for k, v in pairs (locations.fillneedle) do
|
||||
Bridge.Target.AddBoxZone('fillNeedle'..k, v.loc, v.size, v.loc.w or 180.0, {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:heatliquidheroin",
|
||||
icon = "fas fa-box-circle-check",
|
||||
label = "Cook Heroin",
|
||||
},
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:getheroinkitback",
|
||||
icon = "fas fa-box-circle-check",
|
||||
label = "Pick Up",
|
||||
},
|
||||
},
|
||||
distance = 3.0
|
||||
})
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:heatliquidheroin")
|
||||
AddEventHandler("md-drugs:client:heatliquidheroin", function()
|
||||
local PedCoords = GetEntityCoords(PlayerPedId())
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Heating Heroin!", 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: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)
|
||||
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)
|
||||
SetParticleFxLoopedAlpha(heroinkit, 3.0)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
|
||||
|
||||
exports['qb-target']:AddTargetEntity(dirtylabkitheroin, {
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:cleanheroinlabkit",
|
||||
icon = "fas fa-box-circle-check",
|
||||
label = "Clean It",
|
||||
},
|
||||
},
|
||||
distance = 3.0
|
||||
})
|
||||
end
|
||||
end, 1, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:cleanheroinlabkit")
|
||||
AddEventHandler("md-drugs:client:cleanheroinlabkit", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("clean", 0)
|
||||
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)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:deletedirtyheroin")
|
||||
AddEventHandler("md-drugs:client:deletedirtyheroin", function()
|
||||
DeleteObject(dirtylabkitheroin)
|
||||
TriggerEvent("md-drugs:client:setheroinlabkit")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
|
||||
|
||||
RegisterNetEvent("md-drugs:client:getheroinkitback")
|
||||
AddEventHandler("md-drugs:client:getheroinkitback", function()
|
||||
DeleteObject(heroinlabkit)
|
||||
TriggerServerEvent("md-drugs:server:getheroinlabkitback")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
|
||||
|
||||
RegisterNetEvent("md-drugs:client:resetheroinkit")
|
||||
AddEventHandler("md-drugs:client:resetheroinkit", function()
|
||||
DeleteObject(heroinlabkit)
|
||||
TriggerEvent("md-drugs:server:getheroinlabkitback")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
|
||||
|
||||
|
||||
RegisterNetEvent("md-drugs:client:fillneedle")
|
||||
AddEventHandler("md-drugs:client:fillneedle", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
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)
|
||||
|
||||
|
||||
label = Bridge.Language.Locale('heroin.targetFill'),
|
||||
icon = Bridge.Language.Locale('heroin.fillNeedleIcon'),
|
||||
action = function()
|
||||
if not minigame() then TriggerServerEvent("md-drugs:server:failheroin", k) return end
|
||||
if not progressbar(Bridge.Language.Locale('heroin.pbFill')) then return end
|
||||
TriggerServerEvent("md-drugs:server:fillneedle", k)
|
||||
end,
|
||||
canInteract = function()
|
||||
return handleGang(v.gang)
|
||||
end
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = 'fillNeedle'..k
|
||||
end
|
||||
@@ -0,0 +1,130 @@
|
||||
if not Config.Drugs['lean'] then return end
|
||||
local started = false
|
||||
local leanCar = nil
|
||||
|
||||
local location = Config.Lean.Locations
|
||||
|
||||
local function SpawnCarPedChase(loc)
|
||||
local stoploc = vector3(-1157.63, -3056.71, 13.94)
|
||||
local start = location.StartLoc[math.random(1,#location.StartLoc)]
|
||||
|
||||
if started then Bridge.Notify.SendNotify(Bridge.Language.Locale('lean.alreadyChasing'), 'error') return end
|
||||
started = true
|
||||
|
||||
requestModel("pounder", 30000)
|
||||
requestModel("ig_priest", 30000)
|
||||
requestModel("cargobob3", 30000)
|
||||
|
||||
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)
|
||||
local can = Bridge.Callback.Trigger('md-drugs:server:registerLean', loc, NetworkGetNetworkIdFromEntity(leanCar))
|
||||
|
||||
if not can then
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('lean.cantStart'), 'error')
|
||||
DeleteVehicle(leanCar)
|
||||
DeleteEntity(driver)
|
||||
DeleteEntity(pilot2)
|
||||
started = false
|
||||
return
|
||||
end
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('lean.chaseStarted'), 'success')
|
||||
SetPedIntoVehicle(pilot2, leanCar, 1)
|
||||
FreezeEntityPosition(driver, true)
|
||||
FreezeEntityPosition(pilot2, true)
|
||||
SetEntityInvincible(pilot2, true)
|
||||
SetEntityAsMissionEntity(leanCar)
|
||||
AddBlipForEntity(leanCar)
|
||||
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)
|
||||
|
||||
repeat
|
||||
Wait(1000)
|
||||
until #(GetEntityCoords(driver) - stoploc) < 20.0 or GetEntityHealth(driver) == 0
|
||||
|
||||
RemoveBlip(leanCar)
|
||||
|
||||
if GetEntityHealth(driver) == 0 then
|
||||
Bridge.Target.AddLocalEntity(leanCar, {
|
||||
{
|
||||
name = 'leancar',
|
||||
icon = Bridge.Language.Locale('lean.carIcon'),
|
||||
label = Bridge.Language.Locale('lean.stealFromTruck'),
|
||||
action = function()
|
||||
if not minigame() then return end
|
||||
TriggerServerEvent('md-drugs:server:givelean')
|
||||
started = false
|
||||
DeleteEntity(driver)
|
||||
DeleteEntity(pilot2)
|
||||
end
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = leanCar
|
||||
else
|
||||
DeleteEntity(driver)
|
||||
DeleteEntity(pilot2)
|
||||
end
|
||||
end
|
||||
|
||||
local leanPeds = {}
|
||||
for k, v in pairs (location.SyrupVendor) do
|
||||
requestModel(v.ped)
|
||||
leanPeds[k] = CreatePed(0, v.ped, v.loc.x, v.loc.y, v.loc.z, false, false)
|
||||
Freeze(leanPeds[k], true, v.loc.w)
|
||||
Bridge.Target.AddLocalEntity(leanPeds[k], {
|
||||
{
|
||||
icon = Bridge.Language.Locale('lean.startMissionIcon'),
|
||||
label = Bridge.Language.Locale('lean.startMission'),
|
||||
action = function()
|
||||
SpawnCarPedChase(k)
|
||||
end,
|
||||
canInteract = function()
|
||||
if not handleGang(v.gang) then return false end
|
||||
return true
|
||||
end
|
||||
},
|
||||
})
|
||||
targets[#targets+1] = leanPeds[k]
|
||||
end
|
||||
|
||||
local function concat(tbl)
|
||||
local str = ""
|
||||
for k, v in pairs (tbl) do
|
||||
str = str .. v.item .. " X " .. v.amount .. " \n "
|
||||
end
|
||||
return str
|
||||
end
|
||||
|
||||
local function getDisabled(recipe)
|
||||
for k, v in pairs (recipe.ingredients) do
|
||||
local count = Bridge.Inventory.GetItemCount(v.item)
|
||||
if count < v.amount then
|
||||
return true
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
RegisterNetEvent("md-drugs:client:makeLean", function()
|
||||
local menu = {}
|
||||
for k, v in pairs (Config.Lean.Recipes) do
|
||||
menu[#menu+1] = {
|
||||
title = Bridge.Inventory.GetItemInfo(v.item).label,
|
||||
description = concat(v.ingredients),
|
||||
icon = Bridge.Inventory.GetItemInfo(v.item).image,
|
||||
disabled = getDisabled(v),
|
||||
onSelect = function()
|
||||
if not progressbar(Bridge.Language.Locale('lean.makingLean')) then return end
|
||||
TriggerServerEvent('md-drugs:server:makeLean', k)
|
||||
end,
|
||||
}
|
||||
end
|
||||
Bridge.Menu.Open({
|
||||
id = 'makeLeanMenu',
|
||||
title = Bridge.Language.Locale('lean.makeLeanMenuTitle'),
|
||||
description = Bridge.Language.Locale('lean.makeLeanMenuDesc'),
|
||||
options = menu
|
||||
})
|
||||
end)
|
||||
@@ -1,415 +1,183 @@
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
if not Config.Drugs['lsd'] then return end
|
||||
local tableout = false
|
||||
local dirtylsd = false
|
||||
local locations = Config.LSD.Locations
|
||||
|
||||
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"
|
||||
RequestModel(Ped)
|
||||
while not HasModelLoaded(Ped) do
|
||||
Wait(0)
|
||||
end
|
||||
tabdealer = CreatePed(0, Ped,vector3(-318.69, -773.59, 47.43), 180.0, false, false)
|
||||
FreezeEntityPosition(tabdealer, true)
|
||||
SetEntityInvincible(tabdealer, true)
|
||||
exports['qb-target']:AddTargetEntity(tabdealer, {
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
label = "Talk To Buyer",
|
||||
icon = "fas fa-eye",
|
||||
event = "md-drugs:client:buytabs"
|
||||
},
|
||||
},
|
||||
distance = 2.0
|
||||
})
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:getlysergic")
|
||||
AddEventHandler("md-drugs:client:getlysergic", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Stealing Lysergic Acid!", 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:getlysergic")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 1, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:getdiethylamide")
|
||||
AddEventHandler("md-drugs:client:getdiethylamide", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
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)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:getdiethylamide")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 1, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:setlsdlabkit")
|
||||
AddEventHandler("md-drugs:client:setlsdlabkit", function()
|
||||
local PedCoords = GetEntityCoords(PlayerPedId())
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
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)
|
||||
SetVehicleOnGroundProperly(labkit)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
|
||||
exports['qb-target']:AddTargetEntity(labkit, {
|
||||
options = {
|
||||
local function createLabKit(coord, head)
|
||||
requestModel("v_ret_ml_tablea")
|
||||
local labkit = CreateObject("v_ret_ml_tablea", coord.x, coord.y, coord.z - 1, true, false)
|
||||
SetEntityHeading(labkit, head)
|
||||
PlaceObjectOnGroundProperly(labkit)
|
||||
FreezeEntityPosition(labkit, true)
|
||||
tableout = true
|
||||
local options = {
|
||||
{
|
||||
num = 1,
|
||||
type = "client",
|
||||
event = "md-drugs:client:heatliquid",
|
||||
icon = "fas fa-box-circle-check",
|
||||
label = "Heat Liquid",
|
||||
icon = Bridge.Language.Locale('lsd.targetHeatIcon'),
|
||||
label = Bridge.Language.Locale('lsd.targetHeat'),
|
||||
action = function()
|
||||
if not minigame() then
|
||||
local coords = GetEntityCoords(labkit)
|
||||
AddExplosion(coords.x, coords.y, coords.z-1.0, 34, 0.0, true, false, true)
|
||||
dirtylsd = true
|
||||
TriggerServerEvent("md-drugs:server:failheating")
|
||||
return
|
||||
end
|
||||
if not progressbar(Bridge.Language.Locale('lsd.heating'), 7000) then return end
|
||||
TriggerServerEvent("md-drugs:server:heatliquid")
|
||||
end,
|
||||
canInteract = function()
|
||||
if not dirtylsd then return true end
|
||||
end
|
||||
},
|
||||
{
|
||||
num = 4,
|
||||
type = "client",
|
||||
event = "md-drugs:client:getlabkitback",
|
||||
icon = "fas fa-box-circle-check",
|
||||
label = "Pick Up",
|
||||
},
|
||||
{
|
||||
num = 2,
|
||||
type = "client",
|
||||
event = "md-drugs:client:refinequalityacid",
|
||||
icon = "fas fa-box-circle-check",
|
||||
label = "Refine",
|
||||
},
|
||||
{
|
||||
num = 3,
|
||||
type = "client",
|
||||
event = "md-drugs:client:maketabpaper",
|
||||
icon = "fas fa-box-circle-check",
|
||||
label = "Dab Sheets",
|
||||
},
|
||||
},
|
||||
distance = 3.0
|
||||
})
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:getlabkitback")
|
||||
AddEventHandler("md-drugs:client:getlabkitback", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
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())
|
||||
end)
|
||||
end)
|
||||
|
||||
|
||||
RegisterNetEvent("md-drugs:client:heatliquid")
|
||||
AddEventHandler("md-drugs:client:heatliquid", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
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
|
||||
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)
|
||||
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)
|
||||
SetParticleFxLoopedAlpha(exitPtfx, 3.0)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
exports['qb-target']:AddTargetEntity(dirtylabkit, {
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:cleanlabkit",
|
||||
icon = "fas fa-box-circle-check",
|
||||
label = "Clean It",
|
||||
icon = Bridge.Language.Locale('lsd.targetRefineIcon'),
|
||||
label = Bridge.Language.Locale('lsd.targetRefine'),
|
||||
action = function()
|
||||
if not itemCheck('lsd_one_vial') then return end
|
||||
if not minigame() then TriggerServerEvent("md-drugs:server:failrefinequality") return end
|
||||
if not progressbar(Bridge.Language.Locale('lsd.refining')) then return end
|
||||
TriggerServerEvent("md-drugs:server:refinequalityacid")
|
||||
end,
|
||||
canInteract = function()
|
||||
if not dirtylsd then return true end
|
||||
end
|
||||
},
|
||||
},
|
||||
distance = 3.0
|
||||
})
|
||||
end
|
||||
end, 1, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:cleanlabkit")
|
||||
AddEventHandler("md-drugs:client:cleanlabkit", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("clean", 0)
|
||||
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: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()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Refining The Quality!", 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:refinequalityacid")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
TriggerServerEvent("md-drugs:server:failrefinequality")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 1, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:maketabpaper")
|
||||
AddEventHandler("md-drugs:client:maketabpaper", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Dipping LSD Onto Paper", 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:maketabpaper")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
TriggerServerEvent("md-drugs:server:failtabs")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 3, 8) -- NumberOfCircles,
|
||||
end)
|
||||
end)
|
||||
|
||||
|
||||
RegisterNetEvent("md-drugs:client:cutsheet")
|
||||
AddEventHandler("md-drugs:client:cutsheet", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
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)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:buytabs")
|
||||
AddEventHandler("md-drugs:client:buytabs", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
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)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:buylabkit")
|
||||
AddEventHandler("md-drugs:client:buylabkit", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
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)
|
||||
end)
|
||||
|
||||
|
||||
|
||||
function MethBagEffect()
|
||||
local startStamina = 8
|
||||
TrevorEffect()
|
||||
SetRunSprintMultiplierForPlayer(PlayerId(), 1.49)
|
||||
while startStamina > 0 do
|
||||
Wait(1000)
|
||||
if math.random(5, 100) < 10 then
|
||||
RestorePlayerStamina(PlayerId(), 1.0)
|
||||
end
|
||||
startStamina = startStamina - 1
|
||||
if math.random(5, 100) < 51 then
|
||||
TrevorEffect()
|
||||
end
|
||||
end
|
||||
startStamina = 0
|
||||
SetRunSprintMultiplierForPlayer(PlayerId(), 1.0)
|
||||
{
|
||||
icon = Bridge.Language.Locale('lsd.targetDippingIcon'),
|
||||
label = Bridge.Language.Locale('lsd.targetDipping'),
|
||||
action = function()
|
||||
if not itemCheck('tab_paper') then return end
|
||||
if not minigame() then TriggerServerEvent("md-drugs:server:failtabs") return end
|
||||
if not progressbar(Bridge.Language.Locale('lsd.dipping')) then return end
|
||||
TriggerServerEvent("md-drugs:server:maketabpaper")
|
||||
end,
|
||||
canInteract = function()
|
||||
if not dirtylsd then return true end
|
||||
end
|
||||
},
|
||||
{
|
||||
icon = Bridge.Language.Locale('lsd.targetPickupIcon'),
|
||||
label = Bridge.Language.Locale('lsd.targetPickup'),
|
||||
action = function()
|
||||
if not progressbar(Bridge.Language.Locale('lsd.packup')) then return end
|
||||
DeleteObject(labkit)
|
||||
TriggerServerEvent('md-drugs:server:getlabkitback')
|
||||
tableout = false
|
||||
end,
|
||||
canInteract = function()
|
||||
if not dirtylsd then return true end
|
||||
end
|
||||
},
|
||||
{
|
||||
icon = Bridge.Language.Locale('lsd.targetCleanIcon'),
|
||||
label = Bridge.Language.Locale('lsd.targetClean'),
|
||||
action = function()
|
||||
if not itemCheck('cleaningkit') then return end
|
||||
if not progressbar(Bridge.Language.Locale('lsd.cleaning'), 4000, 'clean') then return end
|
||||
local check = Bridge.Callback.Trigger('md-drugs:server:removecleaningkit')
|
||||
if check then
|
||||
dirtylsd = false
|
||||
end
|
||||
end,
|
||||
canInteract = function() if dirtylsd then return true end end
|
||||
}
|
||||
}
|
||||
Bridge.Target.AddLocalEntity(labkit, options)
|
||||
targets[#targets+1] = labkit
|
||||
end
|
||||
|
||||
function TrevorEffect()
|
||||
StartScreenEffect("DrugsTrevorClownsFightIn", 3.0, 0)
|
||||
Wait(3000)
|
||||
StartScreenEffect("DrugsTrevorClownsFight", 3.0, 0)
|
||||
Wait(3000)
|
||||
StartScreenEffect("DrugsTrevorClownsFightOut", 3.0, 0)
|
||||
StopScreenEffect("DrugsTrevorClownsFight")
|
||||
StopScreenEffect("DrugsTrevorClownsFightIn")
|
||||
StopScreenEffect("DrugsTrevorClownsFightOut")
|
||||
for k, v in pairs (locations.lysergicacid) do
|
||||
Bridge.Target.AddBoxZone('lysergicacid'..k,v.loc, v.size, v.loc.w or 180.0, {
|
||||
{
|
||||
label = Bridge.Language.Locale('lsd.targetLys'),
|
||||
icon = Bridge.Language.Locale('lsd.targetLysIcon'),
|
||||
action = function()
|
||||
if not minigame() then TriggerServerEvent("md-drugs:server:faillysergic") return end
|
||||
if not progressbar(Bridge.Language.Locale('lsd.stealLys')) then return end
|
||||
TriggerServerEvent("md-drugs:server:getlysergic", k)
|
||||
end,
|
||||
canInteract = function()
|
||||
if not handleGang(v.gang) then return false end
|
||||
return true
|
||||
end
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = 'lysergicacid'..k
|
||||
end
|
||||
|
||||
function EcstasyEffect()
|
||||
local startStamina = 30
|
||||
SetFlash(0, 0, 500, 7000, 500)
|
||||
while startStamina > 0 do
|
||||
Wait(1000)
|
||||
startStamina = startStamina - 1
|
||||
RestorePlayerStamina(PlayerId(), 1.0)
|
||||
if math.random(1, 100) < 51 then
|
||||
SetFlash(0, 0, 500, 7000, 500)
|
||||
ShakeGameplayCam('SMALL_EXPLOSION_SHAKE', 0.08)
|
||||
end
|
||||
end
|
||||
if IsPedRunning(PlayerPedId()) then
|
||||
SetPedToRagdoll(PlayerPedId(), math.random(1000, 3000), math.random(1000, 3000), 3, 0, 0, 0)
|
||||
end
|
||||
|
||||
startStamina = 0
|
||||
for k, v in pairs (locations.diethylamide) do
|
||||
Bridge.Target.AddBoxZone('diethylamide'..k, v.loc, v.size, v.loc.w or 180.0, {
|
||||
{
|
||||
label = Bridge.Language.Locale('lsd.targetDie'),
|
||||
icon = Bridge.Language.Locale('lsd.targetDieIcon'),
|
||||
action = function()
|
||||
if not minigame() then TriggerServerEvent("md-drugs:server:faildiethylamide") return end
|
||||
if not progressbar(Bridge.Language.Locale('lsd.stealDie')) then return end
|
||||
TriggerServerEvent("md-drugs:server:getdiethylamide", k)
|
||||
end,
|
||||
canInteract = function()
|
||||
if not handleGang(v.gang) then return false end
|
||||
return true
|
||||
end
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = 'diethylamide'..k
|
||||
end
|
||||
|
||||
|
||||
function CokeBaggyEffect()
|
||||
local startStamina = 20
|
||||
local ped = PlayerPedId()
|
||||
AlienEffect()
|
||||
SetRunSprintMultiplierForPlayer(PlayerId(), 1.1)
|
||||
while startStamina > 0 do
|
||||
Wait(1000)
|
||||
if math.random(1, 100) < 20 then
|
||||
RestorePlayerStamina(PlayerId(), 1.0)
|
||||
end
|
||||
startStamina = startStamina - 1
|
||||
if math.random(1, 100) < 10 and IsPedRunning(ped) then
|
||||
SetPedToRagdoll(ped, math.random(1000, 3000), math.random(1000, 3000), 3, 0, 0, 0)
|
||||
end
|
||||
if math.random(1, 300) < 10 then
|
||||
AlienEffect()
|
||||
Wait(math.random(3000, 6000))
|
||||
end
|
||||
end
|
||||
if IsPedRunning(ped) then
|
||||
SetPedToRagdoll(ped, math.random(1000, 3000), math.random(1000, 3000), 3, 0, 0, 0)
|
||||
end
|
||||
|
||||
startStamina = 0
|
||||
SetRunSprintMultiplierForPlayer(PlayerId(), 1.0)
|
||||
for k, v in pairs (locations.gettabs) do
|
||||
Bridge.Target.AddBoxZone('gettabs'..k, v.loc, v.size, v.loc.w or 180.0, {
|
||||
{
|
||||
label = Bridge.Language.Locale('lsd.targetBuyTab'),
|
||||
icon = Bridge.Language.Locale('lsd.targetBuyTabIcon'),
|
||||
action = function()
|
||||
TriggerServerEvent("md-drugs:server:gettabpaper", k)
|
||||
end,
|
||||
canInteract = function()
|
||||
if not handleGang(v.gang) then return false end
|
||||
return true
|
||||
end
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = 'gettabs'..k
|
||||
end
|
||||
|
||||
function AlienEffect()
|
||||
StartScreenEffect("DrugsMichaelAliensFightIn", 3.0, 0)
|
||||
Wait(math.random(5000, 8000))
|
||||
StartScreenEffect("DrugsMichaelAliensFight", 3.0, 0)
|
||||
Wait(math.random(5000, 8000))
|
||||
StartScreenEffect("DrugsMichaelAliensFightOut", 3.0, 0)
|
||||
StopScreenEffect("DrugsMichaelAliensFightIn")
|
||||
StopScreenEffect("DrugsMichaelAliensFight")
|
||||
StopScreenEffect("DrugsMichaelAliensFightOut")
|
||||
local seller = {}
|
||||
for k, v in pairs (locations.buyLSDkit) do
|
||||
requestModel(v.ped, 1000)
|
||||
seller[k] = CreatePed(4, v.ped, v.loc.x, v.loc.y, v.loc.z, v.loc.w, false, false)
|
||||
Freeze(seller[k], true, v.loc.w)
|
||||
Bridge.Target.AddLocalEntity(seller[k], {
|
||||
{
|
||||
label = Bridge.Language.Locale('lsd.targetBuyKit'),
|
||||
icon = Bridge.Language.Locale('lsd.targetBuyKitIcon'),
|
||||
action = function()
|
||||
if Bridge.Inventory.HasItem('lsdlabkit') then
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('lsd.alreadyOwn'), 'error')
|
||||
return
|
||||
end
|
||||
if not progressbar(Bridge.Language.Locale('lsd.buyingKit')) then return end
|
||||
TriggerServerEvent('md-drugs:server:getlabkit', k)
|
||||
end,
|
||||
canInteract = function()
|
||||
if not handleGang(v.gang) then return false end
|
||||
return true
|
||||
end
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = seller[k]
|
||||
end
|
||||
|
||||
Bridge.Callback.Register("md-drugs:client:setlsdlabkit", function()
|
||||
if tableout then
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('lsd.tableout'), 'error')
|
||||
return false
|
||||
else
|
||||
tableout = true
|
||||
local loc, head = StartRay()
|
||||
if not loc then tableout = false return end
|
||||
if not progressbar(Bridge.Language.Locale('lsd.placing')) then return end
|
||||
createLabKit(loc, head)
|
||||
return true, loc
|
||||
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)
|
||||
end)
|
||||
@@ -1,179 +1,55 @@
|
||||
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)
|
||||
if not Config.Drugs['mescaline'] then return end
|
||||
local badTrip = 100
|
||||
local locations = Config.Mescaline.Locations
|
||||
local function AlienEffect()
|
||||
CreateThread(function()
|
||||
StartScreenEffect("DrugsMichaelAliensFightIn", 3.0, 0)
|
||||
StartScreenEffect("DrugsMichaelAliensFight", 3.0, 0)
|
||||
Wait(math.random(25000, 35000))
|
||||
StartScreenEffect("DrugsMichaelAliensFightOut", 3.0, 0)
|
||||
StopScreenEffect("DrugsMichaelAliensFightIn")
|
||||
StopScreenEffect("DrugsMichaelAliensFight")
|
||||
StopScreenEffect("DrugsMichaelAliensFightOut")
|
||||
end)
|
||||
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
|
||||
})
|
||||
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
|
||||
})
|
||||
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)
|
||||
if GetCurrentResourceName() == resourceName then
|
||||
SetModelAsNoLongerNeeded(GetHashKey('prop_cactus_03'))
|
||||
for k, v in pairs(Mescaline) do
|
||||
if DoesEntityExist(v) then
|
||||
DeleteEntity(v) SetEntityAsNoLongerNeeded(v)
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
RegisterNetEvent("md-drugs:client:drymescaline")
|
||||
AddEventHandler("md-drugs:client:drymescaline", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
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)
|
||||
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)
|
||||
NetworkRegisterEntityAsNetworked(clone)
|
||||
networkID = NetworkGetNetworkIdFromEntity(clone)
|
||||
SetNetworkIdCanMigrate(networkID, true)
|
||||
SetNetworkIdExistsOnAllMachines(networkID, 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)
|
||||
for k, v in pairs (locations.DryOutMescaline) do
|
||||
Bridge.Target.AddBoxZone('dryoutMesc'..k, v.loc, v.size, v.loc.w or 180.0,{
|
||||
{
|
||||
label = Bridge.Language.Locale('mesc.targetDry'),
|
||||
icon = 'fa-solid fa-temperature-high',
|
||||
action = function()
|
||||
if not itemCheck('cactusbulb') then return end
|
||||
if not progressbar(Bridge.Language.Locale('mesc.dry')) then return end
|
||||
TriggerServerEvent("md-drugs:server:drymescaline", k)
|
||||
end,
|
||||
canInteract = function()
|
||||
if not handleGang(v.gang) then return false end
|
||||
return true
|
||||
end
|
||||
else
|
||||
AlienEffect()
|
||||
end
|
||||
end)
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = 'dryoutMesc'..k
|
||||
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(Bridge.Language.Locale('mesc.eat')) then return end
|
||||
if chance <= badTrip then
|
||||
AlienEffect()
|
||||
Wait(math.random(3000,6000))
|
||||
local clone = ClonePed(PlayerPedId(), true, true, 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)
|
||||
@@ -0,0 +1,452 @@
|
||||
if not Config.Drugs['meth'] then return end
|
||||
local amonia, tray, heated, active, trays, startedmeth, methVan = false, false, false, false, nil, false, nil
|
||||
local locations = Config.Meth.Locations
|
||||
--- meth heist
|
||||
|
||||
|
||||
local function SpawnMethCarPedChase(loc)
|
||||
local stoploc = vector3(-1157.63, -3056.71, 13.94)
|
||||
local start = locations.StartLoc[math.random(1,#locations.StartLoc)]
|
||||
if startedmeth then
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('meth.alreadyChasing'),'error')
|
||||
else
|
||||
startedmeth = true
|
||||
requestModel("journey", 30000)
|
||||
requestModel("a_m_m_hillbilly_02", 30000)
|
||||
requestModel("cargobob3", 30000)
|
||||
methVan = 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)
|
||||
local can = Bridge.Callback.Trigger('md-drugs:server:registerMeth', loc, NetworkGetNetworkIdFromEntity(methVan))
|
||||
if not can then
|
||||
startedmeth = false
|
||||
DeleteVehicle(methVan)
|
||||
DeleteEntity(methdriver)
|
||||
DeleteEntity(methpilot)
|
||||
return
|
||||
end
|
||||
FreezeEntityPosition(methpilot, true)
|
||||
SetEntityInvincible(methpilot, true)
|
||||
SetEntityAsMissionEntity(methVan)
|
||||
AddBlipForEntity(methVan)
|
||||
SetPedIntoVehicle(methdriver, methVan, -1)
|
||||
SetPedFleeAttributes(methdriver,false)
|
||||
TaskVehicleDriveToCoordLongrange(methdriver, methVan, stoploc.x, stoploc.y, stoploc.z-1, 50.0, 524288, 25.0)
|
||||
SetPedKeepTask(methdriver, true)
|
||||
|
||||
repeat
|
||||
Wait(1000)
|
||||
until #(GetEntityCoords(methdriver) - stoploc) < 20.0 or GetEntityHealth(methdriver) == 0
|
||||
|
||||
if GetEntityHealth(methdriver) == 0 then
|
||||
Bridge.Target.AddLocalEntity(methVan, {
|
||||
{
|
||||
name = 'methcar',
|
||||
icon = Bridge.Language.Locale('meth.targetStealFromCarIcon'),
|
||||
label = Bridge.Language.Locale('meth.targetStealFromCar'),
|
||||
action = function()
|
||||
if not minigame() then return end
|
||||
TriggerServerEvent('md-drugs:server:givemethingridients', NetworkGetNetworkIdFromEntity(methVan))
|
||||
startedmeth = false
|
||||
DeleteEntity(methdriver)
|
||||
DeleteEntity(methpilot)
|
||||
end,
|
||||
}
|
||||
})
|
||||
else
|
||||
DeleteVehicle(methVan)
|
||||
DeleteEntity(methdriver)
|
||||
DeleteEntity(methpilot)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local peds = {}
|
||||
for k, v in pairs (locations.MethHeist) do
|
||||
peds[k] = CreatePed(4, GetHashKey(v.ped), v.loc.x, v.loc.y, v.loc.z, v.loc.w, false, true)
|
||||
Freeze(peds[k], true, v.loc.w)
|
||||
Bridge.Target.AddLocalEntity(peds[k], {
|
||||
{
|
||||
icon = Bridge.Language.Locale('meth.targetHeistIcon'),
|
||||
label = Bridge.Language.Locale('meth.targetHeist'),
|
||||
action = function()
|
||||
if startedmeth then
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('meth.alreadyChasing'),'error')
|
||||
return
|
||||
end
|
||||
SpawnMethCarPedChase(k)
|
||||
end,
|
||||
canInteract = function()
|
||||
return handleGang(v.gang)
|
||||
end
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = peds[k]
|
||||
end
|
||||
|
||||
---- start animation shit
|
||||
local function loadParticle(dict)
|
||||
if not HasNamedPtfxAssetLoaded(dict) then
|
||||
RequestNamedPtfxAsset(dict)
|
||||
end
|
||||
while not HasNamedPtfxAssetLoaded(dict) do
|
||||
Wait(0)
|
||||
end
|
||||
SetPtfxAssetNextCall(dict)
|
||||
end
|
||||
|
||||
local function dialSuccess(coords)
|
||||
requestModel('hei_prop_heist_thermite', 2000)
|
||||
loadParticle('scr_ornate_heist')
|
||||
local thermite = CreateObject('hei_prop_heist_thermite', coords.x - 0.5, coords.y - 0.5, coords.z -0.5, true, false, false)
|
||||
FreezeEntityPosition(thermite, true)
|
||||
SetEntityVisible(thermite, false)
|
||||
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)
|
||||
DeleteObject(thermite)
|
||||
end
|
||||
|
||||
local function MethCooking(coords, offset, rotation)
|
||||
local animDict, animName = "anim@amb@business@meth@meth_monitoring_cooking@cooking@", "chemical_pour_short_cooker"
|
||||
Bridge.Anim.RequestDict(animDict)
|
||||
SetEntityCoords(PlayerPedId(), coords)
|
||||
local targetPosition = GetEntityCoords(PlayerPedId())
|
||||
local animDuration = GetAnimDuration(animDict, animName) * 800
|
||||
FreezeEntityPosition(PlayerPedId(), true)
|
||||
local scenePos, sceneRot = vector3(coords.x + offset.x, coords.y + offset.y, coords.z + offset.z), rotation
|
||||
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)
|
||||
end
|
||||
|
||||
|
||||
local function SmashMeth(coords, offset, rotation)
|
||||
local ver = ""
|
||||
local animDict, animName = "anim@amb@business@meth@meth_smash_weight_check@", "break_weigh_"..ver.."char02"
|
||||
Bridge.Anim.RequestDict(animDict, 500)
|
||||
local ped = PlayerPedId()
|
||||
local targetPosition = coords
|
||||
SetEntityCoords(ped, targetPosition)
|
||||
Wait(1)
|
||||
local animDuration = GetAnimDuration(animDict, animName) * 800
|
||||
FreezeEntityPosition(ped, true)
|
||||
local scenePos, sceneRot = vector3(coords.x + offset.x, coords.y + offset.y, coords.z + offset.z), rotation
|
||||
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
|
||||
|
||||
local function BagMeth(coords, offset, rotation)
|
||||
local ver = ""
|
||||
local animDict, animName = "anim@amb@business@meth@meth_smash_weight_check@", "break_weigh_"..ver.."char01"
|
||||
Bridge.Anim.RequestDict(animDict, 500)
|
||||
local animDuration = GetAnimDuration(animDict, animName) * 1000
|
||||
local ped = PlayerPedId()
|
||||
SetEntityCoords(ped, coords)
|
||||
local scenePos, sceneRot = vector3(coords.x + offset.x, coords.y + offset.y, coords.z + offset.z), rotation
|
||||
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_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_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"}
|
||||
}
|
||||
}
|
||||
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
|
||||
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)
|
||||
end
|
||||
---------------------- end animation shit
|
||||
---
|
||||
|
||||
local function startcook(num, coords, offset, rotation)
|
||||
if not amonia then
|
||||
local adding = Bridge.Callback.Trigger('md-drugs:server:startcook', num)
|
||||
if not adding then return end
|
||||
active = true
|
||||
MethCooking(coords, offset, rotation)
|
||||
amonia = true
|
||||
else
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('meth.started'), "error")
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
local function dials(coords)
|
||||
if amonia then
|
||||
if not minigame() then
|
||||
AddExplosion(coords.x, coords.y,coords.z, 49, 10, true, false, true)
|
||||
amonia = false
|
||||
active = false
|
||||
return
|
||||
end
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('meth.increaseHeat'), "success")
|
||||
dialSuccess(coords)
|
||||
heated = true
|
||||
end
|
||||
end
|
||||
|
||||
local function smash(coords, offset, rotation, buckets, k)
|
||||
if active and tray and amonia and heated then
|
||||
DeleteObject(trays)
|
||||
tray = false
|
||||
local bucket = CreateObject("bkr_prop_meth_bigbag_03a", buckets.x, buckets.y, buckets.z, true, true, true)
|
||||
Freeze(bucket, true, buckets.w)
|
||||
SmashMeth(coords, offset, rotation)
|
||||
Wait(100)
|
||||
Bridge.Target.AddLocalEntity(bucket, {
|
||||
{
|
||||
name = 'bucket',
|
||||
icon = Bridge.Language.Locale('meth.targetBagIcon'),
|
||||
label = Bridge.Language.Locale('meth.targetBag'),
|
||||
action = function()
|
||||
DeleteObject(bucket)
|
||||
active = false
|
||||
amonia = false
|
||||
heated = false
|
||||
tray = false
|
||||
BagMeth(locations.BagMeth[k].loc, locations.BagMeth[k].offset, locations.BagMeth[k].rotation)
|
||||
TriggerServerEvent('md-drugs:server:getmeth', k)
|
||||
end,
|
||||
canInteract = function()
|
||||
if not active then return false end
|
||||
return true
|
||||
end,
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = bucket
|
||||
end
|
||||
end
|
||||
|
||||
local function trayscarry()
|
||||
if amonia and heated then
|
||||
local pos = GetEntityCoords(PlayerPedId(), true)
|
||||
Bridge.Anim.RequestDict('anim@heists@box_carry@')
|
||||
TaskPlayAnim(PlayerPedId(), 'anim@heists@box_carry@', 'idle', 5.0, -1, -1, 50, 0, false, false, false)
|
||||
requestModel('bkr_prop_meth_tray_02a')
|
||||
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
|
||||
|
||||
|
||||
|
||||
for k, v in pairs (locations.CookMeth) do
|
||||
Bridge.Target.AddBoxZone('cookMeth'..k, v.loc, v.size, v.loc.w or 180.0, {
|
||||
{
|
||||
label = Bridge.Language.Locale('meth.targetCook'),
|
||||
icon = Bridge.Language.Locale('meth.targetCookIcon'),
|
||||
action = function()
|
||||
startcook(k, v.loc, v.offset or vec3(0,0,0), v.rotation or vector3(0,0,180.0))
|
||||
end,
|
||||
canInteract = function()
|
||||
if not handleGang(v.gang) then return false end
|
||||
if not amonia and not active then
|
||||
return true
|
||||
end
|
||||
end,
|
||||
},
|
||||
{
|
||||
icon = Bridge.Language.Locale('meth.targetGrabTrayIcon'),
|
||||
label = Bridge.Language.Locale('meth.targetGrabTray'),
|
||||
action = function() trayscarry() end,
|
||||
canInteract = function()
|
||||
if not handleGang(v.gang) then return false end
|
||||
if heated and amonia and not tray then
|
||||
return true
|
||||
end
|
||||
end,
|
||||
},
|
||||
})
|
||||
targets[#targets+1] = 'cookMeth'..k
|
||||
end
|
||||
|
||||
for k, v in pairs (locations.MethDials) do
|
||||
Bridge.Target.AddBoxZone('adjustMethDials'..k, v.loc, v.size, v.loc.w or 180.0, {
|
||||
{
|
||||
name = 'adjustdials',
|
||||
icon = Bridge.Language.Locale('meth.targetHeatIcon'),
|
||||
label = Bridge.Language.Locale('meth.targetHeat'),
|
||||
action = function()
|
||||
dials(locations.CookMeth[k].loc)
|
||||
end,
|
||||
canInteract = function()
|
||||
if not handleGang(v.gang) then return false end
|
||||
if amonia and heated == false then return true end
|
||||
end
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = 'adjustMethDials'..k
|
||||
end
|
||||
|
||||
for k, v in pairs (locations.MethSmash) do
|
||||
Bridge.Target.AddBoxZone('smashMeth'..k, v.loc, v.size, v.loc.w or 180.0, {
|
||||
{
|
||||
name = 'smash',
|
||||
icon = Bridge.Language.Locale('meth.targetSmashIcon'),
|
||||
label = Bridge.Language.Locale('meth.targetSmash'),
|
||||
action = function()
|
||||
smash(v.loc, v.offset, v.rotation, v.bucket,k)
|
||||
end,
|
||||
canInteract = function()
|
||||
if not handleGang(v.gang) then return false end
|
||||
if heated and amonia and tray then return true end
|
||||
end
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = 'smashMeth'..k
|
||||
end
|
||||
|
||||
for k, v in pairs (locations.MethTele) do
|
||||
Bridge.Target.AddBoxZone('meth_tele'..k, v.inside, v.size, v.rot, {
|
||||
{
|
||||
icon = Bridge.Language.Locale('meth.teleOutIcon'),
|
||||
label = Bridge.Language.Locale('meth.teleOut'),
|
||||
action = function()
|
||||
SetEntityCoords(PlayerPedId(), v.outside)
|
||||
end,
|
||||
canInteract = function()
|
||||
return handleGang(v.gang)
|
||||
end
|
||||
}
|
||||
})
|
||||
Bridge.Target.AddBoxZone('meth_teleout'..k, v.outside, v.size, v.rot, {
|
||||
{
|
||||
icon = Bridge.Language.Locale('meth.teleInIcon'),
|
||||
label = Bridge.Language.Locale('meth.teleIn'),
|
||||
action = function()
|
||||
SetEntityCoords(PlayerPedId(), v.inside)
|
||||
end,
|
||||
canInteract = function()
|
||||
return handleGang(v.gang)
|
||||
end
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = 'meth_tele'..k
|
||||
targets[#targets+1] = 'meth_teleout'..k
|
||||
end
|
||||
|
||||
RegisterCommand('offset', function()
|
||||
local pos = GetEntityCoords(PlayerPedId())
|
||||
Wait(4000)
|
||||
local offset = GetEntityCoords(PlayerPedId()) - pos
|
||||
print("Offset: ", offset)
|
||||
end)
|
||||
|
||||
for k, v in pairs (locations.MethEph) do
|
||||
Bridge.Target.AddBoxZone('stealMethEph'..k, v.loc, v.size, v.loc.w or 180.0, {
|
||||
{
|
||||
label = Bridge.Language.Locale('meth.targetStealEPH'),
|
||||
icon = Bridge.Language.Locale('meth.targetStealEPHIcon'),
|
||||
action = function()
|
||||
if not progressbar(Bridge.Language.Locale('meth.stealingEPH')) then return end
|
||||
TriggerServerEvent("md-drugs:server:geteph", k)
|
||||
end,
|
||||
canInteract = function()
|
||||
return handleGang(v.gang)
|
||||
end
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = 'stealMethEph'..k
|
||||
end
|
||||
for k, v in pairs (locations.MethAce) do
|
||||
Bridge.Target.AddBoxZone('stealMethAce'..k, v.loc, v.size, v.loc.w or 180.0, {
|
||||
{
|
||||
label = Bridge.Language.Locale('meth.targetStealACE'),
|
||||
icon = Bridge.Language.Locale('meth.targetStealACEIcon'),
|
||||
action = function()
|
||||
if not progressbar(Bridge.Language.Locale('meth.stealingACE')) then return end
|
||||
TriggerServerEvent("md-drugs:server:getace", k)
|
||||
end,
|
||||
canInteract = function()
|
||||
return handleGang(v.gang)
|
||||
end
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = 'stealMethAce'..k
|
||||
end
|
||||
|
||||
CreateThread(function()
|
||||
BikerMethLab = exports['bob74_ipl']:GetBikerMethLabObject()
|
||||
BikerMethLab.Style.Set(BikerMethLab.Style.upgrade)
|
||||
BikerMethLab.Security.Set(BikerMethLab.Security.upgrade)
|
||||
BikerMethLab.Details.Enable(BikerMethLab.Details.production, true)
|
||||
RefreshInterior(BikerMethLab.interiorId)
|
||||
end)
|
||||
@@ -1,188 +1,101 @@
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
|
||||
local deliveryBlip = nil
|
||||
local PZone = nil
|
||||
local listen = false
|
||||
if not Config.Drugs['oxyruns'] then return end
|
||||
local carryPackage = nil
|
||||
local onMission = false
|
||||
local locations = Config.Oxy.Locations
|
||||
local pdAlert = 90
|
||||
local vehicle = nil
|
||||
|
||||
|
||||
RegisterNetEvent("md-drugs:client:getoxytruck")
|
||||
AddEventHandler("md-drugs:client:getoxytruck", function()
|
||||
if TriggerServerEvent('md-drugs:server:payfortruck') then
|
||||
end
|
||||
end)
|
||||
|
||||
function Policecall()
|
||||
---------------------- insert police call in here
|
||||
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
|
||||
if not IsModelInCdimage(ModelHash) then return end
|
||||
RequestModel(ModelHash) -- Request the model
|
||||
while not HasModelLoaded(ModelHash) do -- Waits for the model to load
|
||||
Wait(0)
|
||||
local function getRoute()
|
||||
local Route = Bridge.Callback.Trigger('md-drugs:server:getRoute')
|
||||
if not Route then
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('oxy.ditchCar'), "error")
|
||||
onMission = false
|
||||
return false
|
||||
end
|
||||
local oxycar = CreateVehicle(ModelHash,Config.truckspawn.x, Config.truckspawn.y,Config.truckspawn.z, Config.truckspawn.h, true, false)
|
||||
SetEntityHeading(oxycar, coords.w)
|
||||
exports[Config.Fuel]:SetFuel(oxycar, 100.0)
|
||||
TriggerEvent("vehiclekeys:client:SetOwner", QBCore.Functions.GetPlate(oxycar))
|
||||
TriggerEvent('QBCore:Notify', 'Your truck is here', 'success')
|
||||
TriggerEvent("md-drugs:client:getoxylocationroute")
|
||||
SetVehicleEngineOn(oxycar, true, true)
|
||||
exports['qb-target']:AddTargetEntity(oxycar, {
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:getfromtrunk",
|
||||
icon = "fas fa-box-circle-check",
|
||||
label = "Get Package",
|
||||
|
||||
},
|
||||
},
|
||||
distance = 3.0
|
||||
})
|
||||
end)
|
||||
local Route = locations.oxylocations[Route]
|
||||
SetNewWaypoint(Route.x, Route.y)
|
||||
requestModel('g_m_y_famdnf_01', 30000)
|
||||
local oxybuyer = CreatePed(0, 'g_m_y_famdnf_01',Route.x,Route.y,Route.z-1, Route.w, false, false)
|
||||
Freeze(oxybuyer, true, Route.w)
|
||||
local timeOut = 300
|
||||
|
||||
CreateThread(function()
|
||||
if Config.oxtarget then
|
||||
exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47
|
||||
coords = Config.Payfortruck,
|
||||
size = vec3(2,2,2),
|
||||
debugPoly = false,
|
||||
rotation = 45,
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:getoxytruck",
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "Pay For Truck",
|
||||
|
||||
|
||||
},
|
||||
},
|
||||
repeat
|
||||
Wait(1000)
|
||||
timeOut = timeOut - 1
|
||||
until #(GetEntityCoords(PlayerPedId()) - vector3(Route.x,Route.y,Route.z)) < 5.0 or timeOut == 0
|
||||
|
||||
PoliceCall(pdAlert)
|
||||
Bridge.Target.AddLocalEntity(oxybuyer,{
|
||||
{
|
||||
label = Bridge.Language.Locale('oxy.targetHandoff'),
|
||||
icon = Bridge.Language.Locale('oxy.targetHandOffIcon'),
|
||||
action = function()
|
||||
if carryPackage then
|
||||
if not progressbar(Bridge.Language.Locale('oxy.handingoff')) then return end
|
||||
TriggerServerEvent("md-drugs:server:giveoxybox")
|
||||
DeleteEntity(oxybuyer)
|
||||
DetachEntity(carryPackage, true, true)
|
||||
DeleteObject(carryPackage)
|
||||
carryPackage = nil
|
||||
getRoute()
|
||||
else
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('oxy.emptyHands'), "error")
|
||||
end
|
||||
end
|
||||
}
|
||||
})
|
||||
else
|
||||
exports['qb-target']:AddBoxZone("getoxylocation",Config.Payfortruck,1.5, 1.75, { -- 963.37, -2122.95, 31.47
|
||||
name = "getoxylocation",
|
||||
heading = 11.0,
|
||||
debugPoly = false,
|
||||
minZ = Config.Payfortruck-2,
|
||||
maxZ = Config.Payfortruck+2,
|
||||
}, {
|
||||
options = {
|
||||
targets[#targets+1] = oxybuyer
|
||||
end
|
||||
|
||||
for k, v in pairs(locations.OxyPayForTruck) do
|
||||
Bridge.Target.AddBoxZone('oxyTruckPur' ..k , v.loc, v.size, v.loc.w or 180.0, {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:getoxytruck",
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "Pay For Truck",
|
||||
|
||||
|
||||
},
|
||||
|
||||
},
|
||||
distance = 2.5
|
||||
})
|
||||
|
||||
end
|
||||
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)
|
||||
druglocation = CircleZone:Create(CurrentLocation, 5,{ name = "oxyruns", debugPoly = false })
|
||||
druglocation:onPlayerInOut(function(isPointInside) if isPointInside then RemoveBlip(deliveryBlip) end end)
|
||||
end
|
||||
if unluck <= Config.PoliceAlertOxy then
|
||||
Policecall()
|
||||
end
|
||||
local current = "g_m_y_famdnf_01"
|
||||
RequestModel(current)
|
||||
while not HasModelLoaded(current) do
|
||||
Wait(0)
|
||||
end
|
||||
|
||||
drugdealer = CreatePed(0, current,CurrentLocation.x,CurrentLocation.y,CurrentLocation.z-1, false, false)
|
||||
SetEntityHeading(drugdealer, 180)
|
||||
FreezeEntityPosition(drugdealer, true)
|
||||
SetEntityInvincible(drugdealer, true)
|
||||
exports['qb-target']:AddTargetEntity(drugdealer, {
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
label = "Talk To Buyer",
|
||||
icon = "fas fa-eye",
|
||||
event = "md-drugs:client:giveoxybox"
|
||||
},
|
||||
},
|
||||
distance = 2.0
|
||||
})
|
||||
|
||||
|
||||
end)
|
||||
|
||||
|
||||
|
||||
RegisterNetEvent("md-drugs:client:getfromtrunk")
|
||||
AddEventHandler("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
|
||||
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
|
||||
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(drugdealer)
|
||||
DetachEntity(carryPackage, true, true)
|
||||
DeleteObject(carryPackage)
|
||||
carryPackage = nil
|
||||
end)
|
||||
else
|
||||
QBCore.Functions.Notify("cant be empty handed idiot", "error")
|
||||
end
|
||||
end)
|
||||
icon = Bridge.Language.Locale('oxy.targetPayIcon'),
|
||||
label = Bridge.Language.Locale('oxy.targetPay'),
|
||||
action = function()
|
||||
requestModel("burrito3", 30000)
|
||||
|
||||
local paid = Bridge.Callback.Trigger('md-drugs:server:payfortruck', k)
|
||||
if not paid then return end
|
||||
vehicle = CreateVehicle("burrito3",v.truckSpawn.x, v.truckSpawn.y, v.truckSpawn.z, v.truckSpawn.w, true, false)
|
||||
SetVehicleFuelLevel(vehicle, 100.0)
|
||||
local plate = GetVehicleNumberPlateText(vehicle)
|
||||
Bridge.VehicleKey.GiveKeys(vehicle, plate)
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('oxy.keys'), 'success')
|
||||
onMission = true
|
||||
TriggerServerEvent('md-drugs:server:startOxyRun', NetworkGetNetworkIdFromEntity(vehicle))
|
||||
|
||||
Bridge.Target.AddLocalEntity(vehicle, {
|
||||
{
|
||||
icon = Bridge.Language.Locale('oxy.targetGetPackageIcon'),
|
||||
label = Bridge.Language.Locale('oxy.targetGetPackage'),
|
||||
action = function()
|
||||
if carryPackage then
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('oxy.alreadyCarrying'), "error")
|
||||
else
|
||||
local pos = GetEntityCoords(PlayerPedId(), true)
|
||||
Bridge.Anim.RequestDict('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")
|
||||
carryPackage = CreateObject("hei_prop_drug_statue_box_big", pos.x, pos.y, pos.z, true, true, true)
|
||||
AttachEntityToEntity(carryPackage, PlayerPedId(), GetPedBoneIndex(PlayerPedId(), 57005), 0.05, 0.1, -0.3, 300.0, 250.0, 20.0, true, true, false, true, 1, true)
|
||||
end
|
||||
end,
|
||||
canInteract = function()
|
||||
return handleGang(v.gang)
|
||||
end
|
||||
}
|
||||
})
|
||||
Wait(1000)
|
||||
getRoute()
|
||||
end,
|
||||
canInteract = function()
|
||||
if onMission then
|
||||
return false
|
||||
end
|
||||
return true
|
||||
end
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = 'oxyTruckPur' ..k
|
||||
end
|
||||
@@ -1,172 +1,47 @@
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
|
||||
RegisterCommand('prescriptionpad', function()
|
||||
if QBCore.Functions.GetPlayerData().job.name == "ambulance" then
|
||||
exports['qb-menu']:openMenu({
|
||||
{
|
||||
header = 'Prescription Pad',
|
||||
icon = 'fa-solid fa-prescription',
|
||||
isMenuHeader = true, -- Set to true to make a nonclickable title
|
||||
},
|
||||
{
|
||||
header = 'Give Vicodin',
|
||||
txt = 'Give Vicodin ',
|
||||
icon = 'fa-solid fa-file-prescription',
|
||||
params = {
|
||||
event = 'md-drugs:client:givevicodinprescription',
|
||||
args = {
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
header = 'Give Adderal',
|
||||
txt = 'Give Adderal ',
|
||||
icon = 'fa-solid fa-file-prescription',
|
||||
params = {
|
||||
event = 'md-drugs:client:giveadderalprescription',
|
||||
args = {
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
header = 'Give Morphine',
|
||||
txt = 'Give Morphine ',
|
||||
icon = 'fa-solid fa-file-prescription',
|
||||
params = {
|
||||
event = 'md-drugs:client:givemorphineprescription',
|
||||
args = {
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
header = 'Give Xanax',
|
||||
txt = 'Give Vicodin ',
|
||||
icon = 'fa-solid fa-file-prescription',
|
||||
params = {
|
||||
event = 'md-drugs:client:givexanaxprescription',
|
||||
args = {
|
||||
}
|
||||
}
|
||||
},
|
||||
if not Config.Drugs['pharma'] then return end
|
||||
local locations = Config.Pharma.Locations
|
||||
|
||||
Bridge.Callback.Register("md-drugs:client:prescriptionpad", function( data, op)
|
||||
local job = Bridge.Framework.GetPlayerJob()
|
||||
if job ~= 'ambulance' then
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('pharma.notPharma'), 'error')
|
||||
return
|
||||
end
|
||||
local input = Bridge.Input.Open(Bridge.Language.Locale('pharma.input.header'), {
|
||||
{type = 'select', title = Bridge.Language.Locale('pharma.input.title1'), options = data},
|
||||
{type = 'select', title = Bridge.Language.Locale('pharma.input.title2'), options = op}
|
||||
})
|
||||
else
|
||||
QBCore.Functions.Notify("Youre Not A Medical Person", "error")
|
||||
end
|
||||
if not input[1] then return end
|
||||
if not progressbar(Bridge.Language.Locale('pharma.write'), 4000, {
|
||||
dict = 'missheistdockssetup1clipboard@base',
|
||||
clip = 'base',
|
||||
flag = 49,
|
||||
prop = {
|
||||
model = 'prop_notepad_01',
|
||||
bone = 18905,
|
||||
pos = {0.1, 0.02, 0.03},
|
||||
rot = { -90.0, 0.0, 0.0}
|
||||
}
|
||||
}) then return end
|
||||
return {who = input[1], what = input[2]}
|
||||
end)
|
||||
|
||||
Bridge.Callback.Register("md-drugs:client:unbottle", function()
|
||||
if not progressbar(Bridge.Language.Locale('pharma.opening')) then return end
|
||||
return true
|
||||
end)
|
||||
|
||||
|
||||
RegisterNetEvent("md-drugs:client:givevicodinprescription")
|
||||
AddEventHandler("md-drugs:client:givevicodinprescription", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
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()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
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)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:givemorphineprescription")
|
||||
AddEventHandler("md-drugs:client:givemorphineprescription", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
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()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
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()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
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()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
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)
|
||||
end)
|
||||
for k, v in pairs (locations.FillPrescription) do
|
||||
Bridge.Target.AddBoxZone('pharma' ..k , v.loc,v.size, v.loc.w or 180, {
|
||||
{
|
||||
icon = Bridge.Language.Locale('pharma.fillIcon'),
|
||||
label = Bridge.Language.Locale('pharma.targetFill'),
|
||||
action = function()
|
||||
if not progressbar(Bridge.Language.Locale('pharma.fill')) then return end
|
||||
TriggerServerEvent("md-drugs:server:fillprescription", k)
|
||||
end,
|
||||
}
|
||||
})
|
||||
end
|
||||
@@ -0,0 +1,100 @@
|
||||
|
||||
local DrugPlants = {
|
||||
{model = 'prop_plant_01a', label = 'coke', langs = Bridge.Language.Locale('coke.targetPick'), tbl = GlobalState.CocaPlant, plantTbl = {},
|
||||
pick = function(loc)
|
||||
if not progressbar(Bridge.Language.Locale('coke.picking')) then return end
|
||||
TriggerServerEvent("coke:pickupCane", loc)
|
||||
return true
|
||||
end,
|
||||
allow = Config.Drugs.cocaine,
|
||||
icon = Bridge.Language.Locale('coke.pickIcon'),
|
||||
},
|
||||
{model = 'prop_plant_01b', label = 'heroin',langs = Bridge.Language.Locale('heroin.targetPick'), tbl = GlobalState.PoppyPlants, plantTbl = {},
|
||||
pick = function(loc)
|
||||
if not progressbar(Bridge.Language.Locale('heroin.picking')) then return end
|
||||
TriggerServerEvent("heroin:pickupCane", loc)
|
||||
return true
|
||||
end,
|
||||
allow = Config.Drugs.heroin,
|
||||
icon = Bridge.Language.Locale('heroin.pickIcon'),
|
||||
},
|
||||
{model = 'prop_cactus_03', label = 'Mescaline', langs = Bridge.Language.Locale('mesc.targetPick'), tbl = GlobalState.Mescaline, plantTbl = {},
|
||||
pick = function(loc)
|
||||
if not progressbar(Bridge.Language.Locale('mesc.picking')) then return end
|
||||
TriggerServerEvent("Mescaline:pickupCane", loc)
|
||||
return true
|
||||
end,
|
||||
allow = Config.Drugs.mescaline,
|
||||
icon = Bridge.Language.Locale('mesc.pickIcon'),
|
||||
|
||||
},
|
||||
{model = 'prop_weed_01', label = 'weed', langs = Bridge.Language.Locale('weed.targetPick'), tbl = GlobalState.WeedPlant, plantTbl = {},
|
||||
pick = function(loc)
|
||||
if not progressbar(Bridge.Language.Locale('weed.picking')) then return end
|
||||
TriggerServerEvent("weed:pickupCane", loc)
|
||||
return true
|
||||
end,
|
||||
allow = Config.Drugs.weed,
|
||||
icon = Bridge.Language.Locale('weed.pickIcon'),
|
||||
},
|
||||
{model = 'mushroom', label = 'shrooms', langs = Bridge.Language.Locale('shrooms.targetPick'), tbl = GlobalState.shrooms, plantTbl = {},
|
||||
pick = function(loc)
|
||||
if not progressbar(Bridge.Language.Locale('shrooms.picking')) then return end
|
||||
TriggerServerEvent("shrooms:pickupCane", loc)
|
||||
return true
|
||||
end,
|
||||
allow = Config.Drugs.shrooms,
|
||||
icon = Bridge.Language.Locale('shrooms.pickIcon'),
|
||||
},
|
||||
}
|
||||
|
||||
for k, v in pairs (DrugPlants) do
|
||||
if not v.allow then goto continue end
|
||||
RegisterNetEvent(v.label ..':respawnCane', function(loc)
|
||||
local plant = v.tbl[loc]
|
||||
local hash = GetHashKey(plant.model)
|
||||
if not v.plantTbl[loc] then
|
||||
requestModel(hash)
|
||||
v.plantTbl[loc] = CreateObject(hash, plant.location, false, true, true)
|
||||
Freeze(v.plantTbl[loc], true, plant.heading)
|
||||
Bridge.Target.AddLocalEntity(v.plantTbl[loc], {
|
||||
{
|
||||
icon = v.icon,
|
||||
label = v.langs,
|
||||
action = function()
|
||||
if not v.pick(loc) then return end
|
||||
end
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = v.plantTbl[loc]
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterNetEvent(v.label ..':removeCane', function(loc)
|
||||
DeleteEntity(v.plantTbl[loc])
|
||||
v.plantTbl[loc] = nil
|
||||
end)
|
||||
|
||||
RegisterNetEvent(v.label ..":init", function()
|
||||
if not v.plantTbl then v.plantTbl = {} end
|
||||
for key, value in pairs (v.tbl) do
|
||||
local hash = GetHashKey(value.model)
|
||||
if not value.taken then
|
||||
v.plantTbl[key] = CreateObject(hash, value.location.x, value.location.y, value.location.z, false, true, true)
|
||||
Freeze(v.plantTbl[key], true, v.heading)
|
||||
Bridge.Target.AddLocalEntity(v.plantTbl[key], {
|
||||
{
|
||||
icon = v.icon,
|
||||
label = v.langs,
|
||||
action = function()
|
||||
if not v.pick(key) then return end
|
||||
end
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = v.plantTbl[key]
|
||||
end
|
||||
end
|
||||
end)
|
||||
TriggerEvent(v.label ..":init")
|
||||
::continue::
|
||||
end
|
||||
@@ -1,99 +1,8 @@
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
local shrooms = {}
|
||||
if not Config.Drugs['shrooms'] then return end
|
||||
|
||||
|
||||
function LoadModel(hash)
|
||||
hash = GetHashKey(hash)
|
||||
RequestModel(hash)
|
||||
while not HasModelLoaded(hash) do
|
||||
Wait(3000)
|
||||
end
|
||||
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
|
||||
})
|
||||
end
|
||||
end)
|
||||
|
||||
AddEventHandler('onResourceStart', function(resource)
|
||||
if resource == GetCurrentResourceName() then
|
||||
LoadModel('prop_stoneshroom1')
|
||||
TriggerEvent('shrooms:init')
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterNetEvent('shrooms:removeCane', function(loc)
|
||||
if DoesEntityExist(shrooms[loc]) then DeleteEntity(shrooms[loc]) end
|
||||
shrooms[loc] = nil
|
||||
end)
|
||||
|
||||
RegisterNetEvent('QBCore:Client:OnPlayerLoaded', function()
|
||||
Wait(3000)
|
||||
LoadModel('prop_stoneshroom1')
|
||||
TriggerEvent('shrooms:init')
|
||||
end)
|
||||
|
||||
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 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
|
||||
})
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
function EcstasyEffect()
|
||||
local startStamina = 30
|
||||
SetFlash(0, 0, 500, 7000, 500)
|
||||
local function EcstasyEffect()
|
||||
local startStamina = 50
|
||||
SetFlash(0, 0, 500, 20000, 500)
|
||||
while startStamina > 0 do
|
||||
Wait(1000)
|
||||
startStamina = startStamina - 1
|
||||
@@ -106,27 +15,17 @@ function EcstasyEffect()
|
||||
if IsPedRunning(PlayerPedId()) then
|
||||
SetPedToRagdoll(PlayerPedId(), math.random(1000, 3000), math.random(1000, 3000), 3, 0, 0, 0)
|
||||
end
|
||||
|
||||
startStamina = 0
|
||||
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)
|
||||
Bridge.Callback.Register("md-drugs:client:shrooms", function()
|
||||
if not progressbar(Bridge.Language.Locale('shrooms.eat'), 5000, {
|
||||
dict = 'mp_player_inteat@burger',
|
||||
clip = 'mp_player_int_eat_burger',
|
||||
flags = 49
|
||||
}) then return end
|
||||
CreateThread(function()
|
||||
EcstasyEffect()
|
||||
-- exports["qb-smallresources"]:DoAcid(240000)
|
||||
end, function() -- Cancel
|
||||
StopAnimTask(PlayerPedId(), "mp_suicide", "pill", 1.0)
|
||||
QBCore.Functions.Notify("Canceled", "error")
|
||||
end)
|
||||
end)
|
||||
return true
|
||||
end)
|
||||
@@ -1,706 +0,0 @@
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
|
||||
CreateThread(function()
|
||||
if Config.oxtarget then
|
||||
exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47
|
||||
coords = Config.makecokepowder,
|
||||
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",
|
||||
|
||||
},
|
||||
},
|
||||
})
|
||||
exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47
|
||||
coords = Config.cutcokeone,
|
||||
size = vec3(2,2,2),
|
||||
debugPoly = false,
|
||||
rotation = 45,
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:cutcokeone",
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "cut up",
|
||||
|
||||
},
|
||||
},
|
||||
})
|
||||
exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47
|
||||
coords = Config.bagcoke,
|
||||
size = vec3(2,2,2),
|
||||
debugPoly = false,
|
||||
rotation = 45,
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:bagcoke",
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "bagging",
|
||||
|
||||
},
|
||||
},
|
||||
})
|
||||
------------- 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.buylsdlabkit,
|
||||
size = vec3(2,2,2),
|
||||
debugPoly = false,
|
||||
rotation = 45,
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:buylabkit",
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "Buy A Kit",
|
||||
|
||||
},
|
||||
},
|
||||
})
|
||||
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",
|
||||
|
||||
},
|
||||
},
|
||||
})
|
||||
exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47
|
||||
coords = Config.buyheroinlabkit,
|
||||
size = vec3(2,2,2),
|
||||
debugPoly = false,
|
||||
rotation = 45,
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:buyheroinlabkit",
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "Buy A Kit",
|
||||
|
||||
},
|
||||
},
|
||||
})
|
||||
------- 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",
|
||||
|
||||
},
|
||||
},
|
||||
})
|
||||
------------ 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("makepowdercoke",Config.makecokepowder,1.5, 1.75, { -- 963.37, -2122.95, 31.47
|
||||
name = "makepowdercoke",
|
||||
heading = 11.0,
|
||||
debugPoly = false,
|
||||
minZ = Config.makecokepowder-2,
|
||||
maxZ = Config.makecokepowder+2,
|
||||
}, {
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:makepowder",
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "chop it up",
|
||||
|
||||
},
|
||||
},
|
||||
distance = 2.5
|
||||
})
|
||||
|
||||
exports['qb-target']:AddBoxZone("cutcokepowder",Config.cutcokeone,1.5, 1.75, { -- 963.37, -2122.95, 31.47
|
||||
name = "cutcokepowder",
|
||||
heading = 11.0,
|
||||
debugPoly = false,
|
||||
minZ = Config.cutcokeone-2,
|
||||
maxZ = Config.cutcokeone+2,
|
||||
}, {
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:cutcokeone",
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "cut up",
|
||||
|
||||
},
|
||||
},
|
||||
distance = 2.5
|
||||
})
|
||||
|
||||
exports['qb-target']:AddBoxZone("bagcokepowder",Config.bagcoke,1.5, 1.75, { -- 963.37, -2122.95, 31.47
|
||||
name = "bagcokepowder",
|
||||
heading = 11.0,
|
||||
debugPoly = false,
|
||||
minZ = Config.bagcoke-2,
|
||||
maxZ = Config.bagcoke+2,
|
||||
}, {
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:bagcoke",
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "bagging",
|
||||
|
||||
},
|
||||
},
|
||||
distance = 2.5
|
||||
})
|
||||
|
||||
|
||||
----- 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-2,
|
||||
maxZ = Config.lysergicacid+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-2,
|
||||
maxZ = Config.diethylamide+2,
|
||||
}, {
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:getdiethylamide",
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "stealing",
|
||||
},
|
||||
},
|
||||
distance = 2.5
|
||||
})
|
||||
|
||||
exports['qb-target']:AddBoxZone("buylabkit",Config.buylsdlabkit,1.5, 1.75, { -- 963.37, -2122.95, 31.47
|
||||
name = "buylabkit",
|
||||
heading = 156.0,
|
||||
debugPoly = false,
|
||||
minZ = Config.buylsdlabkit-2,
|
||||
maxZ = Config.buylsdlabkit+2,
|
||||
}, {
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:buylabkit",
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "Buy A Kit",
|
||||
|
||||
},
|
||||
},
|
||||
distance = 2.5
|
||||
})
|
||||
exports['qb-target']:AddBoxZone("buylabkit1",Config.gettabs,1.5, 1.75, { -- 963.37, -2122.95, 31.47
|
||||
name = "buylabkit1",
|
||||
heading = 156.0,
|
||||
debugPoly = false,
|
||||
minZ = Config.gettabs-2,
|
||||
maxZ = Config.gettabs+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-2,
|
||||
maxZ = Config.dryplant+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-2,
|
||||
maxZ = Config.cutheroinone+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-2,
|
||||
maxZ = Config.fillneedle+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("buyheroinlabkit",Config.buyheroinlabkit,1.5, 1.75, { -- 963.37, -2122.95, 31.47
|
||||
name = "buyheroinlabkit",
|
||||
heading = 156.0,
|
||||
debugPoly = false,
|
||||
minZ = Config.buyheroinlabkit-2,
|
||||
maxZ = Config.buyheroinlabkit+2,
|
||||
}, {
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:buyheroinlabkit",
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "Buy A Kit",
|
||||
|
||||
},
|
||||
},
|
||||
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-2,
|
||||
maxZ = Config.makecrack+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-2,
|
||||
maxZ = Config.bagcrack+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-2,
|
||||
maxZ = Config.FillPrescription+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-2,
|
||||
maxZ = Config.DryOut+2,
|
||||
}, {
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:drymescaline",
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "Dry Out",
|
||||
|
||||
},
|
||||
},
|
||||
distance = 2.5
|
||||
})
|
||||
--------------------------------------- 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-2,
|
||||
maxZ = Config.isosafrole+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-2,
|
||||
maxZ = Config.mdp2p+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-2,
|
||||
maxZ = Config.rawxtcloc+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-2,
|
||||
maxZ = Config.buypress+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-2,
|
||||
maxZ = Config.stamp+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
|
||||
end)
|
||||
@@ -1,29 +0,0 @@
|
||||
|
||||
CreateThread(function()
|
||||
local current = "g_m_y_famdnf_01"
|
||||
RequestModel(current)
|
||||
while not HasModelLoaded(current) do
|
||||
Wait(0)
|
||||
end
|
||||
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)
|
||||
exports['qb-target']:AddTargetEntity(travellingmerchant, {
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
label = "Travelling Merchant",
|
||||
icon = "fas fa-eye",
|
||||
event = "md-drugs:client:OpenMerchant"
|
||||
},
|
||||
},
|
||||
distance = 2.0
|
||||
})
|
||||
end)
|
||||
|
||||
RegisterNetEvent('md-drugs:client:OpenMerchant')
|
||||
AddEventHandler('md-drugs:client:OpenMerchant', function()
|
||||
TriggerServerEvent("inventory:server:OpenInventory", "shop", "travelling merchant", Config.Items)
|
||||
end)
|
||||
@@ -0,0 +1,239 @@
|
||||
if not Config.Drugs['weed'] then return end
|
||||
local exploded, drying = false, false
|
||||
local locations, recipes = Config.Weed.Locations, Config.Weed.Recipes
|
||||
for k, v in pairs (locations.WeedDry) do
|
||||
Bridge.Target.AddBoxZone('weed_dry'..k, v.loc, v.size, v.loc.w or 180.0, {
|
||||
{
|
||||
icon = Bridge.Language.Locale('weed.targetDryIcon'),
|
||||
label = Bridge.Language.Locale('weed.targetDry'),
|
||||
action = function()
|
||||
if not itemCheck("wetcannabis") then return end
|
||||
if drying then return end
|
||||
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)
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('weed.wait'), "success")
|
||||
Wait(math.random(1000,5000))
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('weed.take'), "success")
|
||||
Bridge.Target.AddLocalEntity(weedplant, {
|
||||
{
|
||||
icon = Bridge.Language.Locale('weed.targetDryIcon'),
|
||||
label = Bridge.Language.Locale('weed.targetDryed'),
|
||||
action = function()
|
||||
DeleteEntity(weedplant)
|
||||
drying = false
|
||||
TriggerServerEvent('md-drugs:server:dryoutweed', k)
|
||||
end,
|
||||
}
|
||||
})
|
||||
end,
|
||||
canInteract = function()
|
||||
if drying then return false end
|
||||
return true
|
||||
end
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = 'weed_dry'..k
|
||||
end
|
||||
|
||||
for k, v in pairs (locations.WeedTele) do
|
||||
Bridge.Target.AddBoxZone('weed_tele'..k, v.inside, v.size, v.rot or 180.0, {
|
||||
{
|
||||
icon = Bridge.Language.Locale('weed.teleportOutIcon'),
|
||||
label = Bridge.Language.Locale('weed.teleportOut'),
|
||||
action = function()
|
||||
SetEntityCoords(PlayerPedId(), v.outside)
|
||||
end
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = 'weed_tele'..k
|
||||
Bridge.Target.AddBoxZone('weed_teleout'..k, v.outside, v.size, v.rot or 180.0, {
|
||||
{
|
||||
icon = Bridge.Language.Locale('weed.teleportInIcon'),
|
||||
label = Bridge.Language.Locale('weed.teleportIn'),
|
||||
action = function()
|
||||
SetEntityCoords(PlayerPedId(), v.inside)
|
||||
end
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = 'weed_teleout'..k
|
||||
end
|
||||
|
||||
CreateThread(function()
|
||||
BikerWeedFarm = exports['bob74_ipl']:GetBikerWeedFarmObject()
|
||||
BikerWeedFarm.Style.Set(BikerWeedFarm.Style.upgrade)
|
||||
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)
|
||||
RefreshInterior(BikerWeedFarm.interiorId)
|
||||
end)
|
||||
|
||||
local function AlienEffect()
|
||||
StartScreenEffect("DrugsMichaelAliensFightIn", 3.0, 0)
|
||||
Wait(math.random(5000, 8000))
|
||||
StartScreenEffect("DrugsMichaelAliensFight", 3.0, 0)
|
||||
Wait(math.random(5000, 8000))
|
||||
StartScreenEffect("DrugsMichaelAliensFightOut", 3.0, 0)
|
||||
StopScreenEffect("DrugsMichaelAliensFightIn")
|
||||
StopScreenEffect("DrugsMichaelAliensFight")
|
||||
StopScreenEffect("DrugsMichaelAliensFightOut")
|
||||
end
|
||||
|
||||
RegisterNetEvent("md-drugs:client:dodabs", function()
|
||||
if not progressbar(Bridge.Language.Locale('weed.dabs'), 4000, 'bong2') then AlienEffect() return end
|
||||
end)
|
||||
|
||||
local function createBluntOptions(contextId, contextTitle, eventLabelPrefix, tableName)
|
||||
local options = {}
|
||||
|
||||
for k, v in pairs(recipes[tableName]) do
|
||||
local label = {}
|
||||
local item = ''
|
||||
for m, d in pairs(v.take) do table.insert(label, Bridge.Inventory.GetItemInfo(m).label .. ' X ' .. d .. ' \n ') end
|
||||
for m, d in pairs(v.give) do item = m end
|
||||
local itemData = Bridge.Inventory.GetItemInfo(item)
|
||||
options[#options + 1] = {
|
||||
icon = itemData.image,
|
||||
description = table.concat(label, " "),
|
||||
title = itemData.label,
|
||||
onSelect = function()
|
||||
if not minigame() then return end
|
||||
if not progressbar( Bridge.Language.Locale(eventLabelPrefix, itemData.label)) then return end
|
||||
TriggerServerEvent('md-drugs:server:RollBlunt', tableName, item)
|
||||
end
|
||||
}
|
||||
end
|
||||
Bridge.Menu.Open({
|
||||
id = contextId,
|
||||
title = contextTitle,
|
||||
options = options,
|
||||
})
|
||||
end
|
||||
|
||||
RegisterNetEvent('md-drugs:client:makeBluntWrap', function(data)
|
||||
createBluntOptions('mddrugsbluntwraps', "Dipping Syrup", 'weed.bluntWrap', 'bluntwrap')
|
||||
end)
|
||||
|
||||
RegisterNetEvent('md-drugs:client:rollBlunt', function(data)
|
||||
createBluntOptions('mddrugsblunts', "Roll Blunts", 'weed.rolling', 'blunts')
|
||||
end)
|
||||
|
||||
for k, v in pairs (locations.WeedSalesman) do
|
||||
requestModel(v.ped)
|
||||
local ped = CreatePed(4, v.ped, v.loc.x, v.loc.y, v.loc.z - 1.0, v.loc.w, false, true)
|
||||
FreezeEntityPosition(ped, true)
|
||||
SetEntityInvincible(ped, true)
|
||||
SetBlockingOfNonTemporaryEvents(ped, true)
|
||||
Bridge.Target.AddLocalEntity(ped, {
|
||||
{
|
||||
icon = Bridge.Language.Locale('weed.salesIcon'),
|
||||
label = Bridge.Language.Locale('weed.targetSales'),
|
||||
action = function()
|
||||
local options = {}
|
||||
for m, d in pairs (recipes.weedStore) do
|
||||
local itemInfo = Bridge.Inventory.GetItemInfo(m)
|
||||
options[#options + 1] = {
|
||||
icon = itemInfo.image,
|
||||
title = itemInfo.label,
|
||||
description = '$' .. d,
|
||||
onSelect = function()
|
||||
local input = Bridge.Input.Open(Bridge.Language.Locale('weed.salesHeader'),{
|
||||
{type = 'number', title = Bridge.Language.Locale('weed.salesDesc'), min = 1, max = 1000}
|
||||
})
|
||||
if not input and input[1] then return end
|
||||
if not progressbar(Bridge.Language.Locale('weed.buying', Bridge.Inventory.GetItemInfo(m).label)) then return end
|
||||
TriggerServerEvent('md-drugs:server:buyWeedItem', k, m, input[1])
|
||||
end
|
||||
}
|
||||
end
|
||||
Bridge.Menu.Open({
|
||||
id = 'weedDude',
|
||||
title = Bridge.Language.Locale('weed.salessHeader'),
|
||||
options = options,
|
||||
})
|
||||
end
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = ped
|
||||
end
|
||||
|
||||
local props = {}
|
||||
|
||||
for locationKey, locationData in pairs (locations.MakeButter) do
|
||||
if locationData.prop then
|
||||
requestModel(locationData.prop)
|
||||
props[#props+1] = CreateObject(locationData.prop, locationData.loc.x, locationData.loc.y, locationData.loc.z - 1.0, false, false, false)
|
||||
FreezeEntityPosition(props[#props], true)
|
||||
SetEntityHeading(props[#props], locationData.loc.w)
|
||||
Bridge.Target.AddLocalEntity(props[#props], {
|
||||
{
|
||||
icon = Bridge.Language.Locale('weed.cannabisIcon'),
|
||||
label = Bridge.Language.Locale('weed.targetMakeButter'),
|
||||
action = function()
|
||||
local options = {}
|
||||
for k, v in pairs (recipes.makeButter) do
|
||||
local itemInfo = Bridge.Inventory.GetItemInfo(k)
|
||||
local label = {}
|
||||
for m, d in pairs(v.recipe) do table.insert(label, Bridge.Inventory.GetItemInfo(m).label .. ' X ' .. d .. ' \n ') end
|
||||
options[#options + 1] = {
|
||||
icon = itemInfo.image,
|
||||
title = itemInfo.label,
|
||||
description = table.concat(label, " "),
|
||||
onSelect = function()
|
||||
if not progressbar(Bridge.Language.Locale('weed.making', itemInfo.label)) then return end
|
||||
TriggerServerEvent('md-drugs:server:MakeWeedItems', 'makeButter', k, locationKey)
|
||||
end
|
||||
}
|
||||
end
|
||||
Bridge.Menu.Open({
|
||||
id = 'weedMakeButter',
|
||||
title = Bridge.Language.Locale('weed.makeButter'),
|
||||
options = options,
|
||||
})
|
||||
end
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = props[#props]
|
||||
end
|
||||
end
|
||||
for locationKey, locationData in pairs (locations.MakeOil) do
|
||||
if locationData.prop then
|
||||
requestModel(locationData.prop)
|
||||
props[#props+1] = CreateObject(locationData.prop, locationData.loc.x, locationData.loc.y, locationData.loc.z - 1.0, false, false, false)
|
||||
FreezeEntityPosition(props[#props], true)
|
||||
SetEntityHeading(props[#props], locationData.loc.w)
|
||||
Bridge.Target.AddLocalEntity(props[#props], {
|
||||
{
|
||||
icon = Bridge.Language.Locale('weed.cannabisIcon'),
|
||||
label = Bridge.Language.Locale('weed.targetMakeOil'),
|
||||
action = function()
|
||||
local options = {}
|
||||
for k, v in pairs (recipes.makeOil) do
|
||||
local itemInfo = Bridge.Inventory.GetItemInfo(k)
|
||||
local label = {}
|
||||
for m, d in pairs(v.recipe) do table.insert(label, Bridge.Inventory.GetItemInfo(m).label .. ' X ' .. d .. ' \n ') end
|
||||
options[#options + 1] = {
|
||||
icon = itemInfo.image,
|
||||
title = itemInfo.label,
|
||||
description = table.concat(label, " "),
|
||||
onSelect = function()
|
||||
if not progressbar(Bridge.Language.Locale('weed.making', itemInfo.label)) then return end
|
||||
TriggerServerEvent('md-drugs:server:MakeWeedItems', 'makeOil', k, locationKey)
|
||||
end
|
||||
}
|
||||
end
|
||||
Bridge.Menu.Open({
|
||||
id = 'weedMakeOil',
|
||||
title = Bridge.Language.Locale('weed.makeOil'),
|
||||
options = options,
|
||||
})
|
||||
end
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = props[#props]
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,84 @@
|
||||
if not Config.Drugs['whippit'] then return end
|
||||
local prop = nil
|
||||
|
||||
local function animation(color)
|
||||
local coords = GetEntityCoords(PlayerPedId())
|
||||
Bridge.Anim.RequestDict('mp_player_intdrink')
|
||||
requestModel(color)
|
||||
prop = CreateObject(GetHashKey(color), coords.x, coords.y, coords.z, true, true, true)
|
||||
AttachEntityToEntity(prop, PlayerPedId(), GetPedBoneIndex(PlayerPedId(), 18905), 0.087000, -0.130001, 0.138999, 63.630001, 3.299881, -21.000000, true, true, false, true, 1, true)
|
||||
TaskPlayAnim(PlayerPedId(), 'mp_player_intdrink', 'loop_bottle', 8.0, -8.0, -1, 49, 0, false, false, false)
|
||||
if progressbar('Inhaling Nitrous', 5000, false) then
|
||||
ClearPedTasks(PlayerPedId())
|
||||
DetachEntity(prop, true, true)
|
||||
DeleteEntity(prop)
|
||||
prop = nil
|
||||
return true
|
||||
else
|
||||
ClearPedTasks(PlayerPedId())
|
||||
DetachEntity(prop, true, true)
|
||||
DeleteEntity(prop)
|
||||
prop = nil
|
||||
return false
|
||||
end
|
||||
end
|
||||
local function blur(duration)
|
||||
CreateThread(function()
|
||||
TriggerScreenblurFadeIn(1000)
|
||||
Wait(duration)
|
||||
TriggerScreenblurFadeOut(1000)
|
||||
end)
|
||||
end
|
||||
|
||||
Bridge.Callback.Register('md-drugs:client:useWhippit', function(color)
|
||||
if animation(color) then
|
||||
blur(30000)
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
end)
|
||||
|
||||
local function spawnShops()
|
||||
|
||||
for k, v in pairs(Config.Whippit.Locations.Whippit) do
|
||||
requestModel(v.ped)
|
||||
local ped = CreatePed(5, GetHashKey(v.ped), v.loc.x, v.loc.y, v.loc.z, v.loc.w, true, true)
|
||||
FreezeEntityPosition(ped, true)
|
||||
SetEntityInvincible(ped, true)
|
||||
SetBlockingOfNonTemporaryEvents(ped, true)
|
||||
Bridge.Target.AddLocalEntity(ped, {
|
||||
{
|
||||
label = Bridge.Language.Locale('Whippit.targetShop'),
|
||||
icon = Bridge.Language.Locale('Whippit.whippitIcon'),
|
||||
action = function()
|
||||
local menu = {}
|
||||
for item, price in pairs (Config.Whippit.Recipes.shop) do
|
||||
local itemInfo = Bridge.Inventory.GetItemInfo(item)
|
||||
menu[#menu + 1] = {
|
||||
title = itemInfo.label,
|
||||
icon = itemInfo.image,
|
||||
description = '$' .. price,
|
||||
onSelect = function()
|
||||
local amount = Bridge.Input.Open(itemInfo.label, {
|
||||
{type = 'number', label = 'Amount', name = 'amount', min = 1, max = 100, default = 1}
|
||||
})
|
||||
if amount and amount[1] then
|
||||
TriggerServerEvent('md-drugs:server:buyWhippitItem', k, item, amount[1])
|
||||
end
|
||||
end
|
||||
}
|
||||
end
|
||||
Bridge.Menu.Open({
|
||||
id = 'whippitShop',
|
||||
title = Bridge.Language.Locale('Whippit.shopHeader'),
|
||||
options = menu
|
||||
})
|
||||
end
|
||||
},
|
||||
})
|
||||
targets[#targets+1] = ped
|
||||
end
|
||||
end
|
||||
|
||||
spawnShops()
|
||||
@@ -1,583 +1,95 @@
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
if not Config.Drugs['wholesale'] then return end
|
||||
local active, ped, peds = false, nil, {}
|
||||
|
||||
local deliveryBlip = nil
|
||||
local PZone = nil
|
||||
local listen = false
|
||||
RegisterNetEvent("md-drugs:client:getloccoke")
|
||||
AddEventHandler("md-drugs:client:getloccoke", function()
|
||||
local unlucky = math.random(1,100)
|
||||
local CurrentLocation = vector3(642.18, 641.48, 129.11)
|
||||
local unluck = math.random(1,100)
|
||||
if deliveryBlip ~= nil then
|
||||
RemoveBlip(deliveryBlip)
|
||||
end
|
||||
if unlucky <= 90 then
|
||||
if Config.cd then
|
||||
TriggerServerEvent('cd_dispatch:AddNotification', {
|
||||
job_table = {'police'},
|
||||
coords = CurrentLocation,
|
||||
title = 'Oxy Run',
|
||||
message = 'this id from cd',
|
||||
flash = 0,
|
||||
unique_id = tostring(math.random(0000000,9999999)),
|
||||
blip = {
|
||||
sprite = 825,
|
||||
scale = 1.2,
|
||||
colour = 1,
|
||||
flashes = false,
|
||||
text = 'Anon Tip',
|
||||
time = (5*60*1000),
|
||||
sound = 1,
|
||||
}
|
||||
})
|
||||
elseif Config.ps then
|
||||
local currentPos = CurrentLocation
|
||||
TriggerServerEvent("dispatch:server:notify", {
|
||||
dispatchcodename = "susactivity", -- has to match the codes in sv_dispatchcodes.lua so that it generates the right blip
|
||||
dispatchCode = "10-66",
|
||||
origin = {
|
||||
x = currentPos.x,
|
||||
y = currentPos.y,
|
||||
z = currentPos.z
|
||||
},
|
||||
dispatchMessage = "Oxy Runs",
|
||||
job = {"LEO", "police"} -- has to match the recipientList in sv_dispatchcodes.lua
|
||||
})
|
||||
local function loop(wholesaleData)
|
||||
local timeout = 600 -- 10 minutes
|
||||
while active do
|
||||
Wait(1000)
|
||||
local dist = #(GetEntityCoords(PlayerPedId()) - vector3(wholesaleData.location.x, wholesaleData.location.y, wholesaleData.location.z))
|
||||
if dist < 100.0 then
|
||||
if IsEntityDead(PlayerPedId()) then
|
||||
active = false
|
||||
Bridge.Point.Remove('md-drugs:wholesaleZone'..Bridge.Framework.GetPlayerIdentifier())
|
||||
TriggerServerEvent('md-drugs:server:getkilledFuckingNoob')
|
||||
for k, v in pairs (peds) do
|
||||
DeleteEntity(v)
|
||||
end
|
||||
peds = {}
|
||||
break
|
||||
end
|
||||
end
|
||||
timeout = timeout - 1
|
||||
if timeout <= 0 then
|
||||
break
|
||||
end
|
||||
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)
|
||||
if Config.Gks then
|
||||
TriggerServerEvent('gksphone:NewMail', {
|
||||
sender = 'Anon',
|
||||
image = '/html/static/img/icons/mail.png',
|
||||
subject = "Meet Me At The Marked location",
|
||||
message = 'Bring me 100 bags of crack. If You Bring Police. You are dead.'
|
||||
})
|
||||
else
|
||||
TriggerServerEvent('qb-phone:server:sendNewMail', {
|
||||
sender = 'Anonymous',
|
||||
subject = 'Meet Me At The Marked Location',
|
||||
message = 'Bring me 100 bags of crack. If You Bring Police. You are dead',
|
||||
end
|
||||
|
||||
function SetUpPeds(attackerCount, location)
|
||||
local models = {"g_m_y_ballasout_01", "g_m_y_famdnf_01", "g_m_y_famca_01", "g_m_y_mexgoon_01", "g_m_y_salvagoon_01"}
|
||||
for i = 1, attackerCount do
|
||||
local angle = (360 / attackerCount) * i
|
||||
local x = location.x + math.cos(math.rad(angle)) * 15
|
||||
local y = location.y + math.sin(math.rad(angle)) * 15
|
||||
local z = location.z
|
||||
local modelHash = GetHashKey(models[math.random(1, #models)])
|
||||
requestModel(modelHash)
|
||||
peds[#peds+1] = CreatePed(4, modelHash, x, y, z, 0.0, true, true)
|
||||
local weapon = math.random(1, 2) == 1 and "WEAPON_PISTOL" or "WEAPON_BAT"
|
||||
SetPedRelationshipGroupHash(peds[#peds], GetHashKey("HATES_PLAYER"))
|
||||
SetPedCombatAttributes(peds[#peds], 46, true)
|
||||
SetPedCombatAttributes(peds[#peds], 0, true)
|
||||
SetPedCombatAttributes(peds[#peds], 5, true)
|
||||
SetPedCombatAttributes(peds[#peds], 2, true)
|
||||
GiveWeaponToPed(peds[#peds], GetHashKey(weapon), 500, false, true)
|
||||
TaskCombatPed(peds[#peds], PlayerPedId(), 0, 16)
|
||||
end
|
||||
end
|
||||
|
||||
RegisterNetEvent("md-drugs:client:GetLocation", function(wholesaleData)
|
||||
if active then return end
|
||||
if not wholesaleData then return end
|
||||
active = true
|
||||
SetNewWaypoint(wholesaleData.location.x, wholesaleData.location.y)
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('wholesale.go_location'), 'success')
|
||||
Bridge.Point.Register(
|
||||
'md-drugs:wholesaleZone'..Bridge.Framework.GetPlayerIdentifier(),
|
||||
vector3(wholesaleData.location.x, wholesaleData.location.y, wholesaleData.location.z),
|
||||
50.0,
|
||||
nil,
|
||||
function(point, data)
|
||||
if wholesaleData.ambush then
|
||||
SetUpPeds(wholesaleData.attackerCount, wholesaleData.location)
|
||||
loop(wholesaleData)
|
||||
end
|
||||
requestModel(GetHashKey("s_m_m_ammucountry"))
|
||||
ped = CreatePed(4, GetHashKey("s_m_m_ammucountry"), wholesaleData.location.x, wholesaleData.location.y, wholesaleData.location.z, wholesaleData.location.w, false, true)
|
||||
FreezeEntityPosition(ped, true)
|
||||
TaskStartScenarioInPlace(ped, "WORLD_HUMAN_STAND_IMPATIENT", 0, true)
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('wholesale.meet_dealer'), 'info')
|
||||
Bridge.Target.AddLocalEntity(ped, {
|
||||
{
|
||||
label = Bridge.Language.Locale('wholesale.sell_drugs'),
|
||||
icon = Bridge.Language.Locale('wholesale.sell_drugs_icon'),
|
||||
action = function()
|
||||
if not progressbar(Bridge.Language.Locale('wholesale.selling_drugs'), 15000) then return end
|
||||
TriggerServerEvent('md-drugs:server:SuccessSale')
|
||||
DeleteEntity(ped)
|
||||
active = false
|
||||
Bridge.Point.Remove('md-drugs:wholesaleZone'.. Bridge.Framework.GetPlayerIdentifier())
|
||||
end
|
||||
}
|
||||
})
|
||||
end
|
||||
local current = "g_m_y_famdnf_01"
|
||||
RequestModel(current)
|
||||
while not HasModelLoaded(current) do
|
||||
Wait(0)
|
||||
end
|
||||
|
||||
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",
|
||||
event = "md-drugs:client:wholesaledrugscoke"
|
||||
},
|
||||
},
|
||||
distance = 2.0
|
||||
})
|
||||
|
||||
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:wholesaledrugscoke")
|
||||
AddEventHandler("md-drugs:client:wholesaledrugscoke", function()
|
||||
local luck = math.random(1,1000)
|
||||
|
||||
if luck <= 900 then
|
||||
TriggerEvent("md-drugs:client:successsalecoke")
|
||||
else
|
||||
|
||||
TriggerEvent("md-drugs:client:setupcoke")
|
||||
Wait(3000)
|
||||
for i = 1, #Config.Cokepeds do
|
||||
CokePed = CreatePed(4, "g_m_y_famdnf_01", Config.Cokepeds[i].x, Config.Cokepeds[i].y, Config.Cokepeds[i].z, 90.0, true, true)
|
||||
SetPedArmour(CokePed, 200)
|
||||
SetPedCanSwitchWeapon(CokePed, true)
|
||||
GiveWeaponToPed(CokePed, "weapon_pistol", 1, false, true)
|
||||
TaskCombatPed(CokePed, PlayerPedId(), 0, 16)
|
||||
SetPedCombatAttributes(CokePed, 46, true)
|
||||
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
RegisterNetEvent("md-drugs:client:successsalecoke")
|
||||
AddEventHandler("md-drugs:client:successsalecoke", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
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())
|
||||
targets[#targets+1] = ped
|
||||
end,
|
||||
function(point, data)
|
||||
Bridge.Point.Remove('md-drugs:wholesaleZone'.. Bridge.Framework.GetPlayerIdentifier())
|
||||
return data
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:setupcoke")
|
||||
AddEventHandler("md-drugs:client:setupcoke", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
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)
|
||||
----------crack
|
||||
RegisterNetEvent("md-drugs:client:getloccrack")
|
||||
AddEventHandler("md-drugs:client:getloccrack", function()
|
||||
local unlucky = math.random(1,100)
|
||||
local CurrentLocation = vector3(1872.35, 283.52, 164.27)
|
||||
local unluck = math.random(1,100)
|
||||
if deliveryBlip ~= nil then
|
||||
RemoveBlip(deliveryBlip)
|
||||
end
|
||||
if unlucky <= 90 then
|
||||
if Config.cd then
|
||||
TriggerServerEvent('cd_dispatch:AddNotification', {
|
||||
job_table = {'police'},
|
||||
coords = CurrentLocation,
|
||||
title = 'anonymous tip',
|
||||
message = 'this id from cd',
|
||||
flash = 0,
|
||||
unique_id = tostring(math.random(0000000,9999999)),
|
||||
blip = {
|
||||
sprite = 825,
|
||||
scale = 1.2,
|
||||
colour = 1,
|
||||
flashes = false,
|
||||
text = 'Anon Tip',
|
||||
time = (5*60*1000),
|
||||
sound = 1,
|
||||
}
|
||||
})
|
||||
elseif Config.ps then
|
||||
local currentPos = CurrentLocation
|
||||
TriggerServerEvent("dispatch:server:notify", {
|
||||
dispatchcodename = "susactivity", -- has to match the codes in sv_dispatchcodes.lua so that it generates the right blip
|
||||
dispatchCode = "10-66",
|
||||
origin = {
|
||||
x = currentPos.x,
|
||||
y = currentPos.y,
|
||||
z = currentPos.z
|
||||
},
|
||||
dispatchMessage = "Suspicious Activity",
|
||||
job = {"LEO", "police"} -- has to match the recipientList in sv_dispatchcodes.lua
|
||||
})
|
||||
end
|
||||
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)
|
||||
if Config.Gks then
|
||||
TriggerServerEvent('gksphone:NewMail', {
|
||||
sender = 'Anon',
|
||||
image = '/html/static/img/icons/mail.png',
|
||||
subject = "Meet Me At The Marked location",
|
||||
message = 'Bring me 100 bags of crack. If You Bring Police. You are dead.'
|
||||
})
|
||||
else
|
||||
TriggerServerEvent('qb-phone:server:sendNewMail', {
|
||||
sender = 'Anonymous',
|
||||
subject = 'Meet Me At The Marked Location',
|
||||
message = 'Bring me 100 bags of crack. If You Bring Police. You are dead',
|
||||
})
|
||||
end
|
||||
local current = "g_m_y_famca_01"
|
||||
RequestModel(current)
|
||||
while not HasModelLoaded(current) do
|
||||
Wait(0)
|
||||
end
|
||||
|
||||
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",
|
||||
event = "md-drugs:client:wholesaledrugscrack"
|
||||
},
|
||||
},
|
||||
distance = 2.0
|
||||
})
|
||||
|
||||
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:wholesaledrugscrack")
|
||||
AddEventHandler("md-drugs:client:wholesaledrugscrack", function()
|
||||
local luck = math.random(1,1000)
|
||||
|
||||
if luck <= 900 then
|
||||
TriggerEvent("md-drugs:client:successsalecrack")
|
||||
else
|
||||
|
||||
TriggerEvent("md-drugs:client:setupcrack")
|
||||
for i = 1, #Config.CrackPeds do
|
||||
CrackPed = CreatePed(4, "g_m_y_famdnf_01", Config.CrackPeds[i].x, Config.CrackPeds[i].y, Config.CrackPeds[i].z, 90.0, true, true)
|
||||
SetPedArmour(CrackPed, 200)
|
||||
SetPedCanSwitchWeapon(CrackPed, true)
|
||||
GiveWeaponToPed(CrackPed, "weapon_pistol", 1, false, true)
|
||||
TaskCombatPed(CrackPed, PlayerPedId(), 0, 16)
|
||||
SetPedCombatAttributes(CrackPed, 46, true)
|
||||
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
RegisterNetEvent("md-drugs:client:successsalecrack")
|
||||
AddEventHandler("md-drugs:client:successsalecrack", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
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()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
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 = vector3(2729.87, 1372.7, 24.52)
|
||||
local unluck = math.random(1,100)
|
||||
if deliveryBlip ~= nil then
|
||||
RemoveBlip(deliveryBlip)
|
||||
end
|
||||
if unlucky <= 90 then
|
||||
if Config.cd then
|
||||
TriggerServerEvent('cd_dispatch:AddNotification', {
|
||||
job_table = {'police'},
|
||||
coords = CurrentLocation,
|
||||
title = 'anonymous tip',
|
||||
message = 'this id from cd',
|
||||
flash = 0,
|
||||
unique_id = tostring(math.random(0000000,9999999)),
|
||||
blip = {
|
||||
sprite = 825,
|
||||
scale = 1.2,
|
||||
colour = 1,
|
||||
flashes = false,
|
||||
text = 'Anon Tip',
|
||||
time = (5*60*1000),
|
||||
sound = 1,
|
||||
}
|
||||
})
|
||||
elseif Config.ps then
|
||||
local currentPos = CurrentLocation
|
||||
TriggerServerEvent("dispatch:server:notify", {
|
||||
dispatchcodename = "susactivity", -- has to match the codes in sv_dispatchcodes.lua so that it generates the right blip
|
||||
dispatchCode = "10-66",
|
||||
origin = {
|
||||
x = currentPos.x,
|
||||
y = currentPos.y,
|
||||
z = currentPos.z
|
||||
},
|
||||
dispatchMessage = "Suspicious Activity",
|
||||
job = {"LEO", "police"} -- has to match the recipientList in sv_dispatchcodes.lua
|
||||
})
|
||||
end
|
||||
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)
|
||||
TriggerServerEvent('gksphone:NewMail', {
|
||||
sender = 'Anon',
|
||||
image = '/html/static/img/icons/mail.png',
|
||||
subject = "Meet Me At The Marked location",
|
||||
message = 'Bring me 100 syringes of heroin. If You Bring Police. You are dead.'
|
||||
})
|
||||
local current = "g_m_y_famdnf_01"
|
||||
RequestModel(current)
|
||||
while not HasModelLoaded(current) do
|
||||
Wait(0)
|
||||
end
|
||||
|
||||
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",
|
||||
event = "md-drugs:client:wholesaledrugsheroin"
|
||||
},
|
||||
},
|
||||
distance = 2.0
|
||||
})
|
||||
|
||||
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:wholesaledrugsheroin")
|
||||
AddEventHandler("md-drugs:client:wholesaledrugsheroin", function()
|
||||
local luck = math.random(1,1000)
|
||||
|
||||
if luck <= 900 then
|
||||
TriggerEvent("md-drugs:client:successsaleheroin")
|
||||
else
|
||||
|
||||
TriggerEvent("md-drugs:client:setupheroin")
|
||||
Wait(3000)
|
||||
for i = 1, #Config.heroinPeds do
|
||||
heroinPed = CreatePed(4, "g_m_y_famdnf_01", Config.heroinPeds[i].x, Config.heroinPeds[i].y, Config.heroinPeds[i].z, 90.0, true, true)
|
||||
SetPedArmour(heroinPed, 200)
|
||||
SetPedCanSwitchWeapon(heroinPed, true)
|
||||
GiveWeaponToPed(heroinPed, "weapon_pistol", 1, false, true)
|
||||
TaskCombatPed(heroinPed, PlayerPedId(), 0, 16)
|
||||
SetPedCombatAttributes(heroinPed, 46, true)
|
||||
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
RegisterNetEvent("md-drugs:client:successsaleheroin")
|
||||
AddEventHandler("md-drugs:client:successsaleheroin", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
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")
|
||||
Citizen.Wait(4000)
|
||||
|
||||
DeleteEntity(drugdealer)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:setupheroin")
|
||||
AddEventHandler("md-drugs:client:setupheroin", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
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)
|
||||
--------------------------- lsd
|
||||
RegisterNetEvent("md-drugs:client:getloclsd")
|
||||
AddEventHandler("md-drugs:client:getloclsd", function()
|
||||
local unlucky = math.random(1,100)
|
||||
local CurrentLocation = vector3(-1533.66, 837.38, 181.59)
|
||||
local unlucky = math.random(1,100)
|
||||
if deliveryBlip ~= nil then
|
||||
RemoveBlip(deliveryBlip)
|
||||
end
|
||||
if unlucky <= 90 then
|
||||
if Config.cd then
|
||||
TriggerServerEvent('cd_dispatch:AddNotification', {
|
||||
job_table = {'police'},
|
||||
coords = CurrentLocation,
|
||||
title = 'anonymous tip',
|
||||
message = 'this id from cd',
|
||||
flash = 0,
|
||||
unique_id = tostring(math.random(0000000,9999999)),
|
||||
blip = {
|
||||
sprite = 825,
|
||||
scale = 1.2,
|
||||
colour = 1,
|
||||
flashes = false,
|
||||
text = 'Anon Tip',
|
||||
time = (5*60*1000),
|
||||
sound = 1,
|
||||
}
|
||||
})
|
||||
elseif Config.ps then
|
||||
local currentPos = CurrentLocation
|
||||
TriggerServerEvent("dispatch:server:notify", {
|
||||
dispatchcodename = "susactivity", -- has to match the codes in sv_dispatchcodes.lua so that it generates the right blip
|
||||
dispatchCode = "10-66",
|
||||
origin = {
|
||||
x = currentPos.x,
|
||||
y = currentPos.y,
|
||||
z = currentPos.z
|
||||
},
|
||||
dispatchMessage = "Suspicious Activity",
|
||||
job = {"LEO", "police"} -- has to match the recipientList in sv_dispatchcodes.lua
|
||||
})
|
||||
end
|
||||
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)
|
||||
TriggerServerEvent('gksphone:NewMail', {
|
||||
sender = 'Anon',
|
||||
image = '/html/static/img/icons/mail.png',
|
||||
subject = "Meet Me At The Marked location",
|
||||
message = 'Bring me 500 tabs of lsd. If You Bring Police. You are dead.'
|
||||
})
|
||||
local current = "g_m_y_famdnf_01"
|
||||
RequestModel(current)
|
||||
while not HasModelLoaded(current) do
|
||||
Wait(0)
|
||||
end
|
||||
|
||||
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",
|
||||
event = "md-drugs:client:wholesaledrugslsd"
|
||||
},
|
||||
},
|
||||
distance = 2.0
|
||||
})
|
||||
|
||||
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:wholesaledrugslsd")
|
||||
AddEventHandler("md-drugs:client:wholesaledrugslsd", function()
|
||||
local luck = math.random(1,1000)
|
||||
|
||||
if luck <= 900 then
|
||||
TriggerEvent("md-drugs:client:successsalelsd")
|
||||
else
|
||||
|
||||
TriggerEvent("md-drugs:client:setuplsd")
|
||||
for i = 1, #Config.lsdPeds do
|
||||
Wait(3000)
|
||||
lsdPed = CreatePed(4, "g_m_y_famdnf_01", Config.lsdPeds[i].x, Config.lsdPeds[i].y, Config.lsdPeds[i].z, 90.0, true, true)
|
||||
SetPedArmour(lsdPed, 200)
|
||||
SetPedCanSwitchWeapon(lsdPed, true)
|
||||
GiveWeaponToPed(lsdPed, "weapon_pistol", 1, false, true)
|
||||
TaskCombatPed(lsdPed, PlayerPedId(), 0, 16)
|
||||
SetPedCombatAttributes(lsdPed, 46, true)
|
||||
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
RegisterNetEvent("md-drugs:client:successsalelsd")
|
||||
AddEventHandler("md-drugs:client:successsalelsd", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
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")
|
||||
Citizen.Wait(4000)
|
||||
|
||||
DeleteEntity(drugdealer)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:setuplsd")
|
||||
AddEventHandler("md-drugs:client:setuplsd", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
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)
|
||||
RegisterNetEvent('md-drugs:client:MarkLocation', function(data)
|
||||
SetNewWaypoint(data.x, data.y)
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('wholesale.go_location'), 'success')
|
||||
end)
|
||||
@@ -1,629 +0,0 @@
|
||||
Config = {} --Ignore.
|
||||
|
||||
Config.UseTarget = true
|
||||
Config.rewardItem = "coca_leaf"
|
||||
Config.rewardItemheroin = "poppyresin"
|
||||
Config.rewardshrooms = "shrooms"
|
||||
Config.rewardMescaline = "cactusbulb"
|
||||
Config.oxtarget = false --- turn to true if you use oxtarget
|
||||
Config.respawnTime = 150 -- Seconds
|
||||
Config.cd = false ---- if you use cd-dispatch
|
||||
Config.ps = false --- if you use ps dispatch
|
||||
Config.gks = true -- true if you use gks, false if you use qb or renewed phone
|
||||
Config.Fuel = "LegacyFuel" -- type the name of script you use i.e. ps-fuel, cdn-fuel, LegacyFuel
|
||||
|
||||
------------- Cocaine locations
|
||||
Config.makecokepowder = vector3(-1365.47, -323.64, 39.41) -- where to take coca leaves to make powder
|
||||
Config.cutcokeone = vector3(-1362.8, -322.13, 39.49) -- cutting stage coke with baking soda
|
||||
Config.bagcoke = vector3(-1364.8, -320.26, 39.51) -- bag stage
|
||||
|
||||
---------------- Crack locations
|
||||
Config.makecrack = vector3(-1366.22, -317.84, 39.55) -- make crack with baking soda with cut coke 1-3
|
||||
Config.bagcrack = vector3(-1367.28, -315.88, 39.59) --- bag crack 1-3 stages
|
||||
|
||||
------------------------- LSD Locations
|
||||
Config.lysergicacid = vector3(-1370.71, -317.3, 39.51) -- get lysergic acid
|
||||
Config.diethylamide = vector3(-1371.71, -316.02, 39.53) -- get diethylamide
|
||||
Config.gettabs = vector3(-1370.77, -314.51, 39.58) -- buy tab paper
|
||||
Config.buylsdlabkit = vector3(-1369.26, -312.04, 39.66)-- buy lab kit
|
||||
|
||||
------------------------- Heroin Locations
|
||||
Config.dryplant = vector3(-1367.05, -311.07, 39.72) -- turn resin into powder
|
||||
Config.buyheroinlabkit = vector3(-1368.19, -309.84, 39.73) -- buy heroin lab kit
|
||||
Config.cutheroinone = vector3(-1368.87, -308.96, 39.75) -- cut heroin stage 1-3 with baking soda
|
||||
Config.fillneedle = vector3(-1373.13, -311.36, 39.63) -- fill needles with heroin
|
||||
|
||||
------------ XTC
|
||||
Config.isosafrole = vector3(892.7, -957.2, 39.28) -- where to steal isosafrole
|
||||
Config.mdp2p = vector3(901.07, -963.11, 39.28) -- where to steal mdp2p
|
||||
Config.rawxtcloc = vector3(898.51, -960.2, 39.28) -- where to combine the 2 ingridents to make raw xtc
|
||||
Config.stamp = vector3(895.98, -963.57, 39.28) -- where to stamp pills
|
||||
Config.buypress = vector3(868.3, -960.72, 26.28)-- Where you buy your presses
|
||||
|
||||
----- mescaline
|
||||
Config.DryOut = vector3(2622.6, 4222.57, 43.6) -- Place to dry out mescaline into usuable drug
|
||||
Config.Badtrip = 20 -- number means % chance to spawn a clone that chases and attacks while on mescaline
|
||||
|
||||
---------- Pharma
|
||||
Config.FillPrescription = vector3(2432.43, 4253, 45.2) ----------- this is where you want people to take their prescription to get a bottle of pills. They use bottle to get a random amount of prescription pills
|
||||
------- travelling merchant
|
||||
|
||||
Config.Travellingmerchant = { ------------ these are the random locations the merchant can spawn on script start. whatever you want for the merchant is in Config.Items right below
|
||||
vector4(-119.06, -977.19, 304.25, 103.88),
|
||||
vector4(-1522.23, 1475.63, 112.02, 23.57),
|
||||
vector4(-3278.99, 973.33, 5.34, 90.02),
|
||||
}
|
||||
Config.Items = { --- this is the store for the travelling merchant
|
||||
label = "Travelling Merchant",
|
||||
slots = 13,
|
||||
items = {
|
||||
[1] = {name = "tab_paper", price = 50,amount = 50, info = {}, type = "item", slot = 1},
|
||||
[2] = {name = "bakingsoda", price = 25, amount = 50, info = {}, type = "item", slot = 2},
|
||||
[3] = {name = "isosafrole", price = 25, amount = 50, info = {}, type = "item", slot = 3},
|
||||
[4] = {name = "mdp2p", price = 25, amount = 50, info = {}, slot = 4},
|
||||
[5] = {name = "lysergic_acid", price = 25, amount = 50, info = {}, type = "item", slot = 5},
|
||||
[6] = {name = "diethylamide", price = 25, amount = 50, info = {}, type = "item", slot = 6},
|
||||
[7] = {name = "empty_weed_bag", price = 2, amount = 1000, info = {}, type = "item", slot = 7},
|
||||
[8] = {name = "emptyvial", price = 2, amount = 1000, info = {}, type = "item", slot = 8},
|
||||
[9] = {name = "needle", price = 2, amount = 1000, info = {}, type = "item", slot = 9},
|
||||
[10] = {name = "cokeburner", price = 25, amount = 50, info = {}, type = "item", slot = 10},
|
||||
[11] = {name = "crackburner", price = 2, amount = 50, info = {}, type = "item", slot = 11},
|
||||
[12] = {name = "lsdburner", price = 2, amount = 50, info = {}, type = "item", slot = 12},
|
||||
[13] = {name = "heroinburner", price = 2, amount = 50, info = {}, type = "item", slot = 13},
|
||||
}
|
||||
}
|
||||
--------------------------------------- oxy runs
|
||||
---- How oxyruns work. You pay for a truck, you get in it and it gives a route. There is a 20% chance that the car will be "hot" and you have to ditch it. No Routes will spawn if that pops up
|
||||
----- when you get to the drop off point third eye the truck. You will carry a box to the ped. He will give you cash, some oxy and maybe a random item. Rinse and repeat
|
||||
Config.truckspawn = vector4(1449.65, -1486.0, 63.22, 342.58) --- where the truck will spawn when you pay for it
|
||||
Config.Payfortruck = vector3(1437.64, -1491.91, 63.62) --- where you pay for the truck
|
||||
|
||||
Config.oxylocations = { -- These are different locations where a ped spawns.
|
||||
vector4(-2352.32, 266.78, 165.3, 23.46),
|
||||
vector4(-1467.49, 874.01, 183.59, 298.45),
|
||||
vector4(-856.71, 874.26, 202.85, 205.3),
|
||||
vector4(950.58, -128.49, 74.42, 205.3),
|
||||
vector4(1152.71, -328.43, 69.21, 205.3),
|
||||
vector4(112.66, -1955.67, 20.75, 37.94),
|
||||
vector4(-544.4, -1684.8, 19.89, 252.07),
|
||||
vector4(-1185.02, -1805.4, 3.91, 184.83),
|
||||
vector4(-1641.4, -981.99, 7.58, 35.38),
|
||||
vector4(-1827.93, 782.36, 138.29, 219.99),
|
||||
vector4(-320.84, 2818.73, 59.45, 337.22),
|
||||
vector4(474.88, 2609.56, 44.48, 357.0),
|
||||
}
|
||||
|
||||
Config.OxyRandItems = { -- random items you get for completing the mission
|
||||
"oxy",
|
||||
"lockpick",
|
||||
"cryptostick",
|
||||
}
|
||||
Config.PoliceAlertOxy = 90 -- This is a % out of 100 to alert police
|
||||
------------------------ Drug Picking locations.
|
||||
Config.CocaPlant = {
|
||||
[1] = {
|
||||
location = vector3(1474.25, -2643.87, 42.88),
|
||||
heading = 334.49,
|
||||
model = "prop_plant_01a"
|
||||
},
|
||||
[2] = {
|
||||
location = vector3(1472.35, -2649.3, 41.87),
|
||||
heading = 329.56,
|
||||
model = "prop_plant_01a"
|
||||
},
|
||||
[3] = {
|
||||
location = vector3(1475.7, -2652.9, 40.8),
|
||||
heading = 25.16,
|
||||
model = "prop_plant_01a"
|
||||
},
|
||||
[4] = {
|
||||
location = vector3(1481.0, -2654.99, 39.86),
|
||||
heading = 21.52,
|
||||
model = "prop_plant_01a"
|
||||
},
|
||||
[5] = {
|
||||
location = vector3(1480.9, -2660.63, 38.68),
|
||||
heading = 202.97,
|
||||
model = "prop_plant_01a"
|
||||
},
|
||||
[6] = {
|
||||
location = vector3(1477.18, -2666.53, 38.19),
|
||||
heading = 202.97,
|
||||
model = "prop_plant_01a"
|
||||
},
|
||||
[7] = {
|
||||
location = vector3(1477.58, -2670.82, 37.73),
|
||||
heading = 202.97,
|
||||
model = "prop_plant_01a"
|
||||
},
|
||||
[8] = {
|
||||
location = vector3(1476.56, -2675.82, 37.46),
|
||||
heading = 202.97,
|
||||
model = "prop_plant_01a"
|
||||
},
|
||||
[9] = {
|
||||
location = vector3(1474.8, -2680.19, 37.03),
|
||||
heading = 202.97,
|
||||
model = "prop_plant_01a"
|
||||
},
|
||||
[10] = {
|
||||
location = vector3(1471.52, -2685.0, 36.82),
|
||||
heading = 202.97,
|
||||
model = "prop_plant_01a"
|
||||
},
|
||||
[11] = {
|
||||
location = vector3(1462.82, -2676.58, 38.83),
|
||||
heading = 202.97,
|
||||
model = "prop_plant_01a"
|
||||
},
|
||||
[12] = {
|
||||
location = vector3(1461.31, -2667.74, 39.67),
|
||||
heading = 202.97,
|
||||
model = "prop_plant_01a"
|
||||
},
|
||||
[13] = {
|
||||
location = vector3(1456.3, -2647.61, 43.39),
|
||||
heading = 202.97,
|
||||
model = "prop_plant_01a"
|
||||
},
|
||||
[14] = {
|
||||
location = vector3(1453.65, -2641.56, 45.0),
|
||||
heading = 202.97,
|
||||
model = "prop_plant_01a"
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Config.PoppyPlants = {
|
||||
[1] = {
|
||||
location = vector3(-2251.3, -99.18, 100.11),
|
||||
heading = 334.49,
|
||||
model = "prop_plant_01b"
|
||||
},
|
||||
[2] = {
|
||||
location = vector3(-2249.63, -92.97, 101.8),
|
||||
heading = 329.56,
|
||||
model = "prop_plant_01b"
|
||||
},
|
||||
[3] = {
|
||||
location = vector3(-2245.57, -85.12, 104.5),
|
||||
heading = 25.16,
|
||||
model = "prop_plant_01b"
|
||||
},
|
||||
[4] = {
|
||||
location = vector3(-2240.81, -88.48, 105.88),
|
||||
heading = 21.52,
|
||||
model = "prop_plant_01b"
|
||||
},
|
||||
[5] = {
|
||||
location = vector3(-2240.87, -93.36, 103.88),
|
||||
heading = 334.49,
|
||||
model = "prop_plant_01b"
|
||||
},
|
||||
[6] = {
|
||||
location = vector3(-2236.0, -95.34, 102.55),
|
||||
heading = 329.56,
|
||||
model = "prop_plant_01b"
|
||||
},
|
||||
[7] = {
|
||||
location = vector3(-2240.6, -100.01, 100.49),
|
||||
heading = 25.16,
|
||||
model = "prop_plant_01b"
|
||||
},
|
||||
[8] = {
|
||||
location = vector3(-2246.29, -104.92, 99.27),
|
||||
heading = 21.52,
|
||||
model = "prop_plant_01b"
|
||||
},
|
||||
[9] = {
|
||||
location = vector3(-2243.64, -107.99, 96.71),
|
||||
heading = 334.49,
|
||||
model = "prop_plant_01b"
|
||||
},
|
||||
[10] = {
|
||||
location = vector3(-2254.22, -108.76, 97.25),
|
||||
heading = 329.56,
|
||||
model = "prop_plant_01b"
|
||||
},
|
||||
[11] = {
|
||||
location = vector3(-2247.33, -108.92, 97.70),
|
||||
heading = 25.16,
|
||||
model = "prop_plant_01b"
|
||||
},
|
||||
[12] = {
|
||||
location = vector3(-2250.96, -111.22, 97.50),
|
||||
heading = 21.52,
|
||||
model = "prop_plant_01b"
|
||||
},
|
||||
[13] = {
|
||||
location = vector3(465.95, -1021.32, 31.78),
|
||||
heading = 21.52,
|
||||
model = "prop_plant_01b"
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
Config.shrooms = {
|
||||
[1] = {
|
||||
location = vector3(2185.14, 5183.81, 57.48),
|
||||
heading = 334.49,
|
||||
model = "prop_stoneshroom1"
|
||||
},
|
||||
[2] = {
|
||||
location = vector3(2174.45, 5187.85, 57.43),
|
||||
heading = 329.56,
|
||||
model = "prop_stoneshroom1"
|
||||
},
|
||||
[3] = {
|
||||
location = vector3(2166.22, 5196.56, 58.0),
|
||||
heading = 25.16,
|
||||
model = "prop_stoneshroom1"
|
||||
},
|
||||
[4] = {
|
||||
location = vector3(2166.82, 5204.83, 58.63),
|
||||
heading = 21.52,
|
||||
model = "prop_stoneshroom1"
|
||||
},
|
||||
[5] = {
|
||||
location = vector3(2174.84, 5205.82, 59.19),
|
||||
heading = 334.49,
|
||||
model = "prop_stoneshroom1"
|
||||
},
|
||||
[6] = {
|
||||
location = vector3(2184.46, 5201.23, 59.2),
|
||||
heading = 329.56,
|
||||
model = "prop_stoneshroom1"
|
||||
},
|
||||
[7] = {
|
||||
location = vector3(2192.45, 5194.89, 58.86),
|
||||
heading = 25.16,
|
||||
model = "prop_stoneshroom1"
|
||||
},
|
||||
[8] = {
|
||||
location = vector3(2207.53, 5187.81, 58.95),
|
||||
heading = 21.52,
|
||||
model = "prop_stoneshroom1"
|
||||
},
|
||||
[9] = {
|
||||
location = vector3(2213.46, 5191.11, 59.81),
|
||||
heading = 334.49,
|
||||
model = "prop_stoneshroom1"
|
||||
},
|
||||
[10] = {
|
||||
location = vector3(2218.31, 5180.0, 58.18),
|
||||
heading = 329.56,
|
||||
model = "prop_stoneshroom1"
|
||||
},
|
||||
[11] = {
|
||||
location = vector3(2212.75, 5172.35, 57.2),
|
||||
heading = 25.16,
|
||||
model = "prop_stoneshroom1"
|
||||
},
|
||||
[12] = {
|
||||
location = vector3(2208.56, 5167.06, 56.34),
|
||||
heading = 21.52,
|
||||
model = "prop_stoneshroom1"
|
||||
},
|
||||
[13] = {
|
||||
location = vector3(2196.9, 5158.59, 54.84),
|
||||
heading = 21.52,
|
||||
model = "prop_stoneshroom1"
|
||||
},
|
||||
|
||||
[14] = {
|
||||
location = vector3(2191.62, 5174.91, 56.68),
|
||||
heading = 21.52,
|
||||
model = "prop_stoneshroom1"
|
||||
},
|
||||
[15] = {
|
||||
location = vector3(2190.18, 5182.54, 57.47),
|
||||
heading = 21.52,
|
||||
model = "prop_stoneshroom1"
|
||||
},
|
||||
[16] = {
|
||||
location = vector3(2185.85, 5190.49, 58.1),
|
||||
heading = 21.52,
|
||||
model = "prop_stoneshroom1"
|
||||
},
|
||||
[17] = {
|
||||
location = vector3(2179.95, 5194.19, 58.26),
|
||||
heading = 21.52,
|
||||
model = "prop_stoneshroom1"
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
|
||||
Config.Mescaline = {
|
||||
[1] = {
|
||||
location = vector3(2598.73, 4207.89, 41.02),
|
||||
heading = 334.49,
|
||||
model = "prop_cactus_03"
|
||||
},
|
||||
[2] = {
|
||||
location = vector3(2601.46, 4199.34, 40.62),
|
||||
heading = 329.56,
|
||||
model = "prop_cactus_03"
|
||||
},
|
||||
[3] = {
|
||||
location = vector3(2611.63, 4194.18, 41.18),
|
||||
heading = 25.16,
|
||||
model = "prop_cactus_03"
|
||||
},
|
||||
[4] = {
|
||||
location = vector3(2620.18, 4202.69, 41.5),
|
||||
heading = 21.52,
|
||||
model = "prop_cactus_03"
|
||||
},
|
||||
[5] = {
|
||||
location = vector3(2624.26, 4211.75, 42.34),
|
||||
heading = 334.49,
|
||||
model = "prop_cactus_03"
|
||||
},
|
||||
[6] = {
|
||||
location = vector3(2635.21, 4207.5, 42.49),
|
||||
heading = 329.56,
|
||||
model = "prop_cactus_03"
|
||||
},
|
||||
[7] = {
|
||||
location = vector3(2644.97, 4193.51, 42.11),
|
||||
heading = 25.16,
|
||||
model = "prop_cactus_03"
|
||||
},
|
||||
[8] = {
|
||||
location = vector3(2654.21, 4195.31, 41.23),
|
||||
heading = 21.52,
|
||||
model = "prop_cactus_03"
|
||||
},
|
||||
[9] = {
|
||||
location = vector3(2653.32, 4206.49, 41.62),
|
||||
heading = 334.49,
|
||||
model = "prop_cactus_03"
|
||||
},
|
||||
[10] = {
|
||||
location = vector3(2647.45, 4213.94, 42.49),
|
||||
heading = 329.56,
|
||||
model = "prop_cactus_03"
|
||||
},
|
||||
[11] = {
|
||||
location = vector3(2636.3, 4218.49, 43.03),
|
||||
heading = 25.16,
|
||||
model = "prop_cactus_03"
|
||||
},
|
||||
[12] = {
|
||||
location = vector3(2627.37, 4223.2, 42.88),
|
||||
heading = 21.52,
|
||||
model = "prop_cactus_03"
|
||||
},
|
||||
[13] = {
|
||||
location = vector3(2617.86, 4230.38, 42.63),
|
||||
heading = 21.52,
|
||||
model = "prop_cactus_03"
|
||||
},
|
||||
|
||||
[14] = {
|
||||
location = vector3(2609.8, 4222.12, 41.19),
|
||||
heading = 21.52,
|
||||
model = "prop_cactus_03"
|
||||
},
|
||||
[15] = {
|
||||
location = vector3(2602.96, 4194.05, 41.01),
|
||||
heading = 21.52,
|
||||
model = "prop_cactus_03"
|
||||
},
|
||||
[16] = {
|
||||
location = vector3(2614.39, 4188.3, 41.68),
|
||||
heading = 21.52,
|
||||
model = "prop_cactus_03"
|
||||
},
|
||||
[17] = {
|
||||
location = vector3(2623.82, 4189.97, 41.44),
|
||||
heading = 21.52,
|
||||
model = "prop_cactus_03"
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
---------------------- even though there is a comment out section since this feature was released i get constant questions about it. so ill make a note. if you ask for support saying these peds arent spawning ill delete your ticket.
|
||||
---------------------- This only happens if the wholesale is a setup. They will spawn and shoot you. THEY ONLY SPAWN IF ITS A SETUP
|
||||
Config.Cokepeds = { ------------- this is where the setup peds will spawn to kill you
|
||||
vector3(640.24, 644.18, 129.09),
|
||||
vector3(642.64, 649.71, 128.91),
|
||||
vector3(646.47, 650.65, 128.91),
|
||||
vector3(652.8, 649.88, 128.95),
|
||||
vector3(656.87, 631.85, 128.91),
|
||||
vector3(649.96, 620.57, 128.91),
|
||||
}
|
||||
|
||||
Config.CrackPeds = { ------------- this is where the setup peds will spawn to kill you
|
||||
vector3(1873.25, 299.28, 164.27),
|
||||
vector3(1891.37, 292.12, 163.68),
|
||||
vector3(1886.68, 274.1, 162.96),
|
||||
vector3(1869.67, 265.97, 163.72),
|
||||
vector3(1836.88, 251.09, 162.56),
|
||||
vector3(1853.3, 230.64, 162.09),
|
||||
}
|
||||
|
||||
Config.heroinPeds = { ------------- this is where the setup peds will spawn to kill you
|
||||
vector3(2740.93, 1389.09, 24.5),
|
||||
vector3(2713.38, 1392.31, 24.54),
|
||||
vector3(2703.66, 1355.09, 24.52),
|
||||
vector3(2680.34, 1363.39, 24.52),
|
||||
vector3(2766.1, 1388.15, 24.52),
|
||||
vector3(2764.76, 1364.16, 24.52),
|
||||
}
|
||||
|
||||
Config.lsdPeds = { ------------- this is where the setup peds will spawn to kill you
|
||||
vector3(-1564.49, 838.85, 184.18),
|
||||
vector3(-1545.33, 863.67, 181.44),
|
||||
vector3(-1542.18, 802.71, 184.24),
|
||||
vector3(-1524.31, 820.44, 181.79),
|
||||
}
|
||||
|
||||
----------- qb-drugs update built in here below
|
||||
----------- Everything is now a target and not displaytext. Dealers are no longer just doors, they will spawn peds where you place your dealer. This is a literally qb-drugs with SLIGHT edits. mainly added peds for deliveries, made everything a target
|
||||
------------ and changed the range a ped will walk up to you to be a bigger radius.
|
||||
Config.SuccessChance = 50
|
||||
Config.ScamChance = 25
|
||||
Config.RobberyChance = 25
|
||||
Config.MinimumDrugSalePolice = 0
|
||||
|
||||
Config.DrugsPrice = {
|
||||
["weed_white-widow"] = { min = 15, max = 24 },
|
||||
["weed_og-kush"] = {min = 15, max = 28},
|
||||
["weed_skunk"] = {min = 15, max = 31 },
|
||||
["weed_amnesia"] = {min = 18, max = 34},
|
||||
["weed_purple-haze"] = {min = 18, max = 37},
|
||||
["weed_ak47"] = {min = 18, max = 40},
|
||||
["crack_baggy"] = {min = 18, max = 34},
|
||||
["cokebaggy"] = {min = 18, max = 37},
|
||||
["cokebaggystagetwo"] = {min = 18, max = 40},
|
||||
["cokebaggystagethree"] = {min = 18, max = 40},
|
||||
["heroin_ready"] = {min = 18, max = 40},
|
||||
["heroin_readystagetwo"] = {min = 18, max = 40},
|
||||
["heroin_readystagethree"] = {min = 18, max = 40},
|
||||
["baggedcracked"] = {min = 18, max = 40},
|
||||
["baggedcrackedstagetwo"] = {min = 18, max = 40},
|
||||
["baggedcrackedstagethree"] = {min = 18, max = 40},
|
||||
["white_playboys"] = {min = 18, max = 40},
|
||||
["white_playboys2"] = {min = 18, max = 40},
|
||||
["white_playboys3"] = {min = 18, max = 40},
|
||||
["white_playboys4"] = {min = 18, max = 40},
|
||||
["blue_playboys"] = {min = 18, max = 40},
|
||||
["blue_playboys2"] = {min = 18, max = 40},
|
||||
["blue_playboys3"] = {min = 18, max = 40},
|
||||
["blue_playboys4"] = {min = 18, max = 40},
|
||||
["red_playboys"] = {min = 18, max = 40},
|
||||
["red_playboys2"] = {min = 18, max = 40},
|
||||
["red_playboys3"] = {min = 18, max = 40},
|
||||
["red_playboys4"] = {min = 18, max = 40},
|
||||
["orange_playboys"] = {min = 18, max = 40},
|
||||
["orange_playboys2"] = {min = 18, max = 40},
|
||||
["orange_playboys3"] = {min = 18, max = 40},
|
||||
["orange_playboys4"] = {min = 18, max = 40},
|
||||
["white_aliens"] = {min = 18, max = 40},
|
||||
["white_aliens2"] = {min = 18, max = 40},
|
||||
["white_aliens3"] = {min = 18, max = 40},
|
||||
["white_aliens4"] = {min = 18, max = 40},
|
||||
["blue_aliens"] = {min = 18, max = 40},
|
||||
["blue_aliens2"] = {min = 18, max = 40},
|
||||
["blue_aliens3"] = {min = 18, max = 40},
|
||||
["blue_aliens4"] = {min = 18, max = 40},
|
||||
["red_aliens"] = {min = 18, max = 40},
|
||||
["red_aliens2"] = {min = 18, max = 40},
|
||||
["red_aliens3"] = {min = 18, max = 40},
|
||||
["red_aliens4"] = {min = 18, max = 40},
|
||||
["orange_aliens"] = {min = 18, max = 40},
|
||||
["orange_aliens2"] = {min = 18, max = 40},
|
||||
["orange_aliens3"] = {min = 18, max = 40},
|
||||
["orange_aliens4"] = {min = 18, max = 40},
|
||||
["white_pl"] = {min = 18, max = 40},
|
||||
["white_pl2"] = {min = 18, max = 40},
|
||||
["white_pl3"] = {min = 18, max = 40},
|
||||
["white_pl4"] = {min = 18, max = 40},
|
||||
["blue_pl"] = {min = 18, max = 40},
|
||||
["blue_pl2"] = {min = 18, max = 40},
|
||||
["blue_pl3"] = {min = 18, max = 40},
|
||||
["blue_pl4"] = {min = 18, max = 40},
|
||||
["red_pl"] = {min = 18, max = 40},
|
||||
["red_pl2"] = {min = 18, max = 40},
|
||||
["red_pl3"] = {min = 18, max = 40},
|
||||
["red_pl4"] = {min = 18, max = 40},
|
||||
["orange_pl"] = {min = 18, max = 40},
|
||||
["orange_pl2"] = {min = 18, max = 40},
|
||||
["orange_pl3"] = {min = 18, max = 40},
|
||||
["orange_pl4"] = {min = 18, max = 40},
|
||||
["white_trolls"] = {min = 18, max = 40},
|
||||
["white_trolls2"] = {min = 18, max = 40},
|
||||
["white_trolls3"] = {min = 18, max = 40},
|
||||
["white_trolls4"] = {min = 18, max = 40},
|
||||
["blue_trolls"] = {min = 18, max = 40},
|
||||
["blue_trolls2"] = {min = 18, max = 40},
|
||||
["blue_trolls3"] = {min = 18, max = 40},
|
||||
["blue_trolls4"] = {min = 18, max = 40},
|
||||
["red_trolls"] = {min = 18, max = 40},
|
||||
["red_trolls2"] = {min = 18, max = 40},
|
||||
["red_trolls3"] = {min = 18, max = 40},
|
||||
["red_trolls4"] = {min = 18, max = 40},
|
||||
["orange_trolls"] = {min = 18, max = 40},
|
||||
["orange_trolls2"] = {min = 18, max = 40},
|
||||
["orange_trolls3"] = {min = 18, max = 40},
|
||||
["orange_trolls4"] = {min = 18, max = 40},
|
||||
["white_cats"] = {min = 18, max = 40},
|
||||
["white_cats2"] = {min = 18, max = 40},
|
||||
["white_cats3"] = {min = 18, max = 40},
|
||||
["white_cats4"] = {min = 18, max = 40},
|
||||
["blue_cats"] = {min = 18, max = 40},
|
||||
["blue_cats2"] = {min = 18, max = 40},
|
||||
["blue_cats3"] = {min = 18, max = 40},
|
||||
["blue_cats4"] = {min = 18, max = 40},
|
||||
["red_cats"] = {min = 18, max = 40},
|
||||
["red_cats2"] = {min = 18, max = 40},
|
||||
["red_cats3"] = {min = 18, max = 40},
|
||||
["red_cats4"] = {min = 18, max = 40},
|
||||
["orange_cats"] = {min = 18, max = 40},
|
||||
["orange_cats2"] = {min = 18, max = 40},
|
||||
["orange_cats3"] = {min = 18, max = 40},
|
||||
["orange_cats4"] = {min = 18, max = 40},
|
||||
}
|
||||
|
||||
Debug = false -- true / false - Currently prints the vector3 and label of locations when requesting a delivery
|
||||
NearbyDeliveries = false -- true / false - Do you want deliveries to be within a certain amount of units?
|
||||
DeliveryWithin = 2000 -- int (Default 2000) - How many units do you want the delivery location to be within from the player when making a delivery request?
|
||||
Config.Dealers = {}
|
||||
--UseTarget = GetConvar('UseTarget', 'false') == 'true', -- Use qb-target interactions (don't change this, go to your server.cfg and add setr UseTarget true)
|
||||
PoliceCallChance = 99 --in percentage (if 99, theres the 99% to call the police)
|
||||
|
||||
-- Shop Config
|
||||
Config.Products = {
|
||||
[1] = {name = "weed_white-widow_seed", price = 15, amount = 150, info = {}, type = "item", slot = 1, minrep = 0},
|
||||
[2] = {name = "weed_skunk_seed", price = 15, amount = 150, info = {}, type = "item", slot = 1, minrep = 20},
|
||||
[3] = {name = "weed_purple-haze_seed", price = 15, amount = 150, info = {}, type = "item", slot = 1, minrep = 40},
|
||||
[4] = {name = "weed_og-kush_seed", price = 15, amount = 150, info = {}, type = "item", slot = 1, minrep = 60},
|
||||
[5] = {name = "weed_amnesia_seed", price = 15, amount = 150, info = {}, type = "item", slot = 1, minrep = 80},
|
||||
}
|
||||
|
||||
Config.UseMarkedBills = false -- true for marked bills, false for cash
|
||||
Config.DeliveryRepGain = 1 -- amount of rep gained per delivery
|
||||
Config.DeliveryRepLoss = 1 -- amount of rep lost if delivery wrong or late
|
||||
Config.PoliceDeliveryModifier = 2 -- amount to multiply active cop count by
|
||||
Config.WrongAmountFee = 2 -- divide the payout by this value for wrong delivery amount
|
||||
Config.OverdueDeliveryFee = 4 -- divide the payout by this value for overdue delivery
|
||||
|
||||
Config.DeliveryItems = {
|
||||
[1] = {
|
||||
["item"] = "weed_brick",
|
||||
["minrep"] = 0,
|
||||
['payout'] = 1000
|
||||
},
|
||||
[2] = {
|
||||
["item"] = "coke_brick",
|
||||
["minrep"] = 0,
|
||||
['payout'] = 1000
|
||||
},
|
||||
}
|
||||
|
||||
Config.DeliveryLocations = {
|
||||
[1] = {
|
||||
["label"] = "Stripclub",
|
||||
["coords"] = vector3(106.24, -1280.32, 29.24),
|
||||
},
|
||||
[2] = {
|
||||
["label"] = "Vinewood Video",
|
||||
["coords"] = vector3(223.98, 121.53, 102.76),
|
||||
},
|
||||
[3] = {
|
||||
["label"] = "Taxi",
|
||||
["coords"] = vector3(882.67, -160.26, 77.11),
|
||||
},
|
||||
[4] = {
|
||||
["label"] = "Resort",
|
||||
["coords"] = vector3(-1245.63, 376.21, 75.34),
|
||||
},
|
||||
[5] = {
|
||||
["label"] = "Bahama Mamas",
|
||||
["coords"] = vector3(-1383.1, -639.99, 28.67),
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -3,26 +3,28 @@ author "mustache_dom"
|
||||
description "drugs by mustache dom"
|
||||
fx_version "cerulean"
|
||||
game "gta5"
|
||||
|
||||
version '4.0.8'
|
||||
client_scripts {
|
||||
'client/functions.lua',
|
||||
'client/**.lua',
|
||||
'@PolyZone/client.lua',
|
||||
'@PolyZone/CircleZone.lua',
|
||||
}
|
||||
|
||||
server_scripts {
|
||||
'server/**.lua',
|
||||
'@oxmysql/lib/MySQL.lua',
|
||||
|
||||
'server/functions.lua',
|
||||
'server/**.lua',
|
||||
}
|
||||
|
||||
shared_scripts {
|
||||
'config.lua',
|
||||
|
||||
|
||||
'@ox_lib/init.lua',
|
||||
'shared/config.lua',
|
||||
'shared/DrugData/*.lua',
|
||||
}
|
||||
|
||||
|
||||
lua54 'yes'
|
||||
|
||||
dependency '/assetpacks'
|
||||
files {
|
||||
'client/**.lua',
|
||||
'server/**.lua',
|
||||
'locales/**.json'
|
||||
}
|
||||
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 68 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 69 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 7.0 KiB |
|
Before Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 7.4 KiB |
|
Before Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 9.3 KiB |
|
Before Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 7.9 KiB |
|
Before Width: | Height: | Size: 260 KiB |
|
Before Width: | Height: | Size: 260 KiB |
|
Before Width: | Height: | Size: 261 KiB |
|
Before Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 62 KiB |
|
Before Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 65 KiB |
|
Before Width: | Height: | Size: 260 KiB |
|
Before Width: | Height: | Size: 261 KiB |
|
Before Width: | Height: | Size: 260 KiB |