Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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,674 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
||||
@@ -0,0 +1,536 @@
|
||||
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
local started = nil
|
||||
function loadParticle(dict)
|
||||
if not HasNamedPtfxAssetLoaded(dict) then
|
||||
RequestNamedPtfxAsset(dict)
|
||||
end
|
||||
while not HasNamedPtfxAssetLoaded(dict) do
|
||||
Wait(0)
|
||||
end
|
||||
SetPtfxAssetNextCall(dict)
|
||||
end
|
||||
|
||||
|
||||
|
||||
function MethCooking()
|
||||
local animDict, animName = "anim@amb@business@meth@meth_monitoring_cooking@cooking@", "chemical_pour_short_cooker"
|
||||
lib.requestAnimDict(animDict, 500)
|
||||
SetEntityCoords(PlayerPedId(), vector3(1005.773, -3200.402, -38.524))
|
||||
local targetPosition = GetEntityCoords(PlayerPedId())
|
||||
local animDuration = GetAnimDuration(animDict, animName) * 800
|
||||
FreezeEntityPosition(PlayerPedId(), true)
|
||||
local scenePos, sceneRot = vector3(1010.656, -3198.445, -38.925), vector3(0.0, 0.0, 0.0)
|
||||
local netScene = NetworkCreateSynchronisedScene(scenePos, sceneRot, 2, false, false, 1065353216, 0, 1.3)
|
||||
NetworkAddPedToSynchronisedScene(PlayerPedId(), netScene, animDict, animName, 1.5, -4.0, 1, 16, 1148846080, 0)
|
||||
local sacid = CreateObjectNoOffset(`bkr_prop_meth_sacid`, targetPosition, 1, 1, 0)
|
||||
NetworkAddEntityToSynchronisedScene(sacid, netScene, animDict, "chemical_pour_short_sacid", 4.0, -8.0, 1)
|
||||
local ammonia = CreateObjectNoOffset(`bkr_prop_meth_ammonia`, targetPosition, 1, 1, 0)
|
||||
NetworkAddEntityToSynchronisedScene(ammonia, netScene, animDict, "chemical_pour_short_ammonia", 4.0, -8.0, 1)
|
||||
NetworkStartSynchronisedScene(netScene)
|
||||
Wait(animDuration)
|
||||
NetworkStopSynchronisedScene(netScene)
|
||||
DeleteObject(sacid) DeleteObject(ammonia)
|
||||
FreezeEntityPosition(PlayerPedId(), false)
|
||||
lib.requestModel('hei_prop_heist_thermite', 2000)
|
||||
loadParticle('scr_ornate_heist')
|
||||
local thermite = CreateObject('hei_prop_heist_thermite', vector3(1005.76, -3201.3, -39.25), true, false, false)
|
||||
FreezeEntityPosition(thermite, true)
|
||||
SetEntityRotation(thermite, 190.0, 90.0, 140.0, 3, true )
|
||||
Wait(1000)
|
||||
local therm = StartParticleFxLoopedOnEntity('scr_heist_ornate_thermal_burn', thermite, 0.0, 1.4, 0.0, 0.0, 0.0, 0.0, 1.5, false, false, false)
|
||||
Wait(math.random(10000, 20000))
|
||||
StopParticleFxLooped(therm, true)
|
||||
end
|
||||
|
||||
|
||||
function SmashMeth()
|
||||
local ver = ""
|
||||
local animDict, animName = "anim@amb@business@meth@meth_smash_weight_check@", "break_weigh_"..ver.."char02"
|
||||
lib.requestAnimDict(animDict, 500)
|
||||
local ped = PlayerPedId()
|
||||
local targetPosition = vector3(1012.628, -3194.619, -39.589)
|
||||
SetEntityCoords(ped, targetPosition)
|
||||
Wait(1)
|
||||
local animDuration = GetAnimDuration(animDict, animName) * 800
|
||||
FreezeEntityPosition(ped, true)
|
||||
local scenePos, sceneRot = vector3(1008.734, -3196.646, -39.99), vector3(0.0, 0.0, 1.08)
|
||||
local netScene = NetworkCreateSynchronisedScene(scenePos, sceneRot, 2, false, false, 1065353216, 0, 1.3)
|
||||
NetworkAddPedToSynchronisedScene(ped, netScene, animDict, animName, 1.5, -4.0, 1, 16, 1148846080, 0)
|
||||
local objects, sceneObjects = {}, {
|
||||
{ hash = `w_me_hammer`, animName = "break_weigh_" .. ver .. "hammer"},
|
||||
{ hash = `bkr_Prop_Meth_SmashedTray_01_frag_`, animName = "break_weigh_"..ver.."tray01"},
|
||||
{ hash = `bkr_Prop_Meth_Tray_02a`, animName = "break_weigh_"..ver.."tray01^1"},
|
||||
{ hash = `bkr_Prop_Meth_Tray_02a`, animName = "break_weigh_"..ver.."tray01^2"},
|
||||
{ hash = `bkr_Prop_Meth_SmashedTray_01_frag_`, animName = "break_weigh_"..ver.."tray01^3"},
|
||||
}
|
||||
for i=1, #sceneObjects, 1 do
|
||||
local obj = CreateObjectNoOffset(sceneObjects[i].hash, targetPosition, true, true, true)
|
||||
NetworkAddEntityToSynchronisedScene(obj, netScene, animDict, sceneObjects[i].animName, 4.0, -8.0, 1)
|
||||
objects[#objects+1] = obj
|
||||
end
|
||||
NetworkStartSynchronisedScene(netScene)
|
||||
Wait(animDuration)
|
||||
NetworkStopSynchronisedScene(netScene)
|
||||
for i=1, #objects, 1 do
|
||||
DeleteObject(objects[i])
|
||||
end
|
||||
RemoveAnimDict(animDict)
|
||||
FreezeEntityPosition(ped, false)
|
||||
end
|
||||
|
||||
function BagMeth()
|
||||
local ver = ""
|
||||
local animDict, animName = "anim@amb@business@meth@meth_smash_weight_check@", "break_weigh_"..ver.."char01"
|
||||
lib.requestAnimDict(animDict, 500)
|
||||
local animDuration = GetAnimDuration(animDict, animName) * 1000
|
||||
local ped = PlayerPedId()
|
||||
local coords = GetEntityCoords(ped)
|
||||
local scenePos, sceneRot = vector3(1008.734, -3196.646, -39.99), vector3(0.0, 0.0, 1.08)
|
||||
local scenes = {
|
||||
{
|
||||
{ hash = `bkr_prop_meth_bigbag_04a`, animName = "break_weigh_"..ver.."box01"},
|
||||
{ hash = `bkr_prop_meth_bigbag_03a`, animName = "break_weigh_"..ver.."box01^1"},
|
||||
{ hash = `bkr_prop_meth_openbag_02`, animName = "break_weigh_"..ver.."methbag01"}
|
||||
},
|
||||
{
|
||||
{ hash = `bkr_prop_meth_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
|
||||
|
||||
function Tray()
|
||||
local pos = GetEntityCoords(PlayerPedId(), true)
|
||||
RequestAnimDict('anim@heists@box_carry@')
|
||||
while (not HasAnimDictLoaded('anim@heists@box_carry@')) do
|
||||
Wait(7)
|
||||
end
|
||||
TaskPlayAnim(PlayerPedId(), 'anim@heists@box_carry@', 'idle', 5.0, -1, -1, 50, 0, false, false, false)
|
||||
RequestModel("bkr_prop_meth_tray_02a")
|
||||
while not HasModelLoaded("bkr_prop_meth_tray_02a") do
|
||||
Wait(0)
|
||||
end
|
||||
local trays = CreateObject("bkr_prop_meth_tray_02a", pos.x, pos.y, pos.z, true, true, true)
|
||||
AttachEntityToEntity(trays, PlayerPedId(), GetPedBoneIndex(PlayerPedId(), 28422), 0.01,-0.2, -0.2, 20.0, 0.0, 0.0, true, true, false, true, 1, true)
|
||||
end
|
||||
|
||||
|
||||
|
||||
function CutCoke()
|
||||
local animDict, animName = "anim@amb@business@coc@coc_unpack_cut_left@", "coke_cut_v5_coccutter"
|
||||
lib.requestAnimDict(animDict, 500)
|
||||
local animDuration = GetAnimDuration(animDict, animName) * 1000
|
||||
local ped = PlayerPedId()
|
||||
local coords = GetEntityCoords(ped)
|
||||
local scenePos, sceneRot = vector3(1090.37+.9, -3193.61-1.68, -39.60), vector3(0.0, 0.0, 0.00)
|
||||
local scenes = {
|
||||
{
|
||||
{ hash = `bkr_prop_coke_bakingsoda_o`, animName = "coke_cut_v5_bakingsoda"},
|
||||
{ hash = `prop_cs_credit_card`, animName = "coke_cut_v5_creditcard"},
|
||||
{ hash = `prop_cs_credit_card`, animName = "coke_cut_v5_creditcard^1"}
|
||||
},
|
||||
}
|
||||
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
|
||||
|
||||
CreateThread(function()
|
||||
BikerCocaine = exports['bob74_ipl']:GetBikerCocaineObject()
|
||||
BikerCocaine.Style.Set(BikerCocaine.Style.upgrade)
|
||||
BikerCocaine.Security.Set(BikerCocaine.Security.upgrade)
|
||||
BikerCocaine.Details.Enable({BikerCocaine.Details.cokeBasic1, BikerCocaine.Details.cokeBasic2, BikerCocaine.Details.cokeBasic3}, true)
|
||||
end)
|
||||
|
||||
function BagCoke()
|
||||
local ver = ""
|
||||
local animDict, animName = "anim@amb@business@meth@meth_smash_weight_check@", "break_weigh_"..ver.."char01"
|
||||
lib.requestAnimDict(animDict, 500)
|
||||
local animDuration = GetAnimDuration(animDict, animName) * 1000
|
||||
local ped = PlayerPedId()
|
||||
local coords = GetEntityCoords(ped)
|
||||
local scenePos, sceneRot = vector3(1090.62+4.3, -3196.2+3, -38.99-1), vector3(360.0, 360.0, 180.08)
|
||||
local scenes = {
|
||||
{
|
||||
{ hash = `bkr_prop_coke_cutblock_01`, animName = "break_weigh_"..ver.."box01"},
|
||||
{ hash = `bkr_prop_coke_fullmetalbowl_02`, animName = "break_weigh_"..ver.."box01^1"},
|
||||
{ hash = `bkr_prop_coke_cutblock_01`, animName = "break_weigh_"..ver.."methbag01"}
|
||||
},
|
||||
{
|
||||
{ hash = `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
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
|
||||
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
|
||||
|
||||
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 hit = 0
|
||||
function SpawnCarPedChase()
|
||||
local stoploc = vector3(-1157.63, -3056.71, 13.94)
|
||||
local start = Config.StartLoc[math.random(1,#Config.StartLoc)]
|
||||
if started then
|
||||
Notify(Lang.lean.act,'error')
|
||||
else
|
||||
started = true
|
||||
lib.requestModel(`pounder`, Config.RequestModelTime)
|
||||
lib.requestModel("ig_priest", Config.RequestModelTime)
|
||||
lib.requestModel(`cargobob3`, Config.RequestModelTime)
|
||||
local leancar = CreateVehicle(`pounder`, start.x+3, start.y-2, start.z-1, 52.0, true, true)
|
||||
local driver = CreatePed(26, "ig_priest", start.x, start.y, start.z, 268.9422, true, false)
|
||||
local pilot2 = CreatePed(26, "ig_priest", stoploc.x-3, stoploc.y-3, stoploc.z-1, 268.9422, true, false)
|
||||
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
|
||||
AddSingleModel(leancar, { name = 'leancar', icon = 'fa-solid fa-car', label = 'Steal From Car',
|
||||
action = function()
|
||||
hit = hit + 1
|
||||
if not minigame() then return end
|
||||
TriggerServerEvent('md-drugs:server:givelean')
|
||||
started = nil
|
||||
if math.random(1,100) <= 30 or hit == 4 then
|
||||
hit = 0
|
||||
DeleteVehicle(leancar)
|
||||
DeleteEntity(driver)
|
||||
DeleteEntity(pilot2)
|
||||
end
|
||||
end}, nil)
|
||||
else
|
||||
repeat
|
||||
Wait(1000)
|
||||
until #(GetEntityCoords(driver) - GetEntityCoords(pilot2)) < 25.0
|
||||
Wait( 3 * 1000)
|
||||
local heli = CreateVehicle(`cargobob3`, stoploc.x-20, stoploc.y-20, stoploc.z-1, 80, true,true)
|
||||
Wait(1000)
|
||||
if DoesEntityExist(heli) then
|
||||
SetEntityInvincible(pilot2, false)
|
||||
DeleteVehicle(leancar)
|
||||
DeleteEntity(driver)
|
||||
SetEntityAsMissionEntity(heli)
|
||||
SetPedIntoVehicle(pilot2, heli, -1)
|
||||
TaskHeliMission(pilot2, heli, 0, 0, -3362.05, 589.45, -13.04, 4, 150.0, 20.0, -1.0, 10, 10, 5.0, 0)
|
||||
else
|
||||
heli = CreateVehicle(`cargobob3`, stoploc.x-20, stoploc.y-20, stoploc.z-1, 80, true,true)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function SpawnMethCarPedChase()
|
||||
local ped = GetEntityCoords(PlayerPedId())
|
||||
local stoploc = vector3(-1157.63, -3056.71, 13.94)
|
||||
local start = Config.StartLoc[math.random(1,#Config.StartLoc)]
|
||||
local startedmeth = false
|
||||
|
||||
if startedmeth then
|
||||
Notify(Lang.meth.act,'error')
|
||||
else
|
||||
startedmeth = true
|
||||
lib.requestModel(`journey`, Config.RequestModelTime)
|
||||
lib.requestModel("a_m_m_hillbilly_02", Config.RequestModelTime)
|
||||
lib.requestModel(`cargobob3`, Config.RequestModelTime)
|
||||
local methcar = CreateVehicle(`journey`, start.x+3, start.y-2, start.z-1, 52.0, true, true)
|
||||
local methdriver = CreatePed(26, "a_m_m_hillbilly_02", start.x, start.y, start.z, 268.9422, true, false)
|
||||
local methpilot = CreatePed(26, "a_m_m_hillbilly_02", stoploc.x-3, stoploc.y-3, stoploc.z-1, 268.9422, true, false)
|
||||
FreezeEntityPosition(methpilot, true)
|
||||
SetEntityInvincible(methpilot, true)
|
||||
SetEntityAsMissionEntity(methcar)
|
||||
AddBlipForEntity(methcar)
|
||||
SetPedIntoVehicle(methdriver, methcar, -1)
|
||||
SetPedFleeAttributes(methdriver,false)
|
||||
TaskVehicleDriveToCoordLongrange(methdriver, methcar, 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
|
||||
AddSingleModel(methcar,{
|
||||
name = 'methcar',
|
||||
icon = 'fa-solid fa-car',
|
||||
label = Lang.targets.meth.stealfromcar,
|
||||
action = function()
|
||||
if not minigame() then return end
|
||||
TriggerServerEvent('md-drugs:server:givemethingridients')
|
||||
startedmeth = nil
|
||||
if math.random(1,100) <= 30 then
|
||||
DeleteVehicle(methcar)
|
||||
DeleteEntity(methdriver)
|
||||
DeleteEntity(methpilot)
|
||||
end
|
||||
end,
|
||||
}, nil )
|
||||
else
|
||||
repeat
|
||||
Wait(1000)
|
||||
until #(GetEntityCoords(methdriver) - GetEntityCoords(methpilot)) < 25.0
|
||||
Wait( 3 * 1000)
|
||||
local methheli = CreateVehicle(`cargobob3`, stoploc.x-20, stoploc.y-20, stoploc.z-1, 80, true,true)
|
||||
Wait(1000)
|
||||
if DoesEntityExist(methheli) then
|
||||
SetEntityInvincible(methpilot, false)
|
||||
CreatePickUpRopeForCargobob(methheli, 1)
|
||||
AttachVehicleToCargobob(methheli, methcar, GetEntityBoneIndexByName(methcar, 'bodyshell'), 0.0, 0.0, 0.0)
|
||||
DeleteEntity(methdriver)
|
||||
SetEntityAsMissionEntity(methheli)
|
||||
SetPedIntoVehicle(methpilot, methheli, -1)
|
||||
TaskHeliMission(methpilot, methheli, 0, 0, -3362.05, 589.45, -13.04, 4, 150.0, 20.0, -1.0, 10, 10, 5.0, 0)
|
||||
else
|
||||
methheli = CreateVehicle(`cargobob3`, stoploc.x-20, stoploc.y-20, stoploc.z-1, 80, true,true)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function SetUpPeds()
|
||||
AddRelationshipGroup('setups')
|
||||
local ped = GetEntityCoords(PlayerPedId())
|
||||
local peds = {
|
||||
{x = ped.x+3, y = ped.y-5, z = ped.z-1, },
|
||||
{x = ped.x+6, y = ped.y-10, z = ped.z-1,},
|
||||
{x = ped.x+-2,y = ped.y+5, z = ped.z-1,},
|
||||
{x = ped.x+8, y = ped.y-12, z = ped.z-1,},
|
||||
{x = ped.x+5, y = ped.y-2, z = ped.z-1, },
|
||||
{x = ped.x+2, y = ped.y-20, z = ped.z-1,},
|
||||
{x = ped.x+1, y = ped.y-10, z = ped.z-1,},
|
||||
}
|
||||
for i = 1, #peds do
|
||||
local k = peds[i]
|
||||
i = CreatePed(0, "g_m_y_famdnf_01", k.x, k.y, k.z, 90.0, true, true)
|
||||
SetPedRelationshipGroupHash(i, 'setups')
|
||||
GiveWeaponToPed(i, "weapon_pistol", 1, false, true)
|
||||
TaskCombatPed(i, PlayerPedId(), 0, 16)
|
||||
SetPedCombatAttributes(i, 46, true)
|
||||
end
|
||||
end
|
||||
|
||||
RegisterCommand('DrugRep', function()
|
||||
if not Config.TierSystem then return end
|
||||
local rep = lib.callback.await('md-drugs:server:GetRep', false)
|
||||
lib.registerContext({
|
||||
id = 'DrugRep',
|
||||
title = 'Drug Reputation',
|
||||
options = {
|
||||
{icon = "fa-solid fa-face-flushed", title = 'Cocaine: '..rep.coke},
|
||||
{icon = "fa-solid fa-syringe", title = 'Heroin: '..rep.heroin},
|
||||
{icon = "fa-solid fa-vial", title = 'LSD: '..rep.lsd},
|
||||
{icon = "fa-solid fa-plug", title = 'Dealer: '..rep.dealerrep},
|
||||
{icon = "fa-solid fa-money-bill", title = 'Corner Selling: ' .. rep.cornerselling.rep, description = 'Rank: ' .. rep.cornerselling.label }
|
||||
}
|
||||
})
|
||||
lib.showContext('DrugRep')
|
||||
end, false)
|
||||
@@ -1,42 +1,21 @@
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
local CocaPlant = {}
|
||||
local cuttingcoke = nil
|
||||
local baggingcoke = nil
|
||||
|
||||
function LoadModel(hash)
|
||||
hash = GetHashKey(hash)
|
||||
RequestModel(hash)
|
||||
while not HasModelLoaded(hash) do
|
||||
Wait(3000)
|
||||
end
|
||||
end
|
||||
local function pick(loc)
|
||||
if not progressbar(Lang.Coke.picking, 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("coke:pickupCane", loc)
|
||||
return true
|
||||
end
|
||||
|
||||
RegisterNetEvent('coke:respawnCane', function(loc)
|
||||
local v = GlobalState.CocaPlant[loc]
|
||||
local hash = GetHashKey(v.model)
|
||||
--if not HasModelLoaded(hash) then LoadModel(hash) end
|
||||
if not CocaPlant[loc] then
|
||||
CocaPlant[loc] = CreateObject(hash, v.location, false, true, true)
|
||||
SetEntityAsMissionEntity(CocaPlant[loc], true, true)
|
||||
FreezeEntityPosition(CocaPlant[loc], true)
|
||||
SetEntityHeading(CocaPlant[loc], v.heading)
|
||||
exports['qb-target']:AddTargetEntity(CocaPlant[loc], {
|
||||
options = { {
|
||||
icon = "fas fa-hand",
|
||||
label = "pick Cocaine",
|
||||
action = function()
|
||||
QBCore.Functions.Progressbar("pick_cane", "picking Cocaine Leaves", 2000, false, true, {
|
||||
disableMovement = true, disableCarMovement = true, disableMouse = false, disableCombat = true, },
|
||||
{ animDict = 'amb@prop_human_bum_bin@idle_a', anim = 'idle_a', flags = 47, },
|
||||
{}, {}, function()
|
||||
TriggerServerEvent("coke:pickupCane", loc)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end, function() -- Cancel
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
end
|
||||
}
|
||||
},
|
||||
distance = 3.0
|
||||
})
|
||||
Freeze(CocaPlant[loc], true, v.heading)
|
||||
AddSingleModel(CocaPlant[loc], {icon = "fa-solid fa-seedling", label = Lang.targets.coke.pick, action = function() if not pick(loc) then return end end}, loc)
|
||||
end
|
||||
end)
|
||||
|
||||
@@ -48,47 +27,15 @@ end)
|
||||
RegisterNetEvent("coke:init", function()
|
||||
for k, v in pairs (GlobalState.CocaPlant) do
|
||||
local hash = GetHashKey(v.model)
|
||||
if not HasModelLoaded(hash) then LoadModel(hash) end
|
||||
LoadModel(hash)
|
||||
if not v.taken then
|
||||
CocaPlant[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z, false, true, true)
|
||||
SetEntityAsMissionEntity(CocaPlant[k], true, true)
|
||||
FreezeEntityPosition(CocaPlant[k], true)
|
||||
SetEntityHeading(CocaPlant[k], v.heading)
|
||||
exports['qb-target']:AddTargetEntity(CocaPlant[k], {
|
||||
options = { {
|
||||
icon = "fas fa-hand",
|
||||
label = "pick cocaine",
|
||||
action = function()
|
||||
QBCore.Functions.Progressbar("pick_cane", "picking Cocaine Leaves", 2000, false, true, {
|
||||
disableMovement = true, disableCarMovement = true, disableMouse = false, disableCombat = true, },
|
||||
{ animDict = 'amb@prop_human_bum_bin@idle_a', anim = 'idle_a', flags = 47, },
|
||||
{}, {}, function()
|
||||
TriggerServerEvent("coke:pickupCane", k)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end, function() -- Cancel
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
end
|
||||
}
|
||||
},
|
||||
distance = 3.0
|
||||
})
|
||||
Freeze(CocaPlant[k], true, v.heading)
|
||||
AddSingleModel(CocaPlant[k], {icon = "fa-solid fa-seedling", label = Lang.targets.coke.pick, action = function() if not pick(k) then return end end}, k)
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
AddEventHandler('onResourceStart', function(resource)
|
||||
if resource == GetCurrentResourceName() then
|
||||
LoadModel('prop_plant_01a')
|
||||
TriggerEvent('coke:init')
|
||||
end
|
||||
end)
|
||||
RegisterNetEvent('QBCore:Client:OnPlayerLoaded', function()
|
||||
Wait(3000)
|
||||
LoadModel('prop_plant_01a')
|
||||
TriggerEvent('coke:init')
|
||||
end)
|
||||
|
||||
AddEventHandler('onResourceStop', function(resourceName)
|
||||
if GetCurrentResourceName() == resourceName then
|
||||
SetModelAsNoLongerNeeded(GetHashKey('prop_plant_01a'))
|
||||
@@ -100,47 +47,44 @@ AddEventHandler('onResourceStop', function(resourceName)
|
||||
end
|
||||
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)
|
||||
RegisterNetEvent("md-drugs:client:makepowder", function(data)
|
||||
if not ItemCheck('coca_leaf') then return end
|
||||
if not progressbar(Lang.Coke.makepow, 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:makepowder", data.data)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:cutcokeone")
|
||||
AddEventHandler("md-drugs:client:cutcokeone", function()
|
||||
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)
|
||||
RegisterNetEvent("md-drugs:client:cutcokeone", function()
|
||||
if not ItemCheck('bakingsoda') then return end
|
||||
cuttingcoke = true
|
||||
if Config.FancyCokeAnims then
|
||||
CutCoke()
|
||||
else
|
||||
if not progressbar(Lang.Coke.cutting, 5000, 'uncuff') then cuttingcoke = nil return end
|
||||
end
|
||||
TriggerServerEvent("md-drugs:server:cutcokeone")
|
||||
cuttingcoke = nil
|
||||
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)
|
||||
RegisterNetEvent("md-drugs:client:bagcoke", function()
|
||||
if not ItemCheck('empty_weed_bag') then return end
|
||||
baggingcoke = true
|
||||
if Config.FancyCokeAnims then
|
||||
BagCoke()
|
||||
else
|
||||
if not progressbar(Lang.Coke.bagging, 5000, 'uncuff') then baggingcoke = nil return end
|
||||
end
|
||||
TriggerServerEvent("md-drugs:server:bagcoke")
|
||||
baggingcoke = nil
|
||||
end)
|
||||
|
||||
CreateThread(function()
|
||||
if Config.FancyCokeAnims == false then
|
||||
AddBoxZoneMulti('cuttcoke', Config.CuttingCoke, { type = "client", event = "md-drugs:client:cutcokeone", icon = "fa-solid fa-mortar-pestle", label = Lang.targets.coke.cut})
|
||||
AddBoxZoneMulti('baggcoke', Config.BaggingCoke, { type = "client", event = "md-drugs:client:bagcoke", icon = "fa-solid fa-sack-xmark", label = Lang.targets.coke.bag})
|
||||
else
|
||||
AddBoxZoneSingle('cutcoke', vector3(1093.17, -3195.74, -39.19),
|
||||
{ type = "client", event = "md-drugs:client:cutcokeone", icon = "fa-solid fa-mortar-pestle", label = Lang.targets.coke.cut, canInteract = function()if cuttingcoke == nil and baggingcoke == nil then return true end end })
|
||||
AddBoxZoneSingle('bagcokepowder', vector3(1090.29, -3195.66, -39.13),
|
||||
{ type = "client", event = "md-drugs:client:bagcoke", icon = "fa-solid fa-sack-xmark", label = Lang.targets.coke.bag, canInteract = function() if baggingcoke == nil and cuttingcoke == nil then return true end end })
|
||||
end
|
||||
end)
|
||||
@@ -1,24 +1,45 @@
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
|
||||
RegisterNetEvent('md-drugs:client:consumedrugs', function(itemName)
|
||||
QBCore.Functions.Progressbar("use_lsd", "Have Fun!", 1750, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
}, {
|
||||
animDict = "mp_suicide",
|
||||
anim = "pill",
|
||||
flags = 49,
|
||||
}, {}, {}, function()
|
||||
ClearPedTasks(PlayerPedId())
|
||||
TriggerEvent("evidence:client:SetStatus", "widepupils", 300)
|
||||
if itemName == "white_playboys" or itemName == "white_playboys2" or itemName == "white_playboys3" or itemName == "white_playboys4" or itemName == "blue_playboys" or itemName == "blue_playboys2" or itemName == "blue_playboys3" or itemName == "blue_playboys4" or itemName == "red_playboys" or itemName == "red_playboys2" or itemName == "red_playboys3" or itemName == "red_playboys4" or itemName == "orange_playboys" or itemName == "orange_playboy2s" or itemName == "orange_playboys3" or itemName == "orange_playboys4" or itemName == "white_aliens" or itemName == "white_aliens2" or itemName == "white_aliens3" or itemName == "white_aliens4" or itemName == "blue_aliens" or itemName == "blue_aliens2" or itemName == "blue_aliens3" or itemName == "blue_aliens4" or itemName == "red_aliens" or itemName == "red_aliens3" or itemName == "red_aliens2" or itemName == "red_aliens4" or itemName == "orange_aliens" or itemName == "orange_aliens2" or itemName == "orange_aliens3" or itemName == "orange_aliens4" or itemName == "white_pl" or itemName == "white_pl2" or itemName == "white_pl3" or itemName == "white_pl4" or itemName == "blue_pl" or itemName == "blue_pl2" or itemName == "blue_pl3" or itemName == "blue_pl4" or itemName == "red_pl" or itemName == "red_pl2" or itemName == "red_pl3" or itemName == "red_pl4" or itemName == "orange_pl" or itemName == "orange_pl2" or itemName == "orange_pl3" or itemName == "orange_pl4" or itemName == "white_trolls" or itemName == "white_trolls2" or itemName == "white_trolls3" or itemName == "white_trolls4" or itemName == "blue_trolls" or itemName == "blue_trolls2" or itemName == "blue_trolls3" or itemName == "blue_trolls4" or itemName == "red_trolls" or itemName == "red_trolls2" or itemName == "red_trolls3" or itemName == "red_trolls4" or itemName == "orange_trolls" or itemName == "orange_trolls2" or itemName == "orange_trolls3" or itemName == "orange_trolls4" or itemName == "white_cats2" or itemName == "white_cats3" or itemName == "white_cats4" or itemName == "white_cats" or itemName == "blue_cats" or itemName == "blue_cats3" or itemName == "blue_cats2" or itemName == "blue_cats4" or itemName == "red_cats" or itemName == "red_cats2" or itemName == "red_cats3" or itemName == "red_cats4" or itemName == "orange_cats" or itemName == "orange_cats2" or itemName == "orange_cats3" or itemName == "orange_cats4" then
|
||||
AlienEffect()
|
||||
elseif itemName == "cokebaggystagetwo" or itemName == "cokebaggystagethree" or itemName == "baggedcracked" or itemName == "baggedcrackedstagetwo" or itemName == "baggedcrackedstagethree" then
|
||||
CokeBaggyEffect()
|
||||
else
|
||||
TrevorEffect()
|
||||
end
|
||||
end)
|
||||
end)
|
||||
RegisterNetEvent('md-drugs:client:consumedrugs', function(time, effect, anim, progresstext, status, item)
|
||||
if not progressbar(progresstext .. GetLabel(item).. "!", time, anim ) then return end
|
||||
TriggerServerEvent('md-drugs:server:removeconsum', item)
|
||||
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) if effect == "alien" then AlienEffect() elseif effect == "ecstacy" then EcstasyEffect() elseif effect == "meth" then MethBagEffect() elseif effect == "coke" then CokeBaggyEffect() elseif effect == "trevor" then TrevorEffect() else end if status == nil then return end
|
||||
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)
|
||||
@@ -1,312 +1,92 @@
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
local cornerselling = false
|
||||
local hasTarget = false
|
||||
local lastPed = {}
|
||||
local stealingPed = nil
|
||||
local stealData = {}
|
||||
local availableDrugs = {}
|
||||
local currentOfferDrug = nil
|
||||
local CurrentCops = 0
|
||||
local textDrawn = false
|
||||
local zoneMade = false
|
||||
local sell = false
|
||||
local sold = false
|
||||
local targbusy = false
|
||||
local inZone = false
|
||||
|
||||
-- Functions
|
||||
local function LoadAnimDict(dict)
|
||||
RequestAnimDict(dict)
|
||||
while not HasAnimDictLoaded(dict) do
|
||||
Wait(0)
|
||||
end
|
||||
local function reset(targ)
|
||||
FreezeEntityPosition(targ, false)
|
||||
ClearPedTasks(targ)
|
||||
Wait(10000)
|
||||
DeletePed(targ)
|
||||
targbusy = false
|
||||
sold = true
|
||||
end
|
||||
|
||||
local function TooFarAway()
|
||||
QBCore.Functions.Notify("too far from your corner homie", 'error')
|
||||
LocalPlayer.state:set("inv_busy", false, true)
|
||||
cornerselling = false
|
||||
hasTarget = false
|
||||
availableDrugs = {}
|
||||
local function sellDrug(item, amount, price, targ)
|
||||
PoliceCall(20)
|
||||
targbusy = true
|
||||
if IsPedInAnyVehicle(PlayerPedId(), true) then
|
||||
Notify(Lang.Cornerselling.inveh, 'error')
|
||||
reset(targ)
|
||||
return end
|
||||
if not progressbar(string.format(Lang.Cornerselling.selling, GetLabel(item), price), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent('md-drugs:server:sellCornerDrugs', item, amount, price)
|
||||
reset(targ)
|
||||
end
|
||||
|
||||
local function deny(targ)
|
||||
PoliceCall(20)
|
||||
targbusy = true
|
||||
if not progressbar(Lang.Cornerselling.deny, 4000, 'argue5') then return end
|
||||
reset(targ)
|
||||
end
|
||||
|
||||
local function PoliceCall()
|
||||
-- if Config.PoliceCallChance <= math.random(1, 100) then
|
||||
-- TriggerServerEvent('police:server:policeAlert', 'Drug sale in progress')
|
||||
-- end
|
||||
function Cornersell()
|
||||
local targ = lib.GetClosestPed(GetEntityCoords(PlayerPedId()), 8)
|
||||
if targ == nil then return end
|
||||
if IsPedInAnyVehicle(targ, false) or GetEntityHealth(targ) == 0 or not IsPedHuman(targ) then return end
|
||||
TaskGoToCoordAnyMeans(targ, GetEntityCoords(PlayerPedId()), 1.0, 0, 0, 0, 0)
|
||||
repeat
|
||||
Wait(1000)
|
||||
until #(GetEntityCoords(PlayerPedId()) - GetEntityCoords(targ)) < 2.0
|
||||
lib.requestAnimDict("rcmme_tracey1")
|
||||
TaskStartScenarioInPlace(targ, "WORLD_HUMAN_STAND_IMPATIENT_UPRIGHT", 0, false) FreezeEntityPosition(targ, true)
|
||||
local item, amount, price = lib.callback.await('md-drugs:server:cornerselling:getAvailableDrugs', false)
|
||||
if item == 'nothing' then Notify(Lang.Cornerselling.nodrugs, 'error') sell = false FreezeEntityPosition(targ, false) ClearPedTasks(targ) return false end
|
||||
local options = {
|
||||
{ label = string.format(Lang.targets.CornerSell.sell, amount, GetLabel(item), price), icon ="fa-solid fa-money-bill",
|
||||
action = function() sellDrug(item, amount, price, targ) end,
|
||||
canInteract = function()
|
||||
if not targbusy then return true end end,
|
||||
},
|
||||
{ label = Lang.targets.CornerSell.deny, icon = "fa-solid fa-person-harassing",
|
||||
action = function() deny(targ) end,
|
||||
canInteract = function()
|
||||
if not targbusy then return true end end,
|
||||
},
|
||||
}
|
||||
AddMultiModel(targ, options, nil)
|
||||
repeat
|
||||
Wait(1000)
|
||||
until sold
|
||||
if sold then sold = false return true 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)
|
||||
end
|
||||
end)
|
||||
end
|
||||
end
|
||||
|
||||
local function SellToPed(ped)
|
||||
hasTarget = true
|
||||
|
||||
for i = 1, #lastPed, 1 do
|
||||
if lastPed[i] == ped then
|
||||
hasTarget = false
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
local successChance = math.random(1, 100)
|
||||
local scamChance = math.random(1, 100)
|
||||
local getRobbed = math.random(1, 100)
|
||||
if successChance <= 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)
|
||||
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)
|
||||
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
|
||||
if not GetCops(QBConfig.MinimumDrugSalePolice) then return end
|
||||
if inZone then Notify(Lang.Cornerselling.no, 'error') return end
|
||||
local item, amount, price = lib.callback.await('md-drugs:server:cornerselling:getAvailableDrugs', false)
|
||||
if item ~= 'nothing' then
|
||||
if sell then
|
||||
Notify(Lang.Cornerselling.stop, 'error')
|
||||
sell = false
|
||||
else
|
||||
QBCore.Functions.Notify("not enough pork", "error")
|
||||
sell = true
|
||||
Notify(Lang.Cornerselling.start, 'success')
|
||||
repeat
|
||||
Wait(1000)
|
||||
if not Cornersell() then end
|
||||
until not sell
|
||||
end
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent('police:SetCopCount', function(amount)
|
||||
CurrentCops = amount
|
||||
end)
|
||||
|
||||
RegisterNetEvent('md-drugs:client:refreshAvailableDrugs', function(items)
|
||||
availableDrugs = items
|
||||
if availableDrugs == nil or #availableDrugs <= 0 then
|
||||
QBCore.Functions.Notify("no Drugs", 'error')
|
||||
cornerselling = false
|
||||
LocalPlayer.state:set("inv_busy", false, true)
|
||||
else
|
||||
Notify(Lang.Cornerselling.nodrugs, 'error')
|
||||
end
|
||||
end)
|
||||
|
||||
CreateThread(function()
|
||||
for k, v in pairs (QBConfig.NoSellZones) do
|
||||
local box = lib.zones.box({ coords = v.loc, size = vec3(v.width, v.length, v.height), rotation = 180.0, debug = true,
|
||||
onEnter = function() inZone = true end, onExit = function() inZone = false end})
|
||||
end
|
||||
end)
|
||||
@@ -1,40 +1,18 @@
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
|
||||
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)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:makecrackone", function(data)
|
||||
if not ItemCheck('bakingsoda') then return end
|
||||
if not minigame() then TriggerServerEvent("md-drugs:server:failcrackone", data.data) return end
|
||||
if not progressbar(Lang.Crack.cookcrack, 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:makecrackone", data.data)
|
||||
end)
|
||||
|
||||
|
||||
RegisterNetEvent("md-drugs:client:bagcrack")
|
||||
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)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:bagcrack", function(data)
|
||||
if not ItemCheck('empty_weed_bag') then return end
|
||||
if not progressbar(Lang.Crack.bagcrack, 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:bagcrack", data.data)
|
||||
end)
|
||||
|
||||
@@ -1,351 +1,59 @@
|
||||
QBCore = exports['qb-core']:GetCoreObject()
|
||||
local currentDealer = nil
|
||||
local dealerIsHome = false
|
||||
local waitingDelivery = nil
|
||||
local activeDelivery = nil
|
||||
local deliveryTimeout = 0
|
||||
local waitingKeyPress = false
|
||||
local dealerCombo = nil
|
||||
local drugDeliveryZone
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
local isActive = false
|
||||
|
||||
-- Handlers
|
||||
|
||||
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
|
||||
RegisterNetEvent('md-drugs:client:opendealermenu', function()
|
||||
local rep = GetRep()
|
||||
makeMenu('dealermenu', rep)
|
||||
lib.showContext('dealermenu')
|
||||
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
|
||||
end
|
||||
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
|
||||
CreateThread(function()
|
||||
local dealer = {}
|
||||
local getDealers = lib.callback.await('md-drugs:server:getDealers', false)
|
||||
for k,v in pairs(getDealers) do
|
||||
local Ped = "g_m_y_famdnf_01"
|
||||
RequestModel(Ped)
|
||||
while not HasModelLoaded(Ped) do
|
||||
Wait(0)
|
||||
end
|
||||
|
||||
testdealer = CreatePed(0, Ped,v.coords.x,v.coords.y,v.coords.z-1, 90.0, false, false)
|
||||
FreezeEntityPosition(testdealer, true)
|
||||
SetEntityInvincible(testdealer, true)
|
||||
exports["qb-target"]:AddBoxZone("dealer_"..k, vector3(v.coords.x, v.coords.y, v.coords.z), 1.5, 1.5, {
|
||||
name = "dealer_"..k,
|
||||
heading = v.heading,
|
||||
minZ = v.coords.z - 1,
|
||||
maxZ = v.coords.z + 1,
|
||||
debugPoly = false,
|
||||
}, {
|
||||
options = {
|
||||
{
|
||||
icon = 'fas fa-user-secret',
|
||||
label = "Deliver",
|
||||
action = function()
|
||||
RequestDelivery()
|
||||
end,
|
||||
canInteract = function()
|
||||
GetClosestDealer()
|
||||
local hours = GetClockHours()
|
||||
local min = 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
|
||||
end
|
||||
end
|
||||
}
|
||||
lib.requestModel(Ped, Config.RequestModelTime)
|
||||
local loc = json.decode(v.coords)
|
||||
dealer[k] = CreatePed(0, Ped,loc.x,loc.y, loc.z-1, loc.h, false, false)
|
||||
Freeze(dealer[k], true, loc.h)
|
||||
local options = {
|
||||
{ icon = 'fas fa-user-secret', label = string.format(Lang.targets.Delivery.Deliver, v.name),
|
||||
action = function()
|
||||
local bool, item, amount, coords = lib.callback.await('md-drugs:server:GetDeliveryItem', false, k)
|
||||
if bool then
|
||||
Email(Lang.Delivery.emailn, Lang.Delivery.emailsub, string.format(Lang.Delivery.emailcon, amount, GetLabel(item)))
|
||||
TriggerEvent('md-drugs:client:setLocation', {bool = bool, item = item, amount = amount, coords = coords})
|
||||
end
|
||||
end,
|
||||
},
|
||||
distance = 1.5
|
||||
})
|
||||
end
|
||||
{ icon = "fa-solid fa-store", label = string.format(Lang.targets.Delivery.open, v.name),
|
||||
action = function() TriggerEvent('md-drugs:client:opendealermenu') end,
|
||||
}
|
||||
}
|
||||
AddMultiModel(dealer[k], options)
|
||||
end
|
||||
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"
|
||||
})
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterCommand('checkrep', function()
|
||||
local drugrep = QBCore.Functions.GetPlayerData().metadata["dealerrep"]
|
||||
QBCore.Functions.Notify("Current Rep: "..drugrep)
|
||||
RegisterNetEvent('md-drugs:client:setLocation', function(data)
|
||||
local coord = json.decode(data.coords)
|
||||
SetNewWaypoint(coord.x, coord.y)
|
||||
if isActive then return end
|
||||
isActive = true
|
||||
local Buyer = CreatePed(0, "g_m_y_famdnf_01",coord.x, coord.y, coord.z-1, 180.0, false, false)
|
||||
Freeze(Buyer, true, 180)
|
||||
AddSingleModel(Buyer, {
|
||||
icon = 'fas fa-user-secret',
|
||||
label = Lang.targets.Delivery.hand,
|
||||
action = function()
|
||||
if not progressbar(Lang.Delivery.pack, 4000, 'uncuff') then return end
|
||||
isActive = false
|
||||
DeletePed(Buyer)
|
||||
TriggerServerEvent('md-drugs:server:giveDeliveryItems', data.item, data.amount)
|
||||
end,
|
||||
canInteract = function()
|
||||
if isActive then
|
||||
return true
|
||||
end
|
||||
end
|
||||
}, nil)
|
||||
end)
|
||||
@@ -0,0 +1,587 @@
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
|
||||
local progressbartype = Config.progressbartype
|
||||
local minigametype = Config.minigametype
|
||||
local notifytype = Config.Notify
|
||||
local dispatch = Config.Dispatch
|
||||
|
||||
function progressbar(text, time, anim)
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {anim})
|
||||
if progressbartype == 'oxbar' then
|
||||
if lib.progressBar({ duration = time, label = text, useWhileDead = false, canCancel = true, disable = { car = true, move = true},}) then
|
||||
if GetResourceState('scully_emotemenu') == 'started' then
|
||||
exports.scully_emotemenu:cancelEmote()
|
||||
else
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {"c"})
|
||||
end
|
||||
return true
|
||||
end
|
||||
elseif progressbartype == 'oxcir' then
|
||||
if lib.progressCircle({ duration = time, label = text, useWhileDead = false, canCancel = true, position = 'bottom', disable = { car = true,move = true},}) then
|
||||
if GetResourceState('scully_emotemenu') == 'started' then
|
||||
exports.scully_emotemenu:cancelEmote()
|
||||
else
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {"c"})
|
||||
end
|
||||
return true
|
||||
end
|
||||
elseif progressbartype == 'qb' then
|
||||
local test = false
|
||||
local cancelled = false
|
||||
QBCore.Functions.Progressbar("drink_something", text, time, false, true, { disableMovement = true, disableCarMovement = true, disableMouse = false, disableCombat = true, disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
test = true
|
||||
if GetResourceState('scully_emotemenu') == 'started' then
|
||||
exports.scully_emotemenu:cancelEmote()
|
||||
else
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {"c"})
|
||||
end
|
||||
end, function()
|
||||
cancelled = true
|
||||
if GetResourceState('scully_emotemenu') == 'started' then
|
||||
exports.scully_emotemenu:cancelEmote()
|
||||
else
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {"c"})
|
||||
end
|
||||
end)
|
||||
repeat
|
||||
Wait(100)
|
||||
until cancelled or test
|
||||
if test then return true end
|
||||
else
|
||||
print"^1 SCRIPT ERROR: Md-DRUGS set your progressbar with one of the options!"
|
||||
end
|
||||
end
|
||||
|
||||
function loadParticle(dict)
|
||||
if not HasNamedPtfxAssetLoaded(dict) then
|
||||
RequestNamedPtfxAsset(dict)
|
||||
end
|
||||
while not HasNamedPtfxAssetLoaded(dict) do
|
||||
Wait(0)
|
||||
end
|
||||
SetPtfxAssetNextCall(dict)
|
||||
end
|
||||
|
||||
function LoadModel(hash)
|
||||
RequestModel(hash)
|
||||
while not HasModelLoaded(hash) do
|
||||
Wait(0)
|
||||
end
|
||||
end
|
||||
|
||||
function minigame()
|
||||
local time = 0
|
||||
local game = Config.Minigames
|
||||
if minigametype == 'ps_circle' then
|
||||
local check
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
check = success
|
||||
end, game['ps_circle'].amount, game['ps_circle'].speed)
|
||||
return check
|
||||
elseif minigametype == 'ps_maze' then
|
||||
local check
|
||||
exports['ps-ui']:Maze(function(success)
|
||||
check = success
|
||||
end, game['ps_maze'].timelimit)
|
||||
return check
|
||||
elseif minigametype == 'ps_scrambler' then
|
||||
local check
|
||||
exports['ps-ui']:Scrambler(function(success)
|
||||
check = success
|
||||
end, game['ps_scrambler'].type, game['ps_scrambler'].time, game['ps_scrambler'].mirrored)
|
||||
return check
|
||||
elseif minigametype == 'ps_var' then
|
||||
local check
|
||||
exports['ps-ui']:VarHack(function(success)
|
||||
check = success
|
||||
end, game['ps_var'].numBlocks, game['ps_var'].time)
|
||||
return check
|
||||
elseif minigametype == 'ps_thermite' then
|
||||
local check
|
||||
exports['ps-ui']:Thermite(function(success)
|
||||
check = success
|
||||
end, game['ps_thermite'].time, game['ps_thermite'].gridsize, game['ps_thermite'].incorrect)
|
||||
return check
|
||||
elseif minigametype == 'ox' then
|
||||
local success = lib.skillCheck(game['ox'], {'1', '2', '3', '4'})
|
||||
return success
|
||||
elseif minigametype == 'blcirprog' then
|
||||
local success = exports.bl_ui:CircleProgress(game['blcirprog'].amount, game['blcirprog'].speed)
|
||||
return success
|
||||
elseif minigametype == 'blprog' then
|
||||
local success = exports.bl_ui:Progress(game['blprog'].amount, game['blprog'].speed)
|
||||
return success
|
||||
elseif minigametype == 'blkeyspam' then
|
||||
local success = exports.bl_ui:KeySpam(game['blkeyspam'].amount, game['blprog'].difficulty)
|
||||
return success
|
||||
elseif minigametype == 'blkeycircle' then
|
||||
local success = exports.bl_ui:KeyCircle(game['blkeycircle'].amount, game['blkeycircle'].difficulty, game['blkeycircle'].keynumbers)
|
||||
return success
|
||||
elseif minigametype == 'blnumberslide' then
|
||||
local success = exports.bl_ui:NumberSlide(game['blnumberslide'].amount, game['blnumberslide'].difficulty, game['blnumberslide'].keynumbers)
|
||||
return success
|
||||
elseif minigametype == 'blrapidlines' then
|
||||
local success = exports.bl_ui:RapidLines(game['blrapidlines'].amount, game['blrapidlines'].difficulty, game['blrapidlines'].numberofline)
|
||||
return success
|
||||
elseif minigametype == 'blcircleshake' then
|
||||
local success = exports.bl_ui:CircleShake(game['blcircleshake'].amount, game['blcircleshake'].difficulty, game['blcircleshake'].stages)
|
||||
return success
|
||||
elseif minigametype == 'glpath' then
|
||||
local settings = {gridSize = game['glpath'].gridSize, lives = game['glpath'].lives, timeLimit = game['glpath'].timelimit}
|
||||
local successes = false
|
||||
exports["glow_minigames"]:StartMinigame(function(success)
|
||||
if success then successes = true else successes = false end
|
||||
end, "path", settings)
|
||||
repeat
|
||||
Wait(1000)
|
||||
time = time + 1
|
||||
until successes or time == 100
|
||||
if successes then return true end
|
||||
elseif minigametype == 'glspot' then
|
||||
local settings = {gridSize = game['glspot'].gridSize, timeLimit = game['glspot'].gridSize, charSet = game['glspot'].charSet, required = game['glspot'].required}
|
||||
local successes = false
|
||||
exports["glow_minigames"]:StartMinigame(function(success)
|
||||
if success then successes = true else successes = false end
|
||||
end, "spot", settings)
|
||||
repeat
|
||||
Wait(1000)
|
||||
time = time + 1
|
||||
until successes or time == 100
|
||||
elseif minigametype == 'glmath' then
|
||||
local settings = {timeLimit = game['glmath'].timeLimit}
|
||||
local successes = false
|
||||
exports["glow_minigames"]:StartMinigame(function(success)
|
||||
if success then successes = true else successes = false end
|
||||
end, "math", settings)
|
||||
repeat
|
||||
Wait(1000)
|
||||
time = time + 1
|
||||
until successes or time == 100
|
||||
elseif minigametype == 'none' then
|
||||
return true
|
||||
else
|
||||
print"^1 SCRIPT ERROR: Md-Drugs set your minigame with one of the options!"
|
||||
end
|
||||
end
|
||||
|
||||
function Notify(text, type)
|
||||
if notifytype =='ox' then
|
||||
lib.notify({title = text, type = type})
|
||||
elseif notifytype == 'qb' then
|
||||
QBCore.Functions.Notify(text, type)
|
||||
elseif notifytype == 'okok' then
|
||||
exports['okokNotify']:Alert('', text, 4000, type, false)
|
||||
else
|
||||
print"^1 SCRIPT ERROR: Md-DRUGS set your notification with one of the options!"
|
||||
end
|
||||
end
|
||||
|
||||
function GetImage(img)
|
||||
if GetResourceState('ox_inventory') == 'started' then
|
||||
local Items = exports['ox_inventory']:Items()
|
||||
local itemClient = Items[img] and Items[img]['client']
|
||||
if itemClient and itemClient['image'] then
|
||||
return itemClient['image']
|
||||
else
|
||||
return "nui://ox_inventory/web/images/" .. img .. '.png'
|
||||
end
|
||||
end
|
||||
local invs = {
|
||||
['ps-inventory'] = "nui://ps-inventory/html/images/",
|
||||
['lj-inventory'] = "nui://lj-inventory/html/images/",
|
||||
['qb-inventory'] = "nui://qb-inventory/html/images/",
|
||||
['qs-inventory'] = "nui://qs-inventory/html/img/",
|
||||
['origen_inventory'] = "nui://origen_inventory/html/img/",
|
||||
['core_inventory'] = "nui://core_inventory/html/img/"
|
||||
}
|
||||
for k, v in pairs(invs) do
|
||||
if GetResourceState(k) == 'started' then
|
||||
return v .. QBCore.Shared.Items[img].image
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function GetLabel(label)
|
||||
if GetResourceState('ox_inventory') == 'started' then
|
||||
local Items = exports['ox_inventory']:Items()
|
||||
return Items[label]['label']
|
||||
else
|
||||
return QBCore.Shared.Items[label]['label']
|
||||
end
|
||||
end
|
||||
|
||||
function GetRep()
|
||||
local rep = lib.callback.await('md-drugs:server:GetRep', false)
|
||||
return rep
|
||||
end
|
||||
|
||||
|
||||
function sorter(sorting, value)
|
||||
table.sort(sorting, function(a, b) return a[value] < b[value] end)
|
||||
end
|
||||
|
||||
function makeMenu(name, rep)
|
||||
local menu = {}
|
||||
local data = lib.callback.await('md-drugs:server:menu', false, name)
|
||||
for k, v in pairs (data.table) do
|
||||
local allow = false
|
||||
if rep == nil then
|
||||
allow = true
|
||||
else
|
||||
if rep.dealerrep >= v.minrep then allow = true end
|
||||
end
|
||||
if allow then
|
||||
menu[#menu + 1] = {
|
||||
icon = GetImage(v.name),
|
||||
description = '$'.. v.price,
|
||||
title = GetLabel(v.name),
|
||||
onSelect = function()
|
||||
local settext = "Cost: $"..v.price
|
||||
local dialog = exports.ox_lib:inputDialog(v.name .."!", {
|
||||
{ type = 'select', label = "Payment Type", default = "cash", options = { { value = "cash"}, { value = "bank"},}},
|
||||
{ type = 'number', label = "Amount to buy", description = settext, min = 0, max = v.amount, default = 1 },
|
||||
})
|
||||
if not dialog[1] then return end
|
||||
TriggerServerEvent("md-drugs:server:purchaseGoods", dialog[2], dialog[1], v.name, v.price, data.table, k)
|
||||
end,
|
||||
}
|
||||
end
|
||||
end
|
||||
sorter(menu, 'title')
|
||||
lib.registerContext({id = data.id, title = data.title, options = menu})
|
||||
end
|
||||
|
||||
|
||||
function ItemCheck(item)
|
||||
if GetResourceState('ox_inventory') == 'started' then
|
||||
if exports.ox_inventory:GetItemCount(item) >= 1 then return true else Notify('You Need ' .. GetLabel(item) .. " !", 'error') return false end
|
||||
else
|
||||
if QBCore.Shared.Items[item] == nil then print("There Is No " .. item .. " In Your QB Items.lua") return end
|
||||
if QBCore.Functions.HasItem(item) then return true else Notify('You Need ' .. QBCore.Shared.Items[item].label .. " !", 'error') return false end
|
||||
end
|
||||
end
|
||||
|
||||
function ItemCheckMulti(item)
|
||||
local need = 0
|
||||
local has = 0
|
||||
for k,v in pairs (item) do
|
||||
need = need + 1
|
||||
if GetResourceState('ox_inventory') == 'started' then
|
||||
if exports.ox_inventory:GetItemCount(v) >= 1 then has = has + 1 else Notify('You Need ' .. GetLabel(v) .. " !", 'error') end
|
||||
else
|
||||
if QBCore.Shared.Items[v] == nil then print("There Is No " .. item .. " In Your QB Items.lua") return end
|
||||
if QBCore.Functions.HasItem(v) then has = has + 1 else Notify('You Need ' .. QBCore.Shared.Items[v].label .. " !", 'error') end
|
||||
end
|
||||
end
|
||||
if need == has then
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
function Email(sender, subject, message)
|
||||
if Config.Phone == 'yflip' then
|
||||
local receiver = GetPlayerServerId(PlayerId())
|
||||
local insertId, received = exports["yflip-phone"]:SendMail({
|
||||
title = subject,
|
||||
sender = sender,
|
||||
senderDisplayName = sender,
|
||||
content = message,
|
||||
}, 'phoneNumber', receiver)
|
||||
elseif Config.Phone == 'qs' then
|
||||
TriggerServerEvent('qs-smartphone:server:sendNewMail', {
|
||||
sender = sender,
|
||||
subject = subject,
|
||||
message = message,
|
||||
button = {}
|
||||
})
|
||||
else
|
||||
TriggerServerEvent('qb-phone:server:sendNewMail', {
|
||||
sender = sender,
|
||||
subject = subject,
|
||||
message = message,
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
function PoliceCall(chance)
|
||||
local math = math.random(1,100)
|
||||
if math <= chance then
|
||||
if dispatch == 'ps' then
|
||||
exports['ps-dispatch']:DrugSale()
|
||||
elseif dispatch == 'cd' then
|
||||
local data = exports['cd_dispatch']:GetPlayerInfo()
|
||||
TriggerServerEvent('cd_dispatch:AddNotification', {
|
||||
job_table = {'police', },
|
||||
coords = data.coords,
|
||||
title = '420-69 Drug Sale',
|
||||
message = 'A '..data.sex..' robbing a store at '..data.street,
|
||||
flash = 0,
|
||||
unique_id = data.unique_id,
|
||||
sound = 1,
|
||||
blip = { sprite = 431, scale = 1.2, colour = 3, flashes = false, text = '420-69 Drug Sale', time = 5, radius = 0,}
|
||||
})
|
||||
elseif dispatch == 'core' then
|
||||
exports['core_dispatch']:addCall("420-69", "Drugs Are Being Sold", {
|
||||
{icon="fa-ruler", info="4.5 MILES"},
|
||||
}, {GetEntityCoords(PlayerPedId())}, "police", 3000, 11, 5 )
|
||||
elseif dispatch == 'aty' then
|
||||
exports["aty_dispatch"]:SendDispatch('Drug Sale', '420-69', 40, {'police'})
|
||||
elseif dispatch == 'qs' then
|
||||
exports['qs-dispatch']:DrugSale()
|
||||
else
|
||||
print('Congrats, You Choose 0 of the options :)')
|
||||
end
|
||||
else
|
||||
end
|
||||
end
|
||||
|
||||
function GetCops(number)
|
||||
if number == 0 then return true end
|
||||
local amount = lib.callback.await('md-drugs:server:GetCoppers', false)
|
||||
if amount >= number then return true else Notify('You Need '.. number - amount .. ' More Cops To Do This', 'error') end
|
||||
end
|
||||
|
||||
|
||||
function Freeze(entity, toggle, head)
|
||||
SetEntityInvincible(entity, toggle)
|
||||
SetEntityAsMissionEntity(entity, toggle, toggle)
|
||||
FreezeEntityPosition(entity, toggle)
|
||||
SetEntityHeading(entity, head)
|
||||
SetBlockingOfNonTemporaryEvents(entity, toggle)
|
||||
end
|
||||
|
||||
function tele(coords)
|
||||
DoScreenFadeOut(500)
|
||||
Wait(1000)
|
||||
SetEntityCoords(PlayerPedId(),coords.x, coords.y, coords.z)
|
||||
Wait(1000)
|
||||
DoScreenFadeIn(500)
|
||||
end
|
||||
|
||||
|
||||
function AddBoxZoneSingle(name, loc, data)
|
||||
if Config.Target == 'qb' then
|
||||
exports['qb-target']:AddBoxZone(name, loc, 1.5, 1.75, {name = name, minZ = loc.z-1,maxZ = loc.z +1},
|
||||
{ options = {
|
||||
{
|
||||
type = data.type or nil,
|
||||
event = data.event or nil,
|
||||
action = data.action or nil,
|
||||
icon = data.icon,
|
||||
label = data.label,
|
||||
data = data.data,
|
||||
canInteract = data.canInteract,
|
||||
}
|
||||
},
|
||||
distance = 2.0
|
||||
})
|
||||
elseif Config.Target == 'ox' then
|
||||
exports.ox_target:addBoxZone({coords = loc, size = vec3(1,1,1), options = {
|
||||
{
|
||||
type = data.type or nil,
|
||||
event = data.event or nil,
|
||||
onSelect = data.action or nil,
|
||||
distance = 2.5,
|
||||
icon = data.icon,
|
||||
label = data.label,
|
||||
data = data.data,
|
||||
canInteract = data.canInteract,
|
||||
}
|
||||
}, })
|
||||
end
|
||||
end
|
||||
|
||||
function AddBoxZoneMulti(name, table, data)
|
||||
for k, v in pairs (table) do
|
||||
if v.gang == nil or v.gang == '' or v.gang == "" then v.gang = 1 end
|
||||
if Config.Target == 'qb' then
|
||||
exports['qb-target']:AddBoxZone(name .. k, v.loc, 1.5, 1.75, {name = name..k, minZ = v.loc.z-1.50,maxZ = v.loc.z +1.5},
|
||||
{ options = {
|
||||
{
|
||||
type = data.type or nil,
|
||||
event = data.event or nil,
|
||||
action = data.action or nil,
|
||||
icon = data.icon,
|
||||
label = data.label,
|
||||
data = k,
|
||||
canInteract = data.canInteract or function()
|
||||
if QBCore.Functions.GetPlayerData().gang.name == v.gang or v.gang == 1 then return true end end
|
||||
}
|
||||
},
|
||||
distance = 2.5
|
||||
})
|
||||
elseif Config.Target == 'ox' then
|
||||
exports.ox_target:addBoxZone({coords = v.loc, size = vec3(1,1,1), options = {
|
||||
{
|
||||
type = data.type or nil,
|
||||
event = data.event or nil,
|
||||
onSelect = data.action or nil,
|
||||
icon = data.icon,
|
||||
label = data.label,
|
||||
data = k,
|
||||
distance = 2.5,
|
||||
canInteract = data.canInteract or function()
|
||||
if QBCore.Functions.GetPlayerData().gang.name == v.gang or v.gang == 1 then return true end end
|
||||
}
|
||||
}, })
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function AddBoxZoneMultiOptions(name, loc, data)
|
||||
if Config.Target == 'qb' then
|
||||
exports['qb-target']:AddBoxZone(name , loc, 1.5, 1.75, {name = name, minZ = loc.z-1.50,maxZ = loc.z +1.5},
|
||||
{ options = data, distance = 2.5})
|
||||
elseif Config.Target == 'ox' then
|
||||
exports.ox_target:addBoxZone({coords = loc, size = vec3(1,1,1), options = data })
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function AddSingleModel(model, data, num)
|
||||
if Config.Target == 'qb' then
|
||||
exports['qb-target']:AddTargetEntity(model, {options = {
|
||||
{icon = data.icon, label = data.label, event = data.event or nil, action = data.action or nil, data = num }
|
||||
}, distance = 2.5})
|
||||
elseif Config.Target == 'ox' then
|
||||
exports.ox_target:addLocalEntity(model, {icon = data.icon, label = data.label, event = data.event or nil, onSelect = data.action or nil, data = num, distance = 2.5 })
|
||||
end
|
||||
end
|
||||
|
||||
function AddMultiModel(model, data, num)
|
||||
local options = {}
|
||||
for k, v in pairs (data) do
|
||||
table.insert(options,{
|
||||
icon = v.icon, label = v.label, event = v.event or nil, action = v.action or nil,
|
||||
onSelect = v.action,data = v.data,canInteract = v.canInteract or nil, distance = 2.0,
|
||||
})
|
||||
end
|
||||
if Config.Target == 'qb' then
|
||||
exports['qb-target']:AddTargetEntity(model, {options = options, distance = 2.5})
|
||||
elseif Config.Target == 'ox' then
|
||||
exports.ox_target:addLocalEntity(model, options)
|
||||
end
|
||||
end
|
||||
|
||||
local created = false
|
||||
local heading = 180.0
|
||||
function StartRay()
|
||||
local run = true
|
||||
local pedcoord = GetEntityCoords(PlayerPedId())
|
||||
local table = CreateObject('v_ret_ml_tablea', pedcoord.x, pedcoord.y, pedcoord.z+1, heading, false, false)
|
||||
repeat
|
||||
local hit, entityHit, endCoords, surfaceNormal, matHash = lib.raycast.cam(511, 4, 10)
|
||||
if not created then
|
||||
created = true
|
||||
lib.showTextUI([[[E] To Place
|
||||
[DEL] To Cancel
|
||||
[<-] To Move Left
|
||||
[->] To Move Right]])
|
||||
else
|
||||
SetEntityCoords(table, endCoords.x, endCoords.y, endCoords.z+1)
|
||||
SetEntityHeading(table, heading)
|
||||
SetEntityCollision(table, false, false)
|
||||
SetEntityAlpha(table, 100)
|
||||
end
|
||||
if IsControlPressed(0, 174) then
|
||||
heading = heading - 2
|
||||
end
|
||||
if IsControlPressed(0, 175) then
|
||||
heading = heading + 2
|
||||
end
|
||||
if IsControlPressed(0, 38) then
|
||||
lib.hideTextUI()
|
||||
run = false
|
||||
DeleteObject(table)
|
||||
created = false
|
||||
return endCoords, heading
|
||||
end
|
||||
|
||||
if IsControlPressed(0, 178) then
|
||||
lib.hideTextUI()
|
||||
run = false
|
||||
created = false
|
||||
DeleteObject(table)
|
||||
return nil, nil
|
||||
end
|
||||
Wait(0)
|
||||
until run == false
|
||||
end
|
||||
|
||||
function StartRay2()
|
||||
local run = true
|
||||
local pedcoord = GetEntityCoords(PlayerPedId())
|
||||
local table = CreateObject('bkr_prop_coke_press_01aa', pedcoord.x, pedcoord.y, pedcoord.z+1, heading, false, false)
|
||||
repeat
|
||||
local hit, entityHit, endCoords, surfaceNormal, matHash = lib.raycast.cam(511, 4, 10)
|
||||
if not created then
|
||||
created = true
|
||||
lib.showTextUI([[[E] To Place
|
||||
[DEL] To Cancel
|
||||
[<-] To Move Left
|
||||
[->] To Move Right]])
|
||||
else
|
||||
SetEntityCoords(table, endCoords.x, endCoords.y, endCoords.z+1)
|
||||
SetEntityHeading(table, heading)
|
||||
SetEntityCollision(table, false, false)
|
||||
SetEntityAlpha(table, 100)
|
||||
end
|
||||
if IsControlPressed(0, 174) then
|
||||
heading = heading - 2
|
||||
end
|
||||
if IsControlPressed(0, 175) then
|
||||
heading = heading + 2
|
||||
end
|
||||
if IsControlPressed(0, 38) then
|
||||
lib.hideTextUI()
|
||||
run = false
|
||||
DeleteObject(table)
|
||||
created = false
|
||||
return endCoords, heading
|
||||
end
|
||||
|
||||
if IsControlPressed(0, 178) then
|
||||
lib.hideTextUI()
|
||||
run = false
|
||||
created = false
|
||||
DeleteObject(table)
|
||||
return nil, nil
|
||||
end
|
||||
Wait(0)
|
||||
until run == false
|
||||
end
|
||||
|
||||
|
||||
RegisterNetEvent('QBCore:Client:OnPlayerLoaded', function()
|
||||
Wait(3000)
|
||||
LoadModel('prop_plant_01b') TriggerEvent('heroin:init')
|
||||
LoadModel('prop_plant_01a') TriggerEvent('coke:init')
|
||||
LoadModel('prop_cactus_03') TriggerEvent('Mescaline:init')
|
||||
LoadModel('mushroom') TriggerEvent('shrooms:init')
|
||||
LoadModel('bkr_prop_weed_lrg_01b') TriggerEvent('weed:init')
|
||||
local check = lib.callback.await('md-drugs:server:GetRep', false)
|
||||
|
||||
return
|
||||
end)
|
||||
|
||||
AddEventHandler('onResourceStart', function(resource)
|
||||
if resource == GetCurrentResourceName() then
|
||||
LoadModel('prop_plant_01b') TriggerEvent('heroin:init')
|
||||
LoadModel('prop_plant_01a') TriggerEvent('coke:init')
|
||||
LoadModel('prop_cactus_03') TriggerEvent('Mescaline:init')
|
||||
LoadModel('mushroom') TriggerEvent('shrooms:init')
|
||||
LoadModel('bkr_prop_weed_lrg_01b') TriggerEvent('weed:init')
|
||||
end
|
||||
end)
|
||||
local active = false
|
||||
RegisterNetEvent('md-drugs:client:minusTier', function(data)
|
||||
if active then return end
|
||||
if not data then return end
|
||||
active = true
|
||||
if not progressbar('Cutting This ' ..GetLabel(data.item) .. ' More', 4000, 'uncuff') then return end
|
||||
TriggerServerEvent('md-drugs:server:AddMas', data)
|
||||
active = false
|
||||
end)
|
||||
@@ -1,134 +1,59 @@
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
local CocaPlant = {}
|
||||
local PoppyPlants = {}
|
||||
local herointable = false
|
||||
|
||||
function LoadModel(hash)
|
||||
hash = GetHashKey(hash)
|
||||
RequestModel(hash)
|
||||
while not HasModelLoaded(hash) do
|
||||
Wait(3000)
|
||||
end
|
||||
end
|
||||
local 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)
|
||||
local options = {
|
||||
{ event = "md-drugs:client:heatliquidheroin", icon = "fa-solid fa-temperature-high", label = Lang.targets.heroin.cook, data = heroinlabkit},
|
||||
{ event = "md-drugs:client:getheroinkitback", icon = "fas fa-box-circle-check", label = Lang.targets.heroin.up, data = heroinlabkit, canInteract = function() if herointable then return true end end},
|
||||
}
|
||||
AddMultiModel(heroinlabkit, options, heroinlabkit)
|
||||
end
|
||||
|
||||
local function loadParticle(dict)
|
||||
if not HasNamedPtfxAssetLoaded(dict) then
|
||||
RequestNamedPtfxAsset(dict)
|
||||
end
|
||||
while not HasNamedPtfxAssetLoaded(dict) do
|
||||
Wait(0)
|
||||
end
|
||||
SetPtfxAssetNextCall(dict)
|
||||
local function pickher(loc)
|
||||
if not progressbar(Lang.Heroin.pick, 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("heroin:pickupCane", loc)
|
||||
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
|
||||
})
|
||||
lib.requestModel("g_m_y_famdnf_01", Config.RequestModelTime)
|
||||
local labkitlocation = Config.buyheroinlabkit
|
||||
local heroinkitdealer = CreatePed(0, Ped, labkitlocation.x, labkitlocation.y, labkitlocation.z-1, labkitlocation.w, false, false)
|
||||
Freeze(heroinkitdealer, true, labkitlocation.w)
|
||||
AddSingleModel(heroinkitdealer, { label = Lang.targets.heroin.kit, icon = "fa-solid fa-money-bill", event = "md-drugs:client:buyheroinlabkit", distance = 2.0}, nil )
|
||||
end)
|
||||
|
||||
---- plant spawns dont edit
|
||||
RegisterNetEvent('heroin:respawnCane', function(loc)
|
||||
local v = GlobalState.PoppyPlants[loc]
|
||||
local hash = GetHashKey(v.model)
|
||||
--if not HasModelLoaded(hash) then LoadModel(hash) end
|
||||
if not PoppyPlants[loc] then
|
||||
PoppyPlants[loc] = CreateObject(hash, v.location, false, true, true)
|
||||
SetEntityAsMissionEntity(PoppyPlants[loc], true, true)
|
||||
FreezeEntityPosition(PoppyPlants[loc], true)
|
||||
SetEntityHeading(PoppyPlants[loc], v.heading)
|
||||
exports['qb-target']:AddTargetEntity(PoppyPlants[loc], {
|
||||
options = { {
|
||||
icon = "fas fa-hand",
|
||||
label = "pick Poppies",
|
||||
action = function()
|
||||
QBCore.Functions.Progressbar("pick_cane", "picking heroin", 2000, false, true, {
|
||||
disableMovement = true, disableCarMovement = true, disableMouse = false, disableCombat = true, },
|
||||
{ animDict = 'amb@prop_human_bum_bin@idle_a', anim = 'idle_a', flags = 47, },
|
||||
{}, {}, function()
|
||||
TriggerServerEvent("heroin:pickupCane", loc)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end, function() -- Cancel
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
end
|
||||
}
|
||||
},
|
||||
distance = 3.0
|
||||
})
|
||||
Freeze(PoppyPlants[loc], true, v.heading)
|
||||
AddSingleModel(PoppyPlants[loc], {icon = "fa-solid fa-seedling", label = Lang.targets.heroin.pick, action = function() pickher(loc) end}, loc )
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
|
||||
RegisterNetEvent('heroin:removeCane', function(loc)
|
||||
if DoesEntityExist(PoppyPlants[loc]) then DeleteEntity(PoppyPlants[loc]) end
|
||||
PoppyPlants[loc] = nil
|
||||
end)
|
||||
|
||||
|
||||
|
||||
RegisterNetEvent("heroin:init", function()
|
||||
for k, v in pairs (GlobalState.PoppyPlants) do
|
||||
local hash = GetHashKey(v.model)
|
||||
if not HasModelLoaded(hash) then LoadModel(hash) end
|
||||
if not v.taken then
|
||||
PoppyPlants[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z, false, true, true)
|
||||
SetEntityAsMissionEntity(PoppyPlants[k], true, true)
|
||||
FreezeEntityPosition(PoppyPlants[k], true)
|
||||
SetEntityHeading(PoppyPlants[k], v.heading)
|
||||
exports['qb-target']:AddTargetEntity(PoppyPlants[k], {
|
||||
options = { {
|
||||
icon = "fas fa-hand",
|
||||
label = "Pick Poppies",
|
||||
action = function()
|
||||
QBCore.Functions.Progressbar("pick_cane", "Picking Heroin", 2000, false, true, {
|
||||
disableMovement = true, disableCarMovement = true, disableMouse = false, disableCombat = true, },
|
||||
{ animDict = 'amb@prop_human_bum_bin@idle_a', anim = 'idle_a', flags = 47, },
|
||||
{}, {}, function()
|
||||
TriggerServerEvent("heroin:pickupCane", k)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end, function() -- Cancel
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
end
|
||||
}
|
||||
},
|
||||
distance = 3.0
|
||||
})
|
||||
Freeze(PoppyPlants[k], true, v.heading)
|
||||
AddSingleModel(PoppyPlants[k], {icon = "fa-solid fa-seedling", label = Lang.targets.heroin.pick, action = function() pickher(k) end}, k )
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
AddEventHandler('onResourceStart', function(resource)
|
||||
if resource == GetCurrentResourceName() then
|
||||
LoadModel('prop_plant_01b')
|
||||
TriggerEvent('heroin:init')
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterNetEvent('QBCore:Client:OnPlayerLoaded', function()
|
||||
Wait(3000)
|
||||
LoadModel('prop_plant_01b')
|
||||
TriggerEvent('heroin:init')
|
||||
end)
|
||||
|
||||
AddEventHandler('onResourceStop', function(resourceName)
|
||||
if GetCurrentResourceName() == resourceName then
|
||||
SetModelAsNoLongerNeeded(GetHashKey('prop_plant_01b'))
|
||||
@@ -138,185 +63,77 @@ AddEventHandler('onResourceStart', function(resource)
|
||||
end
|
||||
end
|
||||
end
|
||||
DeleteObject(heroinlabkit)
|
||||
DeleteObject(dirtylabkitheroin)
|
||||
end)
|
||||
---- plant stop end
|
||||
|
||||
RegisterNetEvent("md-drugs:client:dryplant")
|
||||
AddEventHandler("md-drugs:client:dryplant", function()
|
||||
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)
|
||||
RegisterNetEvent("md-drugs:client:dryplant", function(data)
|
||||
if not progressbar(Lang.Heroin.dryout, 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:dryplant",data.data)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:buyheroinlabkit")
|
||||
AddEventHandler("md-drugs:client:buyheroinlabkit", function()
|
||||
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)
|
||||
RegisterNetEvent("md-drugs:client:cutheroin", function(data)
|
||||
if not ItemCheck('bakingsoda') then return end
|
||||
if not progressbar(Lang.Heroin.cutting, 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:cutheroin", data.data)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:setheroinlabkit")
|
||||
AddEventHandler("md-drugs:client:setheroinlabkit", function()
|
||||
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 = {
|
||||
{
|
||||
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
|
||||
})
|
||||
RegisterNetEvent("md-drugs:client:buyheroinlabkit", function()
|
||||
if not progressbar(Lang.Heroin.secret, 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:getheroinlabkit")
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:heatliquidheroin")
|
||||
AddEventHandler("md-drugs:client:heatliquidheroin", function()
|
||||
local PedCoords = GetEntityCoords(PlayerPedId())
|
||||
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)
|
||||
RegisterNetEvent("md-drugs:client:setheroinlabkit", function()
|
||||
if herointable then
|
||||
Notify(Lang.Heroin.tableout, 'error')
|
||||
else
|
||||
herointable = true
|
||||
local location, head = StartRay()
|
||||
if not location then herointable = false TriggerServerEvent('md-drugs:server:getheroinlabkitback') return end
|
||||
if not progressbar(Lang.Heroin.table, 4000, 'uncuff') then TriggerServerEvent('md-drugs:server:getheroinlabkitback') return end
|
||||
createLabKit(location, head)
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:heatliquidheroin", function(data)
|
||||
local loc, head = GetEntityCoords(data.data), GetEntityHeading(data.data)
|
||||
if not ItemCheck('emptyvial') then return end
|
||||
if not minigame() then
|
||||
TriggerServerEvent("md-drugs:server:failheatingheroin")
|
||||
DeleteObject(data.data)
|
||||
local dirtylabkitheroin = CreateObject("v_ret_ml_tablea", loc.x, loc.y, loc.z-1, true, false)
|
||||
SetEntityHeading(dirtylabkitheroin, head)
|
||||
PlaceObjectOnGroundProperly(dirtylabkitheroin)
|
||||
loadParticle("core")
|
||||
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())
|
||||
SetPedToRagdoll(PlayerPedId(), 1300, 1300, 0, 0, 0, 0)
|
||||
AddMultiModel(dirtylabkitheroin, {{event = "md-drugs:client:cleanheroinlabkit",icon = "fa-solid fa-hand-sparkles",label = Lang.targets.heroin.clean, data = dirtylabkitheroin}}, nil )
|
||||
return end
|
||||
if not progressbar(Lang.Heroin.success, 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:heatliquidheroin")
|
||||
end)
|
||||
|
||||
|
||||
RegisterNetEvent("md-drugs:client:getheroinkitback")
|
||||
AddEventHandler("md-drugs:client:getheroinkitback", function()
|
||||
DeleteObject(heroinlabkit)
|
||||
TriggerServerEvent("md-drugs:server:getheroinlabkitback")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
RegisterNetEvent("md-drugs:client:cleanheroinlabkit", function(data)
|
||||
if not ItemCheck('cleaningkit') then return end
|
||||
if not progressbar(Lang.Heroin.clean, 4000, 'clean') then return end
|
||||
TriggerServerEvent("md-drugs:server:removecleaningkitheroin", data.data)
|
||||
end)
|
||||
|
||||
|
||||
RegisterNetEvent("md-drugs:client:resetheroinkit")
|
||||
AddEventHandler("md-drugs:client:resetheroinkit", function()
|
||||
DeleteObject(heroinlabkit)
|
||||
TriggerEvent("md-drugs:server:getheroinlabkitback")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
RegisterNetEvent("md-drugs:client:deletedirtyheroin", function(data)
|
||||
local location,head = GetEntityCoords(data), GetEntityHeading(data)
|
||||
DeleteObject(data)
|
||||
createLabKit(location, head)
|
||||
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)
|
||||
RegisterNetEvent("md-drugs:client:getheroinkitback", function(data)
|
||||
if not progressbar(Lang.Heroin.pickup, 4000, 'uncuff') then return end
|
||||
herointable = false
|
||||
DeleteObject(data.data)
|
||||
TriggerServerEvent("md-drugs:server:getheroinlabkitback")
|
||||
end)
|
||||
|
||||
|
||||
RegisterNetEvent("md-drugs:client:fillneedle", function(data)
|
||||
if not minigame() then TriggerServerEvent("md-drugs:server:failheroin", data.data) return end
|
||||
if not progressbar(Lang.Heroin.needles, 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:fillneedle", data.data)
|
||||
end)
|
||||
@@ -0,0 +1,52 @@
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
|
||||
CreateThread(function()
|
||||
local current = "s_m_m_doctor_01"
|
||||
lib.requestModel(current, Config.RequestModelTime)
|
||||
local SyrupLocation = CreatePed(0, current,Config.SyrupVendor.x,Config.SyrupVendor.y,Config.SyrupVendor.z-1, Config.SyrupVendor.w, false, false)
|
||||
Freeze(SyrupLocation, true, Config.SyrupVendor.w)
|
||||
AddSingleModel(SyrupLocation, { type = "client", label = Lang.targets.lean.git, icon = "fa-solid fa-circle-info", event = "md-drugs:client:getsyruplocationtobuy", distance = 2.0}, nil )
|
||||
end)
|
||||
|
||||
|
||||
RegisterNetEvent("md-drugs:client:getsyruplocationtobuy", function()
|
||||
Notify(Lang.Lean.marked, "success")
|
||||
SpawnCarPedChase()
|
||||
end)
|
||||
|
||||
RegisterNetEvent('md-drugs:client:leancraft', function()
|
||||
local store = {}
|
||||
local label = {}
|
||||
local items = lib.callback.await('md-drugs:server:GetRecipe', false,'lean', 'cups')
|
||||
for k, v in pairs (items) do
|
||||
label = {}
|
||||
local item = ''
|
||||
for m, d in pairs (items[k].take) do table.insert(label, GetLabel(m) .. ' X ' .. d) end
|
||||
for m,d in pairs (items[k].give) do item = m end
|
||||
store[#store + 1] = {
|
||||
icon = GetImage(item),
|
||||
description = table.concat(label, ", "),
|
||||
title = GetLabel(item),
|
||||
event = 'md-drugs:client:stirlean',
|
||||
args = {
|
||||
item = item,
|
||||
recipe = 'lean',
|
||||
num = k,
|
||||
label = 'Cooking Up ' .. GetLabel(item),
|
||||
table = 'cups'
|
||||
}
|
||||
}
|
||||
sorter(store, 'title')
|
||||
lib.registerContext({id = 'leanCraft',title = "Make Lean", options = store})
|
||||
end
|
||||
lib.showContext('leanCraft')
|
||||
end)
|
||||
|
||||
local busy = false
|
||||
RegisterNetEvent('md-drugs:client:stirlean', function(data)
|
||||
if busy then return end
|
||||
busy = true
|
||||
if not progressbar(data.label, 4000, 'uncuff') then busy = false return end
|
||||
TriggerServerEvent('md-drugs:server:finishcup', data)
|
||||
busy = false
|
||||
end)
|
||||
@@ -1,415 +1,116 @@
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
local tableout = false
|
||||
|
||||
local function loadParticle(dict)
|
||||
if not HasNamedPtfxAssetLoaded(dict) then
|
||||
RequestNamedPtfxAsset(dict)
|
||||
end
|
||||
while not HasNamedPtfxAssetLoaded(dict) do
|
||||
Wait(0)
|
||||
end
|
||||
SetPtfxAssetNextCall(dict)
|
||||
|
||||
local function createLabKit(coord, head)
|
||||
local labkit = CreateObject("v_ret_ml_tablea", coord.x, coord.y, coord.z - 1, true, false)
|
||||
SetEntityHeading(labkit, head)
|
||||
PlaceObjectOnGroundProperly(labkit)
|
||||
local options = {
|
||||
{ event = "md-drugs:client:heatliquid", icon = "fa-solid fa-temperature-high", label = Lang.targets.lsd.heat, data = labkit },
|
||||
{ event = "md-drugs:client:refinequalityacid", icon = "fa-solid fa-temperature-high", label = Lang.targets.lsd.refine, data = labkit },
|
||||
{ event = "md-drugs:client:maketabpaper", icon = "fa-regular fa-note-sticky", label = Lang.targets.lsd.dab, data = labkit },
|
||||
{ event = "md-drugs:client:getlabkitback", icon = "fas fa-box-circle-check", label = Lang.targets.lsd.back, data = labkit, canInteract = function() return tableout end }
|
||||
}
|
||||
AddMultiModel(labkit, options, labkit)
|
||||
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 = {
|
||||
{
|
||||
num = 1,
|
||||
type = "client",
|
||||
event = "md-drugs:client:heatliquid",
|
||||
icon = "fas fa-box-circle-check",
|
||||
label = "Heat Liquid",
|
||||
},
|
||||
{
|
||||
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)
|
||||
local Ped = "g_m_y_famdnf_01"
|
||||
lib.requestModel(Ped, Config.RequestModelTime)
|
||||
local tabdealer = CreatePed(0, Ped,Config.buylsdlabkit.x,Config.buylsdlabkit.y,Config.buylsdlabkit.z-1, Config.buylsdlabkit.w, false, false)
|
||||
Freeze(tabdealer, true, Config.buylsdlabkit.w)
|
||||
AddSingleModel(tabdealer,{ type = "client", label = Lang.targets.lsd.buy, icon = "fa-solid fa-money-bill", event = "md-drugs:client:buylabkit", distance = 2.0}, tabdealer )
|
||||
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)
|
||||
RegisterNetEvent("md-drugs:client:getlysergic", function(data)
|
||||
if not minigame() then return end
|
||||
if not progressbar(Lang.lsd.steallys, 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:getlysergic",data.data)
|
||||
end)
|
||||
|
||||
|
||||
RegisterNetEvent("md-drugs:client:getdiethylamide", function(data)
|
||||
if not minigame() then return end
|
||||
if not progressbar(Lang.lsd.stealdie, 4000, 'uncuff') then return end
|
||||
TriggerServerEvent('md-drugs:server:getdiethylamide', data.data)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:setlsdlabkit", function()
|
||||
if tableout then
|
||||
Notify(Lang.lsd.tableout, 'error')
|
||||
TriggerServerEvent('md-drugs:server:getlabkitback')
|
||||
else
|
||||
tableout = true
|
||||
local loc, head = StartRay()
|
||||
if not loc then tableout = false TriggerServerEvent('md-drugs:server:getlabkitback') return end
|
||||
if not progressbar(Lang.lsd.place, 4000, 'uncuff') then TriggerServerEvent('md-drugs:server:getlabkitback') return end
|
||||
createLabKit(loc, head)
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:getlabkitback", function(data)
|
||||
if not progressbar(Lang.lsd.tablepack, 4000, 'uncuff') then return end
|
||||
DeleteObject(data.data)
|
||||
TriggerServerEvent('md-drugs:server:getlabkitback')
|
||||
tableout = false
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:heatliquid", function(data)
|
||||
local PedCoords, head = GetEntityCoords(data.data), GetEntityHeading(data.data)
|
||||
local dict = "scr_ie_svm_technical2"
|
||||
if not ItemCheck('lysergic_acid') then return end
|
||||
if not ItemCheck('diethylamide') then return end
|
||||
if not minigame() then
|
||||
TriggerServerEvent("md-drugs:server:failheating")
|
||||
DeleteObject(data.data)
|
||||
local dirtylabkit = CreateObject("v_ret_ml_tablea", PedCoords.x, PedCoords.y, PedCoords.z-1, true, false)
|
||||
SetEntityHeading(dirtylabkit, head)
|
||||
loadParticle(dict)
|
||||
exitPtfx = StartParticleFxLoopedOnEntity("scr_dst_cocaine", dirtylabkit, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.5, false, false, false)
|
||||
PlaceObjectOnGroundProperly(dirtylabkit)
|
||||
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",
|
||||
},
|
||||
},
|
||||
distance = 3.0
|
||||
})
|
||||
Wait(100)
|
||||
AddMultiModel(dirtylabkit, { event = "md-drugs:client:cleanlabkit", icon = "fa-solid fa-hand-sparkles", label = Lang.targets.lsd.clean, data = dirtylabkit}, nil )
|
||||
return end
|
||||
if not progressbar(Lang.lsd.heat, 7000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:heatliquid")
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:cleanlabkit", function(data)
|
||||
if not ItemCheck('cleaningkit') then return end
|
||||
if not progressbar(Lang.lsd.clean, 4000, 'clean') then return end
|
||||
local check = lib.callback.await('md-drugs:server:removecleaningkit')
|
||||
if check then
|
||||
local coord, head = GetEntityCoords(data.data), GetEntityHeading(data.data)
|
||||
DeleteObject(data.data)
|
||||
createLabKit(coord, head)
|
||||
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)
|
||||
RegisterNetEvent("md-drugs:client:refinequalityacid", function()
|
||||
if not ItemCheck('lsd_one_vial') then return end
|
||||
if not minigame() then TriggerServerEvent("md-drugs:server:failrefinequality") return end
|
||||
if not progressbar(Lang.lsd.refine, 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:refinequalityacid")
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:resetlsdkit")
|
||||
AddEventHandler("md-drugs:client:resetlsdkit", function()
|
||||
DeleteObject(dirtylabkit)
|
||||
TriggerEvent("md-drugs:client:setlsdlabkit")
|
||||
RegisterNetEvent("md-drugs:client:maketabpaper", function()
|
||||
if not ItemCheck('tab_paper') then return end
|
||||
if not minigame() then TriggerServerEvent("md-drugs:server:failtabs") return end
|
||||
if not progressbar(Lang.lsd.dip, 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:maketabpaper")
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client: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)
|
||||
RegisterNetEvent("md-drugs:client:buytabs", function(data)
|
||||
if not progressbar(Lang.lsd.buypaper, 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:gettabpaper", data.data)
|
||||
end)
|
||||
|
||||
|
||||
RegisterNetEvent("md-drugs:client: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)
|
||||
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")
|
||||
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
|
||||
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)
|
||||
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")
|
||||
end
|
||||
|
||||
|
||||
RegisterNetEvent('md-drugs:client:taketabs', function(itemName)
|
||||
QBCore.Functions.Progressbar("use_lsd", "Have Fun!", 1750, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
}, {
|
||||
animDict = "mp_suicide",
|
||||
anim = "pill",
|
||||
flags = 49,
|
||||
}, {}, {}, function() -- Done
|
||||
StopAnimTask(PlayerPedId(), "mp_suicide", "pill", 1.0)
|
||||
TriggerEvent("evidence:client:SetStatus", "widepupils", 300)
|
||||
if itemName == "smiley_tabs" or itemName == "wildcherry_tabs" or itemName == "yinyang_tabs" then
|
||||
AlienEffect()
|
||||
elseif itemName == "pineapple_tabs" then
|
||||
EcstasyEffect()
|
||||
elseif itemName == "bart_tabs" then
|
||||
TrevorEffect()
|
||||
else
|
||||
TrevorEffect()
|
||||
Wait(15000)
|
||||
EcstasyEffect()
|
||||
end
|
||||
end, function() -- Cancel
|
||||
StopAnimTask(PlayerPedId(), "mp_suicide", "pill", 1.0)
|
||||
QBCore.Functions.Notify("Canceled", "error")
|
||||
end)
|
||||
RegisterNetEvent("md-drugs:client:buylabkit", function()
|
||||
if QBCore.Functions.HasItem('lsdlabkit') then Notify(Lang.lsd.hav, 'error') return end
|
||||
if not progressbar(Lang.lsd.buykit, 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:getlabkit")
|
||||
end)
|
||||
@@ -1,113 +1,39 @@
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
local Mescaline = {}
|
||||
local hallucinate = nil
|
||||
|
||||
function LoadModel(hash)
|
||||
hash = GetHashKey(hash)
|
||||
RequestModel(hash)
|
||||
while not HasModelLoaded(hash) do
|
||||
Wait(3000)
|
||||
end
|
||||
end
|
||||
|
||||
local function loadParticle(dict)
|
||||
if not HasNamedPtfxAssetLoaded(dict) then
|
||||
RequestNamedPtfxAsset(dict)
|
||||
end
|
||||
while not HasNamedPtfxAssetLoaded(dict) do
|
||||
Wait(0)
|
||||
end
|
||||
SetPtfxAssetNextCall(dict)
|
||||
local function pick(loc)
|
||||
if not progressbar(Lang.mescaline.pick, 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("Mescaline:pickupCane", loc)
|
||||
end
|
||||
|
||||
|
||||
---- plant spawns dont edit
|
||||
RegisterNetEvent('Mescaline:respawnCane', function(loc)
|
||||
local v = GlobalState.Mescaline[loc]
|
||||
local hash = GetHashKey(v.model)
|
||||
--if not HasModelLoaded(hash) then LoadModel(hash) end
|
||||
if not Mescaline[loc] then
|
||||
Mescaline[loc] = CreateObject(hash, v.location, false, true, true)
|
||||
SetEntityAsMissionEntity(Mescaline[loc], true, true)
|
||||
FreezeEntityPosition(Mescaline[loc], true)
|
||||
SetEntityHeading(Mescaline[loc], v.heading)
|
||||
exports['qb-target']:AddTargetEntity(Mescaline[loc], {
|
||||
options = { {
|
||||
icon = "fas fa-hand",
|
||||
label = "pick Cactus",
|
||||
action = function()
|
||||
QBCore.Functions.Progressbar("pick_cane", "picking Cactus", 2000, false, true, {
|
||||
disableMovement = true, disableCarMovement = true, disableMouse = false, disableCombat = true, },
|
||||
{ animDict = 'amb@prop_human_bum_bin@idle_a', anim = 'idle_a', flags = 47, },
|
||||
{}, {}, function()
|
||||
TriggerServerEvent("Mescaline:pickupCane", loc)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end, function() -- Cancel
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
end
|
||||
}
|
||||
},
|
||||
distance = 3.0
|
||||
})
|
||||
Freeze(Mescaline[loc], true, v.heading)
|
||||
AddSingleModel(Mescaline[loc], {icon = "fa-solid fa-seedling",label = Lang.targets.mescaline.pick, action = function() pick(loc) end}, loc )
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
|
||||
RegisterNetEvent('Mescaline:removeCane', function(loc)
|
||||
if DoesEntityExist(Mescaline[loc]) then DeleteEntity(Mescaline[loc]) end
|
||||
Mescaline[loc] = nil
|
||||
end)
|
||||
|
||||
|
||||
|
||||
RegisterNetEvent("Mescaline:init", function()
|
||||
for k, v in pairs (GlobalState.Mescaline) do
|
||||
local hash = GetHashKey(v.model)
|
||||
if not HasModelLoaded(hash) then LoadModel(hash) end
|
||||
if not v.taken then
|
||||
Mescaline[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z, false, true, true)
|
||||
SetEntityAsMissionEntity(Mescaline[k], true, true)
|
||||
FreezeEntityPosition(Mescaline[k], true)
|
||||
SetEntityHeading(Mescaline[k], v.heading)
|
||||
exports['qb-target']:AddTargetEntity(Mescaline[k], {
|
||||
options = { {
|
||||
icon = "fas fa-hand",
|
||||
label = "Pick Mescaline",
|
||||
action = function()
|
||||
QBCore.Functions.Progressbar("pick_cane", "Picking Mescaline", 2000, false, true, {
|
||||
disableMovement = true, disableCarMovement = true, disableMouse = false, disableCombat = true, },
|
||||
{ animDict = 'amb@prop_human_bum_bin@idle_a', anim = 'idle_a', flags = 47, },
|
||||
{}, {}, function()
|
||||
TriggerServerEvent("Mescaline:pickupCane", k)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end, function() -- Cancel
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
end
|
||||
}
|
||||
},
|
||||
distance = 3.0
|
||||
})
|
||||
Freeze(Mescaline[k], true, v.heading)
|
||||
AddSingleModel(Mescaline[k], {icon = "fa-solid fa-seedling",label = Lang.targets.mescaline.pick,action = function() pick(k) end}, k)
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
AddEventHandler('onResourceStart', function(resource)
|
||||
if resource == GetCurrentResourceName() then
|
||||
LoadModel('prop_cactus_03')
|
||||
TriggerEvent('Mescaline:init')
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterNetEvent('QBCore:Client:OnPlayerLoaded', function()
|
||||
Wait(3000)
|
||||
LoadModel('prop_cactus_03')
|
||||
TriggerEvent('Mescaline:init')
|
||||
end)
|
||||
|
||||
AddEventHandler('onResourceStop', function(resourceName)
|
||||
AddEventHandler('onResourceStop', function(resourceName)
|
||||
if GetCurrentResourceName() == resourceName then
|
||||
SetModelAsNoLongerNeeded(GetHashKey('prop_cactus_03'))
|
||||
for k, v in pairs(Mescaline) do
|
||||
@@ -118,62 +44,28 @@ AddEventHandler('onResourceStart', function(resource)
|
||||
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)
|
||||
RegisterNetEvent("md-drugs:client:drymescaline", function()
|
||||
if not ItemCheck('cactusbulb') then return end
|
||||
if not progressbar(Lang.mescaline.dry, 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:drymescaline")
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:takemescaline")
|
||||
AddEventHandler("md-drugs:client:takemescaline", function()
|
||||
local chance = math.random(1,100)
|
||||
local chance2 = math.random(1,100)
|
||||
QBCore.Functions.Progressbar("drink_something", "Taking Mescaline", 1000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
if chance <= Config.Badtrip then
|
||||
AlienEffect()
|
||||
clone = ClonePed(PlayerPedId(), false, false, true)
|
||||
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)
|
||||
end
|
||||
else
|
||||
AlienEffect()
|
||||
end
|
||||
end)
|
||||
RegisterNetEvent("md-drugs:client:takemescaline", function()
|
||||
local chance, chance2 = math.random(1,100), math.random(1,100)
|
||||
local weapon = ''
|
||||
if chance2 == 100 then weapon = 'weapon_rpg' else weapon = 'weapon_flaregun' end
|
||||
if not progressbar(Lang.mescaline.eat, 4000, 'uncuff') then return end
|
||||
if chance <= Config.Badtrip then
|
||||
AlienEffect()
|
||||
local clone = ClonePed(PlayerPedId(), false, false, true)
|
||||
SetEntityAsMissionEntity(clone)
|
||||
SetPedFleeAttributes(clone, false)
|
||||
GiveWeaponToPed(clone, weapon, 1, false, true)
|
||||
TaskCombatPed(clone, PlayerPedId(), 0, 16)
|
||||
SetPedCombatAttributes(clone, 46, true)
|
||||
Wait(1000 * 30)
|
||||
DeleteEntity(clone)
|
||||
else
|
||||
AlienEffect()
|
||||
end
|
||||
end)
|
||||
@@ -0,0 +1,146 @@
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
local amonia = nil
|
||||
local tray = nil
|
||||
local heated = nil
|
||||
local active = nil
|
||||
local function startcook()
|
||||
if not ItemCheck('empty_weed_bag') then return end
|
||||
if not ItemCheck('acetone') then return end
|
||||
if not ItemCheck('ephedrine') then return end
|
||||
if amonia == nil then
|
||||
active = true
|
||||
TriggerServerEvent("md-drugs:server:startcook")
|
||||
MethCooking()
|
||||
amonia = true
|
||||
else
|
||||
Notify(Lang.meth.inside, "error")
|
||||
end
|
||||
end
|
||||
|
||||
local function dials()
|
||||
if amonia == true then
|
||||
if not minigame() then
|
||||
AddExplosion(1005.773, -3200.402, -38.524, 49, 10, true, false, true, true)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
amonia = nil
|
||||
active = nil
|
||||
return end
|
||||
Notify(Lang.meth.increaseheat, "success")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
heated = true
|
||||
else
|
||||
end
|
||||
end
|
||||
|
||||
local function smash()
|
||||
if tray then
|
||||
tray = false
|
||||
DeleteObject(trays)
|
||||
local bucket = CreateObject(`bkr_prop_meth_bigbag_03a`, vector3(1012.85, -3194.29, -39.2), true, true, true)
|
||||
Freeze(bucket, true, 90.0)
|
||||
SmashMeth()
|
||||
Wait(100)
|
||||
AddSingleModel(bucket,
|
||||
{name = 'bucket',icon = "fa-solid fa-sack-xmark",label = Lang.targets.meth.bag, canInteract = function() if active == nil then return false end end,
|
||||
action = function()
|
||||
active = nil
|
||||
DeleteObject(bucket)
|
||||
amonia = nil
|
||||
heated = nil
|
||||
tray = nil
|
||||
BagMeth()
|
||||
TriggerServerEvent('md-drugs:server:getmeth')
|
||||
end,}, bucket)
|
||||
end
|
||||
end
|
||||
|
||||
local function trayscarry()
|
||||
if amonia then
|
||||
local pos = GetEntityCoords(PlayerPedId(), true)
|
||||
RequestAnimDict('anim@heists@box_carry@')
|
||||
while (not HasAnimDictLoaded('anim@heists@box_carry@')) do
|
||||
Wait(7)
|
||||
end
|
||||
TaskPlayAnim(PlayerPedId(), 'anim@heists@box_carry@', 'idle', 5.0, -1, -1, 50, 0, false, false,
|
||||
false)
|
||||
RequestModel("bkr_prop_meth_tray_02a")
|
||||
while not HasModelLoaded("bkr_prop_meth_tray_02a") do
|
||||
Wait(0)
|
||||
end
|
||||
trays = CreateObject("bkr_prop_meth_tray_02a", pos.x, pos.y, pos.z, true, true, true)
|
||||
AttachEntityToEntity(trays, PlayerPedId(), GetPedBoneIndex(PlayerPedId(), 28422), 0.01, -0.2,
|
||||
-0.2, 20.0, 0.0, 0.0, true, true, false, true, 1, true)
|
||||
tray = true
|
||||
end
|
||||
end
|
||||
CreateThread(function()
|
||||
BikerMethLab = exports['bob74_ipl']:GetBikerMethLabObject()
|
||||
BikerMethLab.Style.Set(BikerMethLab.Style.upgrade)
|
||||
BikerMethLab.Security.Set(BikerMethLab.Security.upgrade)
|
||||
BikerMethLab.Details.Enable(BikerMethLab.Details.production, true)
|
||||
RefreshInterior(BikerMethLab.interiorId)
|
||||
end)
|
||||
|
||||
CreateThread(function()
|
||||
AddBoxZoneSingle("methTeleOut",Config.MethTeleIn, {name = 'teleout', icon = "fa-solid fa-door-open", label = Lang.targets.meth.enter, action = function() SetEntityCoords(PlayerPedId(), Config.MethTeleOut) end} )
|
||||
AddBoxZoneSingle("methtelein",Config.MethTeleOut, {name = 'teleout', icon = "fa-solid fa-door-closed", label = Lang.targets.meth.exit, action = function() SetEntityCoords(PlayerPedId(), Config.MethTeleIn) end} )
|
||||
local options = {
|
||||
{ name = 'methcook', icon = "fa-solid fa-temperature-high", label = Lang.targets.meth.cook, distance = 2.5, action = function() startcook() end,
|
||||
canInteract = function()
|
||||
if amonia == nil and active == nil then
|
||||
return true
|
||||
end
|
||||
end,
|
||||
},
|
||||
{ name = 'grabtray', icon = "fas fa-sign-in-alt", label = Lang.targets.meth.tray, distance = 2.5, action = function() trayscarry() end,
|
||||
canInteract = function()
|
||||
if heated and amonia and tray == nil then return true end
|
||||
end,
|
||||
},
|
||||
}
|
||||
AddBoxZoneMultiOptions("cookmeth",vector3(1005.72, -3200.33, -38.52), options )
|
||||
AddBoxZoneSingle('boxmeth', vector3(1012.15, -3194.04, -39.20), {name = 'boxmeth',icon = "fas fa-sign-in-alt",label = Lang.targets.meth.box,action = function() smash()end,
|
||||
canInteract = function()
|
||||
if tray then return true end
|
||||
end})
|
||||
AddBoxZoneSingle('adjustdials',vector3(1007.89, -3201.17, -38.99),{ name = 'adjustdials', icon = "fas fa-sign-in-alt", label = Lang.targets.meth.adjust,
|
||||
distance = 5, action = function() dials() end,
|
||||
canInteract = function()
|
||||
if amonia and heated == nil then return true end end
|
||||
})
|
||||
if Config.MethHeist == false then
|
||||
AddBoxZoneMulti('methep', Config.MethEph, {icon = "fas fa-sign-in-alt", label = Lang.targets.meth.eph, event = 'md-drugs:client:stealeph'})
|
||||
AddBoxZoneMulti('methace', Config.Methace, {icon = "fas fa-sign-in-alt", label = Lang.targets.meth.ace, event = 'md-drugs:client:stealace'})
|
||||
end
|
||||
end)
|
||||
|
||||
CreateThread(function()
|
||||
if not Config.MethHeist == false then
|
||||
local current = "g_m_y_famdnf_01"
|
||||
lib.requestModel(current, Config.RequestModelTime)
|
||||
local CurrentLocation = Config.MethHeistStart
|
||||
local methdealer = CreatePed(0, current, CurrentLocation.x, CurrentLocation.y, CurrentLocation.z - 1, false, false)
|
||||
Freeze(methdealer, true, 220.0)
|
||||
Wait(100)
|
||||
AddSingleModel(methdealer,{
|
||||
label = Lang.targets.meth.mission,
|
||||
icon = "fas fa-eye",
|
||||
action = function()
|
||||
Notify(Lang.meth.mission, "success")
|
||||
SpawnMethCarPedChase()
|
||||
end,
|
||||
},nil )
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:stealeph", function(data)
|
||||
if not progressbar('Stealing Ephedrine', 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:geteph", data.data)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:stealace", function(data)
|
||||
if not progressbar('Stealing Acetone', 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:getace", data.data)
|
||||
end)
|
||||
|
||||
|
||||
@@ -1,152 +1,55 @@
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
|
||||
local deliveryBlip = nil
|
||||
local PZone = nil
|
||||
local listen = false
|
||||
local carryPackage = nil
|
||||
|
||||
|
||||
RegisterNetEvent("md-drugs:client:getoxytruck")
|
||||
AddEventHandler("md-drugs:client:getoxytruck", function()
|
||||
if TriggerServerEvent('md-drugs:server:payfortruck') then
|
||||
end
|
||||
end)
|
||||
|
||||
function 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)
|
||||
end
|
||||
local oxycar = CreateVehicle(ModelHash,Config.truckspawn.x, Config.truckspawn.y,Config.truckspawn.z, Config.truckspawn.h, true, false)
|
||||
SetEntityHeading(oxycar, coords.w)
|
||||
RegisterNetEvent("md-drugs:client:GetOxyCar", function()
|
||||
lib.requestModel("burrito3", Config.RequestModelTime)
|
||||
local paid = lib.callback.await('md-drugs:server:payfortruck', false)
|
||||
if not paid then return end
|
||||
local oxycar = CreateVehicle("burrito3",Config.truckspawn.x, Config.truckspawn.y,Config.truckspawn.z, Config.truckspawn.w, true, false)
|
||||
exports[Config.Fuel]:SetFuel(oxycar, 100.0)
|
||||
TriggerEvent("vehiclekeys:client:SetOwner", QBCore.Functions.GetPlate(oxycar))
|
||||
TriggerEvent('QBCore:Notify', 'Your truck is here', 'success')
|
||||
Notify(Lang.oxy.truck, '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
|
||||
})
|
||||
AddSingleModel(oxycar, { event = "md-drugs:client:getfromtrunk", icon = "fas fa-box-circle-check", label = Lang.targets.oxy.pack}, nil )
|
||||
end)
|
||||
|
||||
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",
|
||||
|
||||
|
||||
},
|
||||
},
|
||||
})
|
||||
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 = {
|
||||
{
|
||||
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)
|
||||
|
||||
|
||||
RegisterNetEvent("md-drugs:client:getoxylocationroute", function()
|
||||
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)
|
||||
SetNewWaypoint(CurrentLocation.x, CurrentLocation.y)
|
||||
local current = "g_m_y_famdnf_01"
|
||||
lib.requestModel(current, Config.RequestModelTime)
|
||||
local oxybuyer = CreatePed(0, current,CurrentLocation.x,CurrentLocation.y,CurrentLocation.z-1, CurrentLocation.w, false, false)
|
||||
Freeze(oxybuyer, true, CurrentLocation.w)
|
||||
repeat
|
||||
Wait(1000)
|
||||
until #(GetEntityCoords(PlayerPedId()) - vector3(CurrentLocation.x,CurrentLocation.y,CurrentLocation.z)) < 5.0
|
||||
|
||||
PoliceCall(Config.PoliceAlertOxy)
|
||||
AddSingleModel(oxybuyer, { type = "client", label = Lang.targets.oxy.talk, icon = "fas fa-eye",
|
||||
action = function()
|
||||
if carryPackage then
|
||||
if not progressbar(Lang.oxy.hand, 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:giveoxybox")
|
||||
DeleteEntity(oxybuyer)
|
||||
DetachEntity(carryPackage, true, true)
|
||||
DeleteObject(carryPackage)
|
||||
carryPackage = nil
|
||||
else
|
||||
Notify(Lang.oxy.empty, "error")
|
||||
end
|
||||
end}, oxybuyer)
|
||||
end
|
||||
if 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()
|
||||
RegisterNetEvent("md-drugs:client:getfromtrunk", function()
|
||||
if carryPackage then
|
||||
QBCore.Functions.Notify("You Cant Carry More Than One", "error")
|
||||
Notify(Lang.oxy.cantcarry, "error")
|
||||
else
|
||||
local pos = GetEntityCoords(PlayerPedId(), true)
|
||||
local pos = GetEntityCoords(PlayerPedId(), true)
|
||||
RequestAnimDict('anim@heists@box_carry@')
|
||||
while (not HasAnimDictLoaded('anim@heists@box_carry@')) do
|
||||
Wait(7)
|
||||
@@ -162,27 +65,17 @@ AddEventHandler("md-drugs:client:getfromtrunk", function()
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:giveoxybox")
|
||||
AddEventHandler("md-drugs:client:giveoxybox", function()
|
||||
|
||||
RegisterNetEvent("md-drugs:client:giveoxybox", function(data)
|
||||
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)
|
||||
if not progressbar(Lang.oxy.hand, 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:giveoxybox")
|
||||
DeleteEntity(data.ped)
|
||||
DetachEntity(carryPackage, true, true)
|
||||
DeleteObject(carryPackage)
|
||||
carryPackage = nil
|
||||
else
|
||||
QBCore.Functions.Notify("cant be empty handed idiot", "error")
|
||||
Notify(Lang.oxy.empty, "error")
|
||||
end
|
||||
end)
|
||||
|
||||
@@ -1,172 +1,39 @@
|
||||
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 = {
|
||||
}
|
||||
}
|
||||
},
|
||||
RegisterNetEvent("md-drugs:client:prescriptionpad", function(args)
|
||||
local icon, event = 'fa-solid fa-file-prescription', 'md-drugs:client:writeprescription'
|
||||
if QBCore.Functions.GetPlayerData().job.type == Config.PharmaJob then
|
||||
lib.registerContext({
|
||||
id = 'prescriptionpad',
|
||||
title = "Prescription Pad",
|
||||
options = {
|
||||
{title = 'Give Vics', description = 'Give Vics ', icon = icon, event = event, args = {item = 'vicodin_prescription'}},
|
||||
{title = 'Give Madderal', description = 'Give Madderal ', icon = icon, event = event, args = {item = 'adderal_prescription'}},
|
||||
{title = 'Give Morphin', description = 'Give Morphin ', icon = icon, event = event, args = {item = 'morphine_prescription'}},
|
||||
{title = 'Give Zany', description = 'Give Zany ', icon = icon, event = event, args = {item = 'xanax_prescription'} },
|
||||
}
|
||||
})
|
||||
lib.showContext('prescriptionpad')
|
||||
else
|
||||
QBCore.Functions.Notify("Youre Not A Medical Person", "error")
|
||||
Notify(Lang.Pharma.notems, "error")
|
||||
end
|
||||
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)
|
||||
RegisterNetEvent("md-drugs:client:writeprescription", function(args)
|
||||
if not progressbar(Lang.Pharma.write, 4000, 'notepad') then return end
|
||||
TriggerServerEvent("md-drugs:server:giveprescription", args.item)
|
||||
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)
|
||||
RegisterNetEvent("md-drugs:client:fillprescription", function(data)
|
||||
if not progressbar(Lang.Pharma.fill, 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:fillprescription", data.data)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client: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)
|
||||
RegisterNetEvent("md-drugs:client:unbottle", function(item)
|
||||
if not progressbar(Lang.Pharma.open, 4000, 'uncuff') then return end
|
||||
if item.name == 'vicodinbottle' then item = 'vicodin' end
|
||||
if item.name == 'adderalbottle' then item = 'adderal' end
|
||||
if item.name == 'morphinebottle' then item = 'morphine' end
|
||||
if item.name == 'xanaxbottle' then item = 'xanax' end
|
||||
TriggerServerEvent('md-drugs:server:unbottle', item)
|
||||
end)
|
||||
@@ -1,132 +1,58 @@
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
local shrooms = {}
|
||||
|
||||
local function pick(loc)
|
||||
if not progressbar(Lang.Shrooms.pick, 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("shrooms:pickupCane", loc)
|
||||
end
|
||||
|
||||
function LoadModel(hash)
|
||||
hash = GetHashKey(hash)
|
||||
RequestModel(hash)
|
||||
while not HasModelLoaded(hash) do
|
||||
Wait(3000)
|
||||
end
|
||||
end
|
||||
RequestModel(hash)
|
||||
while not HasModelLoaded(hash) do
|
||||
Wait(0)
|
||||
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
|
||||
})
|
||||
Freeze(shrooms[loc], true, v.heading)
|
||||
AddSingleModel(shrooms[loc],{ icon = "fas fa-hand", label = Lang.targets.shrooms.pick, action = function() pick(loc) end }, loc )
|
||||
end
|
||||
end)
|
||||
|
||||
AddEventHandler('onResourceStart', function(resource)
|
||||
if resource == GetCurrentResourceName() then
|
||||
LoadModel('prop_stoneshroom1')
|
||||
TriggerEvent('shrooms:init')
|
||||
AddEventHandler('onResourceStop', function(resourceName)
|
||||
if GetCurrentResourceName() == resourceName then
|
||||
SetModelAsNoLongerNeeded(GetHashKey('mushroom'))
|
||||
for k, v in pairs(shrooms) do
|
||||
if DoesEntityExist(v) then
|
||||
DeleteEntity(v) SetEntityAsNoLongerNeeded(v)
|
||||
end
|
||||
end
|
||||
end
|
||||
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()
|
||||
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
|
||||
lib.requestModel(v.model, Config.RequestModelTime)
|
||||
if not v.taken then
|
||||
shrooms[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z, false, true, true)
|
||||
SetEntityAsMissionEntity(shrooms[k], true, true)
|
||||
FreezeEntityPosition(shrooms[k], true)
|
||||
SetEntityHeading(shrooms[k], v.heading)
|
||||
exports['qb-target']:AddTargetEntity(shrooms[k], {
|
||||
options = { {
|
||||
icon = "fas fa-hand",
|
||||
label = "Pick shrooms",
|
||||
action = function()
|
||||
QBCore.Functions.Progressbar("pick_cane", "Picking Shrooms", 2000, false, true, {
|
||||
disableMovement = true, disableCarMovement = true, disableMouse = false, disableCombat = true, },
|
||||
{ animDict = 'amb@prop_human_bum_bin@idle_a', anim = 'idle_a', flags = 47, },
|
||||
{}, {}, function()
|
||||
TriggerServerEvent("shrooms:pickupCane", k)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end, function() -- Cancel
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
end
|
||||
}
|
||||
},
|
||||
distance = 3.0
|
||||
})
|
||||
Freeze(shrooms[k], true, v.heading)
|
||||
AddSingleModel(shrooms[k],{ icon = "fas fa-hand", label = Lang.targets.shrooms.pick, action = function() pick(k) end }, k )
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
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
|
||||
end
|
||||
|
||||
RegisterNetEvent('md-drugs:client:takeshrooms', function()
|
||||
QBCore.Functions.Progressbar("use_lsd", "Have Fun!", 1750, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
}, {
|
||||
animDict = "mp_suicide",
|
||||
anim = "pill",
|
||||
flags = 49,
|
||||
}, {}, {}, function() -- Done
|
||||
StopAnimTask(PlayerPedId(), "mp_suicide", "pill", 1.0)
|
||||
TriggerEvent("evidence:client:SetStatus", "widepupils", 300)
|
||||
EcstasyEffect()
|
||||
-- exports["qb-smallresources"]:DoAcid(240000)
|
||||
end, function() -- Cancel
|
||||
StopAnimTask(PlayerPedId(), "mp_suicide", "pill", 1.0)
|
||||
QBCore.Functions.Notify("Canceled", "error")
|
||||
end)
|
||||
if not progressbar(Lang.Shrooms.eat, 500, 'eat') then return end
|
||||
TriggerEvent("evidence:client:SetStatus", "widepupils", 300)
|
||||
EcstasyEffect()
|
||||
end)
|
||||
@@ -1,706 +1,23 @@
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
|
||||
local icon = "fa solid fa-eye"
|
||||
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
|
||||
AddBoxZoneSingle('telecokein', Config.CokeTeleIn, {action = function()tele(Config.CokeTeleOut)end, icon = 'fa-solid fa-door-open', label = Lang.targets.coke.enter}) -- coke
|
||||
AddBoxZoneSingle('telecokeout', Config.CokeTeleOut, {action = function()tele(Config.CokeTeleIn) end, icon = "fa-solid fa-door-closed", label = Lang.targets.coke.exit}) -- coke
|
||||
AddBoxZoneMulti('makepowder', Config.MakePowder, {event = "md-drugs:client:makepowder", icon = "fa-solid fa-scissors", label = Lang.targets.coke.chop}) -- coke
|
||||
AddBoxZoneMulti('steallysergic', Config.lysergicacid, {event = "md-drugs:client:getlysergic", icon = icon, label = Lang.targets.lsd.lys}) -- lsd
|
||||
AddBoxZoneMulti('stealdiethylamide', Config.diethylamide, {event = "md-drugs:client:getdiethylamide", icon = icon, label = Lang.targets.lsd.die}) -- lsd
|
||||
AddBoxZoneMulti('gettabs', Config.gettabs, {event = "md-drugs:client:buytabs", icon = icon, label = Lang.targets.lsd.buyt}) -- lsd
|
||||
AddBoxZoneMulti('dryheroin', Config.dryplant, {event = "md-drugs:client:dryplant", icon = icon, label = Lang.targets.heroin.dry}) -- heroin
|
||||
AddBoxZoneMulti('cutheroin', Config.cutheroinone, {event = "md-drugs:client:cutheroin", icon = icon, label = Lang.targets.heroin.cut}) -- heroin
|
||||
AddBoxZoneMulti('fillneedle', Config.fillneedle, {event = "md-drugs:client:fillneedle", icon = icon, label = Lang.targets.heroin.fill}) -- heroin
|
||||
AddBoxZoneMulti('makecrack', Config.makecrack, {event = "md-drugs:client:makecrackone", icon = icon, label = Lang.targets.crack.cook}) -- crack
|
||||
AddBoxZoneMulti('bagcrack', Config.bagcrack, {event = "md-drugs:client:bagcrack", icon = icon, label = Lang.targets.crack.bag}) -- crack
|
||||
AddBoxZoneMulti('fillprescription', Config.FillPrescription, {event = "md-drugs:client:fillprescription", icon = icon, label = Lang.targets.pha.fill}) -- pharma
|
||||
AddBoxZoneSingle('payfortruck', Config.Payfortruck, {event = "md-drugs:client:GetOxyCar", icon = icon, label = Lang.targets.oxy.pay}) -- oxy runs
|
||||
AddBoxZoneSingle('drymescaline', Config.DryOut, {event = "md-drugs:client:drymescaline", icon = icon, label = Lang.targets.mescaline.dry}) -- mescaline
|
||||
AddBoxZoneMulti('stealisosafrole', Config.isosafrole, {event = "md-drugs:client:stealisosafrole", icon = icon, label = Lang.targets.xtc.iso}) -- xtc
|
||||
AddBoxZoneMulti('stealmdp2p', Config.mdp2p, {event = "md-drugs:client:stealmdp2p", icon = icon, label = Lang.targets.xtc.mdp}) -- xtc
|
||||
AddBoxZoneMulti('rawxtcloc', Config.rawxtcloc, {event = "md-drugs:client:makingrawxtc", icon = icon, label = Lang.targets.xtc.raw}) -- xtc
|
||||
AddBoxZoneSingle('buypress', Config.buypress, {event = "md-drugs:client:buypress", icon = icon, label = Lang.targets.xtc.press}) -- xtc
|
||||
AddBoxZoneMulti('stamp', Config.stamp, {event = "md-drugs:client:stampwhite", icon = icon, label = Lang.targets.xtc.stamp}) -- xtc
|
||||
end)
|
||||
@@ -1,29 +1,15 @@
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
|
||||
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)
|
||||
lib.requestModel(current, Config.RequestModelTime)
|
||||
local num = lib.callback.await('md-drugs:server:GetMerchant', false)
|
||||
local CurrentLocation = Config.Travellingmerchant[num]
|
||||
local travellingmerchant = CreatePed(0, current,CurrentLocation.x,CurrentLocation.y,CurrentLocation.z-1, CurrentLocation.w, false, false)
|
||||
Freeze(travellingmerchant, true, CurrentLocation.w)
|
||||
AddSingleModel(travellingmerchant, { label = Lang.targets.travel.travel, icon = "fas fa-eye",
|
||||
action = function()
|
||||
makeMenu('travellingMerchant')
|
||||
lib.showContext('travellingMerchant')
|
||||
end}, nil)
|
||||
end)
|
||||
@@ -0,0 +1,218 @@
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
local WeedPlant = {}
|
||||
local exploded, drying = false, false
|
||||
|
||||
local function hasJob()
|
||||
if Config.Joblock then
|
||||
if QBCore.Functions.GetPlayerData().job.name == Config.weedjob then
|
||||
return true else return false end
|
||||
else
|
||||
return true end
|
||||
end
|
||||
|
||||
RegisterNetEvent('weed:respawnCane', function(loc)
|
||||
local v = GlobalState.WeedPlant[loc]
|
||||
local hash = GetHashKey(v.model)
|
||||
if not HasModelLoaded(hash) then LoadModel(hash) end
|
||||
if not WeedPlant[loc] then
|
||||
WeedPlant[loc] = CreateObject(hash, v.location.x, v.location.y, v.location.z-3.5, false, true, true)
|
||||
Freeze(WeedPlant[loc],true, v.heading)
|
||||
AddSingleModel(WeedPlant[loc],
|
||||
{icon = "fas fa-hand",label = Lang.targets.weed.pick,
|
||||
action = function()if not progressbar(Lang.Weed.pick, 4000, 'uncuff') then return end TriggerServerEvent("weed:pickupCane", loc) end},
|
||||
loc)
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterNetEvent('weed:removeCane', function(loc)
|
||||
if DoesEntityExist(WeedPlant[loc]) then DeleteEntity(WeedPlant[loc]) end
|
||||
WeedPlant[loc] = nil
|
||||
end)
|
||||
|
||||
RegisterNetEvent("weed:init", function()
|
||||
for k, v in pairs (GlobalState.WeedPlant) do
|
||||
local hash = GetHashKey(v.model)
|
||||
if not HasModelLoaded(hash) then LoadModel(hash) end
|
||||
if not v.taken then
|
||||
WeedPlant[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z-3.5, false, true, true)
|
||||
Freeze(WeedPlant[k],true, v.heading)
|
||||
AddSingleModel(WeedPlant[k],
|
||||
{icon = "fas fa-hand",label = Lang.targets.weed.pick,
|
||||
action = function()if not progressbar(Lang.Weed.pick, 4000, 'uncuff') then return end TriggerServerEvent("weed:pickupCane", k) end},
|
||||
k)
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
AddEventHandler('onResourceStop', function(resourceName)
|
||||
if GetCurrentResourceName() == resourceName then
|
||||
SetModelAsNoLongerNeeded(GetHashKey('bkr_prop_weed_lrg_01b'))
|
||||
for k, v in pairs(WeedPlant) do
|
||||
if DoesEntityExist(v) then
|
||||
DeleteEntity(v) SetEntityAsNoLongerNeeded(v)
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
CreateThread(function()
|
||||
AddBoxZoneMulti('weeddry', Config.WeedDry, {
|
||||
name = 'dryweed',
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = Lang.targets.weed.dry,
|
||||
distance = 1,
|
||||
action = function()
|
||||
if not ItemCheck('wetcannabis') then return end
|
||||
if drying then
|
||||
Notify(Lang.Weed.busy, "error")
|
||||
else
|
||||
local loc = GetEntityCoords(PlayerPedId())
|
||||
local weedplant = CreateObject("bkr_prop_weed_drying_01a", loc.x, loc.y+.2, loc.z, true, false)
|
||||
drying = true
|
||||
FreezeEntityPosition(weedplant, true)
|
||||
Notify(Lang.Weed.wait, "success")
|
||||
Wait(math.random(1000,5000))
|
||||
Notify(Lang.Weed.take, "success")
|
||||
AddSingleModel(weedplant, {
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = Lang.targets.weed.dpick,
|
||||
action = function()
|
||||
DeleteEntity(weedplant)
|
||||
drying = false
|
||||
TriggerServerEvent('md-drugs:server:dryoutweed')
|
||||
end,
|
||||
canInteract = function()
|
||||
if hasJob() then return true end end
|
||||
}, nil)
|
||||
end
|
||||
end,
|
||||
canInteract = function()
|
||||
if hasJob() then return true end end
|
||||
})
|
||||
|
||||
AddBoxZoneSingle('teleinweedout', Config.Teleout, { name = 'teleout', icon = "fas fa-sign-in-alt", label = Lang.targets.coke.exit, distance = 2.0, action = function() SetEntityCoords(PlayerPedId(),Config.Telein) end,
|
||||
canInteract = function() if hasJob() then return true end end
|
||||
})
|
||||
AddBoxZoneSingle('teleinweedin', Config.Telein, { name = 'teleout', icon = "fas fa-sign-in-alt", label = Lang.targets.coke.enter, distance = 2.0, action = function() SetEntityCoords(PlayerPedId(),Config.Teleout) end,
|
||||
canInteract = function() if hasJob() then return true end end
|
||||
})
|
||||
AddBoxZoneSingle('MakeButterCrafting', Config.MakeButter, {label = Lang.targets.weed.butt, action = function() lib.showContext('ButterCraft') end, icon = "fas fa-sign-in-alt",
|
||||
canInteract = function() if hasJob() then return true end end
|
||||
})
|
||||
|
||||
AddBoxZoneSingle('makeoil',Config.MakeOil, {
|
||||
name = 'Oil',
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = Lang.targets.weed.oil,
|
||||
action = function()
|
||||
if not ItemCheckMulti({'butane', 'grindedweed'}) then return end
|
||||
if not minigame() then
|
||||
local explosion = math.random(1,100)
|
||||
local loc = GetEntityCoords(PlayerPedId())
|
||||
if explosion <= 99 then
|
||||
AddExplosion(loc.x, loc.y, loc.z, 49, 10, true, false, true, true)
|
||||
exploded = true
|
||||
Notify(Lang.Weed.stovehot, "error")
|
||||
Wait(1000 * 30)
|
||||
exploded = false
|
||||
end
|
||||
return end
|
||||
if not progressbar(Lang.Weed.shat, 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:makeoil")
|
||||
end,
|
||||
canInteract = function()
|
||||
if hasJob() and exploded == false then return true end
|
||||
end,
|
||||
} )
|
||||
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)
|
||||
local stove = CreateObject("prop_cooker_03",vector3(1045.49, -3198.46, -38.15-1), true, false)
|
||||
SetEntityHeading(stove, 270.00)
|
||||
FreezeEntityPosition(stove, true)
|
||||
local stove2 = CreateObject("prop_cooker_03",vector3(1038.90, -3198.66, -38.17-1), true, false)
|
||||
SetEntityHeading(stove2, 90.00)
|
||||
FreezeEntityPosition(stove2, true)
|
||||
end)
|
||||
|
||||
|
||||
RegisterNetEvent("md-drugs:client:rollanim", function()
|
||||
if not progressbar(Lang.Weed.roll, 4000, 'uncuff') then return end
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:grind", function()
|
||||
if not progressbar("grinding", 4000, 'uncuff') then return end
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:dodabs", function()
|
||||
if not progressbar('Doing Dabs', 4000, 'bong2') then return end
|
||||
AlienEffect()
|
||||
end)
|
||||
|
||||
CreateThread(function()
|
||||
local current = "u_m_m_jesus_01"
|
||||
lib.requestModel(current, Config.RequestModelTime)
|
||||
local CurrentLocation = Config.WeedSaleman
|
||||
local WeedGuy = CreatePed(0,current,CurrentLocation.x,CurrentLocation.y,CurrentLocation.z-1, CurrentLocation.w, false, false)
|
||||
Freeze(WeedGuy, true, CurrentLocation.w)
|
||||
AddSingleModel(WeedGuy, {label = "Weed Shop",icon = "fas fa-eye", action = function() makeMenu('WeedShop') lib.showContext('WeedShop')end}, nil)
|
||||
end)
|
||||
|
||||
local function createBluntOptions(contextId, contextTitle, eventLabelPrefix, tableName)
|
||||
local options = {}
|
||||
local items = lib.callback.await('md-drugs:server:GetRecipe', false,'weed',tableName)
|
||||
for k, v in pairs(items) do
|
||||
local label = {}
|
||||
local item = ''
|
||||
for m, d in pairs(v.take) do table.insert(label, GetLabel(m) .. ' X ' .. d) end
|
||||
for m, d in pairs(v.give) do item = m end
|
||||
options[#options + 1] = {
|
||||
icon = GetImage(item),
|
||||
description = table.concat(label, ", "),
|
||||
title = GetLabel(item),
|
||||
event = "md-drugs:client:MakeWeedItems",
|
||||
args = {
|
||||
item = item,
|
||||
recipe = 'weed',
|
||||
num = k,
|
||||
label = eventLabelPrefix .. GetLabel(item),
|
||||
table = tableName
|
||||
}
|
||||
}
|
||||
end
|
||||
sorter(options, 'title')
|
||||
lib.registerContext({
|
||||
id = contextId,
|
||||
title = contextTitle,
|
||||
options = options
|
||||
})
|
||||
end
|
||||
|
||||
CreateThread(function()
|
||||
createBluntOptions('ButterCraft', "Edible Cooking", 'Cooking A ', 'edibles')
|
||||
createBluntOptions('mddrugsblunts', "Roll Blunts", 'Rolling A ', 'blunts')
|
||||
createBluntOptions('mddrugsbluntwraps', "Dipping Syrup", 'Dipping Syrup To Make ', 'bluntwrap')
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:MakeWeedItems", function(data)
|
||||
if not minigame() then return end
|
||||
if not progressbar('Making ' .. data.item, 4000, 'uncuff') then return end
|
||||
TriggerServerEvent('md-drugs:server:MakeWeedItems', data)
|
||||
end)
|
||||
|
||||
RegisterNetEvent('md-drugs:client:makeBluntWrap', function(data)
|
||||
lib.showContext('mddrugsbluntwraps')
|
||||
end)
|
||||
|
||||
RegisterNetEvent('md-drugs:client:rollBlunt', function(data)
|
||||
lib.showContext('mddrugsblunts')
|
||||
end)
|
||||
@@ -1,583 +1,70 @@
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
|
||||
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
|
||||
})
|
||||
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
|
||||
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)
|
||||
local miss = false
|
||||
|
||||
|
||||
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)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:GetLocation", function(drug, notify)
|
||||
if not GetCops(Config.PoliceCount) then return end
|
||||
if miss then
|
||||
Notify(Lang.Wholesale.al, 'error')
|
||||
else
|
||||
TriggerServerEvent('md-drugs:server:RemoveBurner', drug)
|
||||
Notify(notify, 'success')
|
||||
local CurrentLocation = Config.oxylocations[math.random(#Config.oxylocations)]
|
||||
local timer = 0
|
||||
miss = true
|
||||
SetNewWaypoint(CurrentLocation.x, CurrentLocation.y)
|
||||
lib.requestModel("g_m_y_famdnf_01", Config.RequestModelTime)
|
||||
local current = "g_m_y_famdnf_01"
|
||||
local drugdealer = CreatePed(0, current,CurrentLocation.x,CurrentLocation.y,CurrentLocation.z-1, 90.0, false, false)
|
||||
FreezeEntityPosition(drugdealer, true)
|
||||
SetEntityInvincible(drugdealer, true)
|
||||
AddSingleModel(drugdealer, {
|
||||
type = "client",
|
||||
label = Lang.Wholesale.talk,
|
||||
icon = "fas fa-eye",
|
||||
action = function()
|
||||
local luck = math.random(1,100)
|
||||
if luck >= Config.SuccessfulChance then
|
||||
TriggerEvent("md-drugs:client:SuccessSale", drug)
|
||||
else
|
||||
TriggerEvent("md-drugs:client:SetUp")
|
||||
end
|
||||
Wait(3000)
|
||||
DeleteEntity(drugdealer)
|
||||
miss = false
|
||||
end,
|
||||
},nil )
|
||||
repeat
|
||||
Wait(1000)
|
||||
timer = timer + 1
|
||||
until #(GetEntityCoords(PlayerPedId()) - vector3(CurrentLocation.x, CurrentLocation.y, CurrentLocation.z) ) < 4.0 or timer == Config.WholesaleTimeout + 1
|
||||
PoliceCall(Config.AlertPoliceWholesale)
|
||||
if timer <= Config.WholesaleTimeout or #(GetEntityCoords(PlayerPedId()) - vector3(CurrentLocation.x, CurrentLocation.y, CurrentLocation.z) ) < 4.0 then
|
||||
timer = 0
|
||||
else
|
||||
Notify('The Buyer Waited To Long')
|
||||
DeleteEntity(drugdealer)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
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
|
||||
end)
|
||||
|
||||
|
||||
RegisterNetEvent("md-drugs:client:SuccessSale", function(drug)
|
||||
if not progressbar("Wholesaling Drugs", 4000, 'uncuff') then return end
|
||||
if drug == 'coke' then
|
||||
TriggerServerEvent("md-drugs:server:wholesalecoke")
|
||||
elseif drug == 'crack' then
|
||||
TriggerServerEvent("md-drugs:server:wholesalecrack")
|
||||
elseif drug == 'lsd' then
|
||||
TriggerServerEvent("md-drugs:server:wholesalelsd")
|
||||
elseif drug == 'heroin' then
|
||||
TriggerServerEvent("md-drugs:server:wholesaleheroin")
|
||||
elseif drug == 'xtc' then
|
||||
TriggerEvent("md-drugs:client:wholesalextc")
|
||||
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)
|
||||
RegisterNetEvent("md-drugs:client:SetUp", function()
|
||||
progressbar("YOU FUCKED NOW", 4000, 'uncuff')
|
||||
SetUpPeds()
|
||||
end)
|
||||
@@ -1,871 +1,139 @@
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
local xtcpress = false
|
||||
|
||||
RegisterNetEvent("md-drugs:client:setpressquad")
|
||||
AddEventHandler("md-drugs:client:setpressquad", function()
|
||||
local PedCoords = GetEntityCoords(PlayerPedId())
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
Wait(4000)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
quadpress = CreateObject("bkr_prop_coke_press_01b", PedCoords.x+1, PedCoords.y+1, PedCoords.z-1, true, false)
|
||||
SetVehicleOnGroundProperly(quadpress)
|
||||
exports['qb-target']:AddTargetEntity(quadpress, {
|
||||
options = {
|
||||
{
|
||||
num = 1,
|
||||
type = "client",
|
||||
event = "md-drugs:client:makextcquad",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Make White quad Stack',
|
||||
|
||||
},
|
||||
{
|
||||
num = 2,
|
||||
type = "client",
|
||||
event = "md-drugs:client:makeredxtcquad",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Make Red quad Stack',
|
||||
|
||||
},
|
||||
{
|
||||
num = 3,
|
||||
type = "client",
|
||||
event = "md-drugs:client:makeorangextcquad",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Make orange quad Stack',
|
||||
|
||||
},
|
||||
{
|
||||
num = 4,
|
||||
type = "client",
|
||||
event = "md-drugs:client:makebluextcquad",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Make blue quad Stack',
|
||||
|
||||
},
|
||||
{
|
||||
num = 5,
|
||||
type = "client",
|
||||
event = "md-drugs:client:getquadpressback",
|
||||
icon = "fas fa-eye",
|
||||
label = "Pick Up",
|
||||
},
|
||||
},
|
||||
distance = 3.0
|
||||
})
|
||||
RegisterNetEvent("md-drugs:client:setpress", function(type)
|
||||
if xtcpress then
|
||||
Notify(Lang.xtc.out, 'error')
|
||||
else
|
||||
local coords, head = StartRay2()
|
||||
xtcpress = true
|
||||
progressbar('Setting Press On The Ground', 4000, 'uncuff')
|
||||
local press = CreateObject("bkr_prop_coke_press_01aa", coords.x, coords.y, coords.z, true, false, false)
|
||||
PlaceObjectOnGroundProperly(press)
|
||||
SetEntityHeading(press, head)
|
||||
local options = {
|
||||
{ icon = "fas fa-eye", label = Lang.targets.xtc.make, distance = 2.0, action = function() TriggerEvent("md-drugs:client:XTCMenu", type) end,
|
||||
canInteract = function() if xtcpress then return true end end
|
||||
},
|
||||
{icon = "fas fa-eye", label = Lang.targets.xtc.pick, action = function() TriggerEvent("md-drugs:client:GetPressBack", type, press) end, distance = 2.0,
|
||||
canInteract = function() if xtcpress then return true end end
|
||||
},
|
||||
}
|
||||
AddMultiModel(press, options, nil)
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:setpresstriple")
|
||||
AddEventHandler("md-drugs:client:setpresstriple", function()
|
||||
local PedCoords = GetEntityCoords(PlayerPedId())
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
Wait(4000)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
triplepress = CreateObject("bkr_prop_coke_press_01b", PedCoords.x+1, PedCoords.y+1, PedCoords.z-1, true, false)
|
||||
SetVehicleOnGroundProperly(triplepress)
|
||||
exports['qb-target']:AddTargetEntity(triplepress, {
|
||||
options = {
|
||||
{
|
||||
num = 1,
|
||||
type = "client",
|
||||
event = "md-drugs:client:makextctriple",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Make White triple Stack',
|
||||
|
||||
},
|
||||
{
|
||||
num = 2,
|
||||
type = "client",
|
||||
event = "md-drugs:client:makeredxtctriple",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Make Red triple Stack',
|
||||
|
||||
},
|
||||
{
|
||||
num = 3,
|
||||
type = "client",
|
||||
event = "md-drugs:client:makeorangextctriple",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Make orange triple Stack',
|
||||
|
||||
},
|
||||
{
|
||||
num = 4,
|
||||
type = "client",
|
||||
event = "md-drugs:client:makebluextctriple",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Make blue triple Stack',
|
||||
|
||||
},
|
||||
{
|
||||
num = 5,
|
||||
type = "client",
|
||||
event = "md-drugs:client:gettriplepressback",
|
||||
icon = "fas fa-eye",
|
||||
label = "Pick Up",
|
||||
},
|
||||
},
|
||||
distance = 3.0
|
||||
})
|
||||
RegisterNetEvent("md-drugs:client:XTCMenu", function(type)
|
||||
local event = "md-drugs:client:MakeXTC"
|
||||
lib.registerContext({
|
||||
id = 'XTCmenu',
|
||||
title = 'XTC Menu',
|
||||
options = {
|
||||
{icon = GetImage('white_xtc'), title = 'White XTC', description = '1 X Raw XTC', event = event, args = { data = type, color = 'white'}},
|
||||
{icon = GetImage('red_xtc'), title = 'Red XTC', description = '1 X Raw XTC and 1 X Loose Coke', event = event, args = { data = type, color = 'red'}},
|
||||
{icon = GetImage('orange_xtc'), title = 'Orange XTC', description = '1 X Raw XTC and 1 X Heroin Vial', event = event, args = { data = type, color = 'orange'}},
|
||||
{icon = GetImage('blue_xtc'), title = 'Blue XTC', description = '1 X Raw XTC and 1 X Crack Rock', event = event, args = { data = type, color = 'blue'}},
|
||||
}
|
||||
})
|
||||
lib.showContext('XTCmenu')
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:setpressdual")
|
||||
AddEventHandler("md-drugs:client:setpressdual", function()
|
||||
local PedCoords = GetEntityCoords(PlayerPedId())
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
Wait(4000)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
dualpress = CreateObject("bkr_prop_coke_press_01b", PedCoords.x+1, PedCoords.y+1, PedCoords.z-1, true, false)
|
||||
SetVehicleOnGroundProperly(dualpress)
|
||||
exports['qb-target']:AddTargetEntity(dualpress, {
|
||||
options = {
|
||||
{
|
||||
num = 1,
|
||||
type = "client",
|
||||
event = "md-drugs:client:makextcdual",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Make White dual Stack',
|
||||
|
||||
},
|
||||
{
|
||||
num = 2,
|
||||
type = "client",
|
||||
event = "md-drugs:client:makeredxtcdual",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Make Red dual Stack',
|
||||
|
||||
},
|
||||
{
|
||||
num = 3,
|
||||
type = "client",
|
||||
event = "md-drugs:client:makeorangextcdual",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Make orange dual Stack',
|
||||
|
||||
},
|
||||
{
|
||||
num = 4,
|
||||
type = "client",
|
||||
event = "md-drugs:client:makebluextcdual",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Make blue dual Stack',
|
||||
|
||||
},
|
||||
{
|
||||
num = 5,
|
||||
type = "client",
|
||||
event = "md-drugs:client:getdualpressback",
|
||||
icon = "fas fa-eye",
|
||||
label = "Pick Up",
|
||||
},
|
||||
},
|
||||
distance = 3.0
|
||||
})
|
||||
RegisterNetEvent("md-drugs:client:GetPressBack", function(type, press)
|
||||
if not progressbar(Lang.xtc.pickup, 5000, 'uncuff') then return end
|
||||
DeleteObject(press)
|
||||
xtcpress = false
|
||||
TriggerServerEvent("md-drugs:server:getpressback", type)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:setpresssingle")
|
||||
AddEventHandler("md-drugs:client:setpresssingle", function()
|
||||
local PedCoords = GetEntityCoords(PlayerPedId())
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
Wait(4000)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
singlepress = CreateObject("bkr_prop_coke_press_01aa", PedCoords.x+1, PedCoords.y+1, PedCoords.z-1, true, false)
|
||||
SetVehicleOnGroundProperly(singlepress)
|
||||
exports['qb-target']:AddTargetEntity(singlepress, {
|
||||
options = {
|
||||
{
|
||||
num = 1,
|
||||
type = "client",
|
||||
event = "md-drugs:client:makextcsingle",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Make White Single Stack',
|
||||
|
||||
},
|
||||
{
|
||||
num = 2,
|
||||
type = "client",
|
||||
event = "md-drugs:client:makeredxtcsingle",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Make Red Single Stack',
|
||||
|
||||
},
|
||||
{
|
||||
num = 3,
|
||||
type = "client",
|
||||
event = "md-drugs:client:makeorangextcsingle",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Make orange Single Stack',
|
||||
|
||||
},
|
||||
{
|
||||
num = 4,
|
||||
type = "client",
|
||||
event = "md-drugs:client:makebluextcsingle",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Make blue Single Stack',
|
||||
|
||||
},
|
||||
{
|
||||
num = 5,
|
||||
type = "client",
|
||||
event = "md-drugs:client:getsinglepressback",
|
||||
icon = "fas fa-eye",
|
||||
label = "Pick Up",
|
||||
},
|
||||
},
|
||||
distance = 3.0
|
||||
})
|
||||
RegisterNetEvent("md-drugs:client:stealisosafrole", function(data)
|
||||
if not minigame() then Notify(Lang.xtc.fail, "error") return end
|
||||
if not progressbar(Lang.xtc.iso, 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:stealisosafrole",data.data)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:getsinglepressback")
|
||||
AddEventHandler("md-drugs:client:getsinglepressback", function()
|
||||
DeleteObject(singlepress)
|
||||
TriggerServerEvent("md-drugs:server:getsinglepressback")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
|
||||
RegisterNetEvent("md-drugs:client:stealmdp2p", function(data)
|
||||
if not minigame() then Notify(Lang.xtc.fail, "error") return end
|
||||
if not progressbar(Lang.xtc.mdp2p, 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:stealmdp2p", data.data)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:getdualpressback")
|
||||
AddEventHandler("md-drugs:client:getdualpressback", function()
|
||||
DeleteObject(dualpress)
|
||||
TriggerServerEvent("md-drugs:server:getdualpressback")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
|
||||
RegisterNetEvent("md-drugs:client:makingrawxtc", function(data)
|
||||
if not ItemCheck('isosafrole') then return end
|
||||
if not ItemCheck('mdp2p') then return end
|
||||
if not progressbar(Lang.xtc.raw, 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:makingrawxtc",data.data)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:gettriplepressback")
|
||||
AddEventHandler("md-drugs:client:gettriplepressback", function()
|
||||
DeleteObject(triplepress)
|
||||
TriggerServerEvent("md-drugs:server:gettriplepressback")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
RegisterNetEvent("md-drugs:client:MakeXTC", function(data)
|
||||
if not ItemCheck('raw_xtc') then return end
|
||||
if not progressbar(Lang.xtc.pressing, 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:makextc",data)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:getquadpressback")
|
||||
AddEventHandler("md-drugs:client:getquadpressback", function()
|
||||
DeleteObject(quadpress)
|
||||
TriggerServerEvent("md-drugs:server:getquadpressback")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:stealisosafrole")
|
||||
AddEventHandler("md-drugs:client:stealisosafrole", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Stealing Isosafrole", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:stealisosafrole")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 1, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:stealmdp2p")
|
||||
AddEventHandler("md-drugs:client:stealmdp2p", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Stealing MDP2P", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:stealmdp2p")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 1, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:makingrawxtc")
|
||||
AddEventHandler("md-drugs:client:makingrawxtc", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Making Raw Ecstacy", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:makingrawxtc")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 1, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
---------------------------- unstamped just xtc
|
||||
RegisterNetEvent("md-drugs:client:makextcsingle")
|
||||
AddEventHandler("md-drugs:client:makextcsingle", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Making Unstamped Single Stack Ecstacy", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:makextcsingle")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 4, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:makextcdual")
|
||||
AddEventHandler("md-drugs:client:makextcdual", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Making Unstamped Dual Stack Ecstacy", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:makextcdual")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 3, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:makextctriple")
|
||||
AddEventHandler("md-drugs:client:makextctriple", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Making Unstamped Triple Stack Ecstacy", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:makextctriple")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 2, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:makextcquad")
|
||||
AddEventHandler("md-drugs:client:makextcquad", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Making Unstamped Quad Stack Ecstacy", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:makextcquad")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 1, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
-------------------------------------------------
|
||||
RegisterNetEvent("md-drugs:client:makeredxtcsingle")
|
||||
AddEventHandler("md-drugs:client:makeredxtcsingle", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Making Unstamped Red Single Stack Ecstacy", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:makeredxtcsingle")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 4, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:makeredxtcdual")
|
||||
AddEventHandler("md-drugs:client:makeredxtcdual", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Making Unstamped Red Dual Stack Ecstacy", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:makeredxtcdual")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 3, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:makeredxtctriple")
|
||||
AddEventHandler("md-drugs:client:makeredxtctriple", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Making Unstamped Red Triple Stack Ecstacy", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:makeredxtctriple")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 2, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:makeredxtcquad")
|
||||
AddEventHandler("md-drugs:client:makeredxtcquad", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Making Unstamped Red Quad Stack Ecstacy", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:makeredxtcquad")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 1, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
--------------------------------------------------------------- making orange unstamped
|
||||
RegisterNetEvent("md-drugs:client:makeorangextcsingle")
|
||||
AddEventHandler("md-drugs:client:makeorangextcsingle", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Making Unstamped Orange Single Stack Ecstacy", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:makeorangextcsingle")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 4, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:makeorangextcdual")
|
||||
AddEventHandler("md-drugs:client:makeorangextcdual", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Making Unstamped Orange Dual Stack Ecstacy", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:makeorangextcdual")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 3, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:makeorangextctriple")
|
||||
AddEventHandler("md-drugs:client:makeorangextctriple", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Making Unstamped Orange Triple Stack Ecstacy", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:makeorangextctriple")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 2, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:makeorangextcquad")
|
||||
AddEventHandler("md-drugs:client:makeorangextcquad", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Making Unstamped Orange Quad Stack Ecstacy", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:makeorangextcquad")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 1, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
--------------------------------------- blue unstamped
|
||||
RegisterNetEvent("md-drugs:client:makebluextcsingle")
|
||||
AddEventHandler("md-drugs:client:makebluextcsingle", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Making Unstamped Orange Single Stack Ecstacy", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:makebluextcsingle")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 4, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:makebluextcdual")
|
||||
AddEventHandler("md-drugs:client:makebluextcdual", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Making Unstamped Blue Dual Stack Ecstacy", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:makebluextcdual")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 3, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:makebluextctriple")
|
||||
AddEventHandler("md-drugs:client:makebluextctriple", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Making Unstamped Blue Triple Stack Ecstacy", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:makebluextctriple")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 2, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:makebluextcquad")
|
||||
AddEventHandler("md-drugs:client:makebluextcquad", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Making Unstamped Blue Quad Stack Ecstacy", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:makebluextcquad")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 1, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
------------------------------------------------------------------ Stamping
|
||||
RegisterNetEvent("md-drugs:client:stampwhite")
|
||||
AddEventHandler("md-drugs:client:stampwhite", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Making Stamped Pills", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:stampwhite")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 2, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:stampwhite", function(data)
|
||||
lib.registerContext({ id = 'stampxtc', title = 'Stamp XTC Menu',
|
||||
options = {
|
||||
{ icon = GetImage('white_xtc'), title = 'White XTC',
|
||||
onSelect = function()
|
||||
if not minigame() then Notify(Lang.xtc.fail, "error") return end
|
||||
if not progressbar(string.format(Lang.xtc.stamp, 'White'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:stampwhite",data.data)
|
||||
end
|
||||
},
|
||||
{ icon = GetImage('red_xtc'), title = 'Red XTC',
|
||||
onSelect = function()
|
||||
if not minigame() then Notify(Lang.xtc.fail, "error") return end
|
||||
if not progressbar(string.format(Lang.xtc.stamp, 'Red'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:stampred", data.data)
|
||||
end
|
||||
},
|
||||
{ icon = GetImage('orange_xtc'), title = 'Orange XTC',
|
||||
onSelect = function()
|
||||
if not minigame() then Notify(Lang.xtc.fail, "error") return end
|
||||
if not progressbar(string.format(Lang.xtc.stamp, 'Orange'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:stamporange", data.data)
|
||||
end,
|
||||
},
|
||||
{ icon = GetImage('blue_xtc'), title = 'Blue XTC',
|
||||
onSelect = function()
|
||||
if not minigame() then Notify(Lang.xtc.fail, "error") return end
|
||||
if not progressbar(string.format(Lang.xtc.stamp, 'Blue'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:stampblue", data.data)
|
||||
end
|
||||
},
|
||||
}
|
||||
})
|
||||
lib.showContext('stampxtc')
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:stampred")
|
||||
AddEventHandler("md-drugs:client:stampred", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Making Stamped Pills", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:stampred")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 2, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:getsinglepress", function()
|
||||
if not progressbar(Lang.xtc.buyp, 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:buypress")
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:stamporange")
|
||||
AddEventHandler("md-drugs:client:stamporange", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Making Stamped Pills", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:stamporange")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 2, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:exchangepresses", function(data)
|
||||
if not progressbar(Lang.xtc.buyp, 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:upgradepress", data.data)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:stampblue")
|
||||
AddEventHandler("md-drugs:client:stampblue", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Making Stamped Pills", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:stampblue")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 2, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:getsinglepress")
|
||||
AddEventHandler("md-drugs:client:getsinglepress", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Making Stamped Pills", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
TriggerServerEvent("md-drugs:server:buypress")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
|
||||
end)
|
||||
end)
|
||||
RegisterNetEvent("md-drugs:client:exchangepresses")
|
||||
AddEventHandler("md-drugs:client:exchangepresses", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Making Stamped Pills", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
TriggerServerEvent("md-drugs:server:upgradepress")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
|
||||
end)
|
||||
end)
|
||||
RegisterNetEvent("md-drugs:client:buypress")
|
||||
AddEventHandler("md-drugs:client:buypress", function()
|
||||
exports['qb-menu']:openMenu({
|
||||
{
|
||||
header = 'Exchange Presses',
|
||||
icon = 'fas fa-code',
|
||||
isMenuHeader = true, -- Set to true to make a nonclickable title
|
||||
},
|
||||
{
|
||||
header = 'Single Press',
|
||||
txt = 'Buy a single press for 20k',
|
||||
icon = 'fas fa-code-merge',
|
||||
params = {
|
||||
event = 'md-drugs:client:getsinglepress',
|
||||
args = {
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
header = 'Exchange Single For Dual',
|
||||
txt = '20 of each unstamped single stack pill and your single press ',
|
||||
icon = 'fas fa-code-merge',
|
||||
params = {
|
||||
event = 'md-drugs:client:exchangepresses',
|
||||
args = {
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
header = 'Exchange Dual For Triple',
|
||||
txt = '50 of each unstamped dual stack pill and your dual press ',
|
||||
icon = 'fas fa-code-merge',
|
||||
params = {
|
||||
event = 'md-drugs:client:exchangepresses',
|
||||
args = {
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
header = 'Exchange Triple For Quad',
|
||||
txt = '150 of each unstamped Triple stack pill and your triple press ',
|
||||
icon = 'fas fa-code-merge',
|
||||
params = {
|
||||
event = 'md-drugs:client:exchangepresses',
|
||||
args = {
|
||||
}
|
||||
}
|
||||
},
|
||||
RegisterNetEvent("md-drugs:client:buypress", function()
|
||||
local img = GetImage('singlepress')
|
||||
lib.registerContext({
|
||||
id = 'buypresses',
|
||||
title = 'Purchase Presses',
|
||||
options = {
|
||||
{title = Lang.xtc.press.title.single, description = Lang.xtc.des.title.single, icon = img, event = 'md-drugs:client:getsinglepress'},
|
||||
{title = Lang.xtc.press.title.dual, description = Lang.xtc.des.title.dual, icon = img, event = 'md-drugs:client:exchangepresses', args = {data = 'dual'}},
|
||||
{title = Lang.xtc.press.title.triple, description = Lang.xtc.des.title.triple, icon = img, event = 'md-drugs:client:exchangepresses', args = {data = 'triple'}},
|
||||
{title = Lang.xtc.press.title.quad, description = Lang.xtc.des.title.quad, icon = img, event = 'md-drugs:client:exchangepresses', args = {data = 'quad'}}
|
||||
}
|
||||
})
|
||||
lib.showContext('buypresses')
|
||||
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,30 @@ author "mustache_dom"
|
||||
description "drugs by mustache dom"
|
||||
fx_version "cerulean"
|
||||
game "gta5"
|
||||
|
||||
version '3.8.0'
|
||||
client_scripts {
|
||||
'client/**.lua',
|
||||
'@PolyZone/client.lua',
|
||||
'@PolyZone/CircleZone.lua',
|
||||
}
|
||||
|
||||
server_scripts {
|
||||
'server/**.lua',
|
||||
'server/**.lua',
|
||||
'@oxmysql/lib/MySQL.lua',
|
||||
|
||||
}
|
||||
|
||||
shared_scripts {
|
||||
'config.lua',
|
||||
|
||||
|
||||
'@ox_lib/init.lua',
|
||||
'shared/**.lua',
|
||||
|
||||
}
|
||||
|
||||
|
||||
lua54 'yes'
|
||||
|
||||
dependency '/assetpacks'
|
||||
|
||||
dependency 'bob74_ipl'
|
||||
files {
|
||||
'stream/mushroom.ytyp'
|
||||
}
|
||||
|
||||
data_file 'DLC_ITYP_REQUEST' 'stream/mushroom.ytyp'
|
||||
|
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 |
|
Before Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 6.2 KiB |
|
Before Width: | Height: | Size: 6.1 KiB |
|
Before Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 6.2 KiB |
|
Before Width: | Height: | Size: 8.4 KiB |
|
Before Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 515 KiB |
|
Before Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 71 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 55 KiB |
|
Before Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 8.6 KiB |