125 Commits
Author SHA1 Message Date
Mustache Dom 0e55a18676 Update functions.lua 2026-06-23 17:13:07 -07:00
Mustache Dom 28d4244243 Update meth.lua 2026-04-03 15:07:53 -07:00
Mustache Dom ff5a86b3f3 Update heroin.lua 2026-04-03 13:21:43 -07:00
Mustache Dom 0f80534168 - fix Weed Blunts 2026-03-23 21:09:06 -07:00
Mustache Dom 30f12ebbe5 fix no animation defaults 2026-03-11 21:09:37 -07:00
Mustache Dom fdd4b0cb7b Update cocaine.lua 2026-03-11 02:47:56 -07:00
Mustache Dom 32af7ae59a Merge pull request #81 from Mustachedom/Community_bridge
Merge to Community_bridge
2026-03-05 00:12:46 -08:00
Mustache Dom c08ff45617 Merge branch 'main' into Community_bridge 2026-03-05 00:11:52 -08:00
Mustache Dom 97af3833b7 test 2026-03-05 00:07:51 -08:00
Mustache Dom 4e48857437 - push for ready 2026-03-05 00:00:34 -08:00
Mustache Dom c3084abc78 Update functions.lua 2026-02-07 15:42:58 -08:00
Mustache Dom d97cd43951 Update cocaine.lua 2026-02-01 10:49:46 -08:00
Mustache Dom 7ceaa97b5f - add locales, fix cornerselling 2026-01-31 02:44:07 -07:00
Mustache Dom 11e7015672 remove loader function, ensure files through fx 2026-01-31 02:21:15 -07:00
Mustache Dom c7eca0285b - big change, moved data to shared folder 2026-01-31 02:05:15 -07:00
Mustache Dom fdc28723bc - forgot a target 2026-01-30 01:40:18 -07:00
Mustache Dom 1d82b8beba - target fix 2026-01-30 01:19:50 -07:00
Mustache Dom 5db30458eb - big push 2026-01-30 00:45:03 -07:00
Mustache Dom b5297bd109 - fix progressbar 2026-01-25 03:30:48 -07:00
Mustache Dom 547ba993d4 adjust readme 2026-01-24 00:57:03 -07:00
Mustache Dom c380c75149 - moved shit around 2026-01-24 00:54:49 -07:00
Mustache Dom 9c0723d4c7 - remove version 2026-01-24 00:52:33 -07:00
Mustache Dom c3aaf67421 - update consumables 2026-01-24 00:50:26 -07:00
Mustache Dom addce12081 - finish rewrite of deliveries 2026-01-23 23:40:20 -07:00
Mustache Dom a975406031 - remove qbdrugsrewrite file
- add dealer table in case you dropped it
- updated readme
2026-01-23 04:10:58 -07:00
Mustache Dom c752baffda condense locales 2026-01-23 03:41:19 -07:00
Mustache Dom fc8a623067 locales and wholesale 2026-01-22 02:08:35 -07:00
Mustache Dom c1c8b8cb86 add itemCheck function 2026-01-21 22:02:25 -07:00
Mustache Dom 690db7ce55 - clean remove requirement for emote menu 2026-01-21 21:27:08 -07:00
Mustache Dom d46e28e8f2 added troll feature 2026-01-21 01:36:38 -07:00
Mustache Dom fb500dc502 edit checkDistance 2026-01-19 00:46:49 -07:00
Mustache Dom df9584711a 90% 2026-01-19 00:38:01 -07:00
Mustache Dom 66934fd68a - 80% 2026-01-18 01:20:44 -07:00
Mustache Dom ebc47ba5d7 - half done 2026-01-16 02:57:26 -07:00
Mustache Dom d2f70d78ed Update version.txt 2026-01-11 14:37:53 -08:00
Mustache Dom 0ed22eb62b - fix xtc not allowing to upgrade 2026-01-07 02:12:06 -07:00
Mustache Dom a02e333688 - fix notifications
- `added` dependancy check to yell at you if it isnt the proper load order
2025-12-29 02:24:40 -07:00
Mustache Dom 50aca1d946 - fix wholesale.lua 2025-11-05 23:39:57 -08:00
Mustache Dom 257c0e8d97 Merge pull request #76 from atenea03/patch-1
Update fxmanifest.lua
2025-10-12 12:29:17 -07:00
Atenea Store d250006a03 Update fxmanifest.lua 2025-10-12 20:07:37 +02:00
Mustache Dom 9a1704b08b Merge pull request #75 from Mustachedom:update
Update
2025-10-11 23:21:16 -07:00
Mustache Dom c31f9e4d4e - version bump 2025-10-11 23:20:57 -07:00
Mustache Dom 3ba3c5bc9d - add whippits :) 2025-10-11 23:18:48 -07:00
Mustache Dom ec5e4f0e15 - item logic for whippits 2025-10-11 18:38:24 -06:00
Mustache Dom 0b6b7e178b - add whippit balloons 2025-10-11 18:28:26 -06:00
Mustache Dom feb1d6e7d5 paint huff 2025-10-11 18:27:26 -06:00
Mustache Dom 2c1401f9a3 - add weed prop allowance for MakeButter and MakeOil 2025-10-09 02:53:40 -06:00
Mustache Dom d41944d3e3 - fix xtc server side issues 2025-10-02 23:03:09 -06:00
Mustache Dom b79c9fba17 Merge branch 'main' of https://github.com/Mustachedom/md-drugs 2025-09-26 02:16:03 -06:00
Mustache Dom e93ce41218 - fix lang issue 2025-09-26 02:15:59 -06:00
Mustache Dom 49a8749ddf Update fxmanifest.lua 2025-09-25 02:52:15 -07:00
Mustache Dom 767914043f remove debugs -_- 2025-09-24 22:14:00 -07:00
Mustache Dom 6198b50400 bump version 2025-09-23 01:45:12 -07:00
Mustache Dom 0e94b82a96 update 2025-09-23 01:44:07 -07:00
Mustache Dom 5032d561ff - adjust meth 2025-09-23 01:29:35 -07:00
Mustache Dom 4d51671d7d Merge branch 'main' of https://github.com/Mustachedom/md-drugs 2025-09-23 01:08:39 -07:00
Mustache Dom d21e71e00a - fix :Meth
- fix bug of box not being targetable
   - fix minigame forced for ps_circle
   - fix items.lua
2025-09-23 01:08:35 -07:00
Mustache Dom ad3e35c3dc Update version.txt 2025-09-22 14:36:20 -07:00
Mustache Dom 52c6eaec91 - fix deliveries 2025-09-15 21:43:22 -07:00
Mustache Dom 69879dd0df - added base qb items to itemlist for fw
- `fix` dealer arg
2025-09-15 21:31:49 -07:00
Mustache Dom cab8646830 - update all images and items 2025-09-12 21:50:31 -07:00
Mustache Dom 1a44099624 fix ox items again 2025-09-12 21:30:17 -07:00
Mustache Dom ecd80656af fix weed.lua client 2025-09-12 15:24:38 -07:00
Mustache Dom b6c9338792 fix ox items 2025-09-12 15:22:48 -07:00
Mustache Dom 861476ad71 - fix for weed.lua 2025-09-12 01:37:10 -06:00
Mustache Dom 20da44cf88 oh fuck left a test command in 2025-09-12 01:31:46 -06:00
Mustache Dom ab81a09922 Merge branch 'main' of https://github.com/Mustachedom/md-drugs 2025-09-12 01:31:03 -06:00
Mustache Dom a37ed02864 - updated qb items
- updated ox items
- updated images
2025-09-12 01:30:59 -06:00
Mustache Dom 8909a96033 Delete items_install/images.zip
left in a zip of the images, my bad Gs
2025-09-12 01:13:47 -06:00
Mustache Dom 3c206491dd - update heroin client side 2025-09-11 21:44:26 -06:00
Mustache Dom 532ef823e2 - update XTC
- fix saving location of pill presses in xtc
- Adjust XTC item crafting
- updated images
2025-09-11 21:41:40 -06:00
Mustache Dom 76f228c1ac - update router for version check 2025-09-08 00:16:45 -07:00
Mustache Dom 8811f7e73c Update version to 4.0.0 with ps_lib note
Updated version to 4.0.0 and added note about ps_lib.
2025-09-08 00:15:33 -07:00
Mustache Dom e3262e2886 Merge pull request #73 from Mustachedom/hushhushmotherfucker
Hushhushmotherfucker
2025-09-08 01:13:08 -06:00
Mustache Dom 291ac27e36 Merge branch 'main' into hushhushmotherfucker 2025-09-08 00:12:58 -07:00
Mustache Dom 2765eef9b3 - update readme 2025-09-08 00:10:20 -07:00
Mustache Dom 0599c60864 - updated languages 2025-09-08 00:06:28 -07:00
Mustache Dom 880479b435 - added
- piglatin
- gungan
- pirate
- klingon
- meanieweenie
- DJ
2025-09-05 21:28:04 -07:00
Mustache Dom 1f3d7154aa - delete test commands 2025-08-16 23:52:07 -07:00
Mustache Dom d9fcb11930 - added timeout function. any event you trigger puts a 3 second hold on the rest of the script for that player to ensure no injectors can endlessly spam and get things. if triggered while on cooldown a console print happens 2025-08-16 23:43:20 -07:00
Mustache Dom af0efacfe9 Update TravellingMerchant.lua 2025-08-14 12:35:09 -07:00
Mustache Dom bf9d435b03 - adjust oxyruns to be 20% failure of new location
- fix meth location
2025-08-13 02:08:57 -06:00
Mustache Dom c47b69ceca - switched cocaine trigger events after animatiosn
- moved inits events from functions to plant spawns
2025-08-13 02:07:08 -06:00
Mustache Dom 108bed7443 Merge pull request #71 from Tater1987/hushhushmotherfucker
Few items I forgotten earlier. I believe this is all I had today.
2025-08-13 01:06:23 -07:00
Tater1987 59c094fdae Update meth.lua
Item missing in recipes.
2025-08-12 23:22:35 -05:00
Tater1987 f28a358c5c Update config.lua
ox_fuel as option
2025-08-12 23:17:41 -05:00
Tater1987 7cc5485864 Update oxyruns.lua
Possible set up for ox fuel? If you need to make changes thats fine. Haven't tested this fully.
2025-08-12 23:16:38 -05:00
Tater1987 ef328ac90c Update en.lua
Added missing lang for teleport handler
2025-08-12 23:10:09 -05:00
Tater1987 891d4abf73 Update meth.lua
Added missing teleport handler
2025-08-12 23:08:43 -05:00
Tater1987 52cf323a20 Merge branch 'Mustachedom:hushhushmotherfucker' into hushhushmotherfucker 2025-08-12 23:05:31 -05:00
Tater1987 87c4aa77a7 Update meth.lua
Spelling correction
2025-08-12 23:04:22 -05:00
Mustache Dom e8337514e7 Merge pull request #70 from Tater1987/hushhushmotherfucker
Hushhushmotherfucker
2025-08-12 18:07:27 -07:00
Tater1987 c4664ae5fb Update meth.lua
Unneeded text
2025-08-12 19:45:02 -05:00
Tater1987 68723ac088 Update meth.lua
Fixed spelling error
2025-08-12 19:43:32 -05:00
Tater1987 9f4339a4ea Update lsd.lua
Incorrect Server Event called
2025-08-12 19:42:53 -05:00
Mustache Dom 3364968e85 Merge pull request #69 from Tater1987/patch-2
Update heroin.lua
2025-08-12 14:49:43 -07:00
Tater1987 689bc79868 Update heroin.lua
Capitalization error
2025-08-12 16:49:08 -05:00
Mustache Dom 2764466d4c Merge pull request #68 from Tater1987/patch-1
Update cocaine.lua
2025-08-12 14:27:38 -06:00
Tater1987 e4c41458dc Update cocaine.lua
Added missing TriggerServerEvents
2025-08-12 15:26:56 -05:00
Mustache Dom b5eb60834f - fix lsd 2025-08-11 17:42:26 -06:00
Mustache Dom 804eba41c9 Create license.md 2025-08-11 16:56:49 -06:00
Mustache Dom 3c05cf79c3 Delete LICENSE 2025-08-11 16:56:05 -06:00
Mustache Dom 9511a46dad update license 2025-08-11 16:54:47 -06:00
Mustache Dom 25f9979731 added lang for travellingmerchant 2025-08-11 16:53:19 -06:00
Mustache Dom a079efd5c8 - fix bug with comparing rep
- fix travellingmerchant
2025-08-11 16:49:24 -06:00
Mustache Dom ca50437751 - added languages 2025-08-09 23:58:38 -06:00
Mustache Dom 51059f6aed - uwu and wookie 2025-08-09 03:25:40 -06:00
Mustache Dom 683eaff7de finished locales EN 2025-08-09 03:10:00 -06:00
Mustache Dom 37f86bf50d - add support for bzz props 2025-08-06 02:35:25 -06:00
Mustache Dom 3574ecef5b jesussssss 2025-08-06 02:25:06 -06:00
Mustache Dom daa1a4f8a3 fuckin christ 2025-07-18 01:19:12 -07:00
Mustache Dom 314f7381d1 Merge branch 'hushhushmotherfucker' of https://github.com/Mustachedom/md-drugs into hushhushmotherfucker 2025-07-17 02:06:21 -05:00
Mustache Dom 2fd900ec22 - holy fuck a lot 2025-07-17 02:06:17 -05:00
Mustache Dom 3c8b654b28 Update version.txt 2025-07-16 01:55:22 -07:00
Mustache Dom e3caf16b53 Update version.txt 2025-07-16 01:54:05 -07:00
Mustache Dom 49f43b997b Update version.txt 2025-07-16 01:53:38 -07:00
Mustache Dom 94c6458037 - update sv side plants 2025-07-16 01:48:56 -07:00
Mustache Dom 2dd8729dc9 - hush 2025-07-15 02:23:03 -07:00
Mustache Dom a86a342f4d - hush hush 2025-07-15 02:21:34 -07:00
Mustache Dom 4fdef3cf30 - fix up heroin 2025-07-14 01:34:58 -07:00
Mustache Dom 1b29aaa3b0 lots of shit 2025-07-01 03:09:46 -07:00
Mustache Dom 9e84111da3 - added multi location for coke fancy anims 2025-06-30 23:24:57 -07:00
Mustache Dom 7422c9d57b Update cocaine.lua 2025-03-26 22:48:12 -07:00
Mustache Dom 8e2dc89398 Merge pull request #63 from zent2g/main
Fix f8 console print spam
2025-02-03 15:01:25 -08:00
zent2g d199e017c2 Fix f8 console print spam 2025-02-03 23:56:50 +01:00
629 changed files with 7889 additions and 7397 deletions

No files matched your search

+2 -1
View File
@@ -21,6 +21,7 @@
"heroinCooldown",
"checkLoc",
"getRandW",
"shroomsCooldown"
"shroomsCooldown",
"targets"
]
}
-674
View File
@@ -1,674 +0,0 @@
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>.
Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

+25
View File
@@ -0,0 +1,25 @@
fx_version 'cerulean'
game 'gta5'
lua54 'yes'
this_is_a_map 'yes'
author 'Atenea'
description 'Balloon / MD-Drugs'
version '1.0.1'
---------------------------------------------------------------------------
-- INCLUDED FILES
---------------------------------------------------------------------------
files {
'stream/*.ytyp',
}
data_file 'DLC_ITYP_REQUEST' 'stream/*.ytyp'
dependency '/assetpacks'
escrow_ignore {
'stream/*.ydr',
}
+20
View File
@@ -0,0 +1,20 @@
Thank you for your purchase!
We hope you enjoy this prop ♥
Author: Atenea Store | Atenea
-- IMPORTANT --
/Please read below.
► If you rename the folder or files I will not be responsible if it does not work correctly afterwards.
► If you encounter any problems, errors, or have any questions related to our prop, JOIN OUR DISCORD.
Don't hesitate to open a ticket, we’ll assist you as quickly as possible.
https://discord.gg/mam8Nmg49d
SCRIPTS
https://discord.gg/S5WZ7ecKDc
Make sure you’ve already READ our post on FiveM/Tebex/Discord.
Atenea from the Atenea Store Team.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+35
View File
@@ -0,0 +1,35 @@
if not Config.Drugs['TravellingMerchant'] then return end
local function spawn()
local data = Bridge.Callback.Trigger('md-drugs:server:GetMerchant')
local model = 's_m_m_trucker_01'
requestModel(model)
local ped = CreatePed(4, model, data.loc.x, data.loc.y, data.loc.z, data.loc.w, false, true)
Freeze(ped, true, data.loc.w)
Bridge.Target.AddLocalEntity(ped, {
{
icon = Bridge.Language.Locale('merchant.targetIcon'),
label = Bridge.Language.Locale('merchant.targetOpen'),
action = function()
local options = {}
for k, v in pairs (data.items) do
local itemInfo = Bridge.Inventory.GetItemInfo(k)
options[#options+1] = {
title = itemInfo.label,
description = '$'..v,
icon = itemInfo.image,
onSelect = function()
TriggerServerEvent('md-drugs:server:purchaseGoods', k)
end
}
end
Bridge.Menu.Open({
id = 'merchant_menu',
title = Bridge.Language.Locale('merchant.menuTitle'),
options = options
})
end
}
})
targets[#targets+1] = ped
end
spawn()
-488
View File
@@ -1,488 +0,0 @@
local started = nil
local 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 config = lib.callback.await('md-drugs:server:getLocs', false)
local start = config.StartLoc[math.random(1,#config.StartLoc)]
if started then
Notify(Lang.lean.act,'error')
else
started = true
lib.requestModel("pounder", Config.RequestModelTime)
lib.requestModel("ig_priest", Config.RequestModelTime)
lib.requestModel("cargobob3", Config.RequestModelTime)
local leancar = CreateVehicle("pounder", start.x+3, start.y-2, start.z-1, 52.0, true, false)
local driver = CreatePed(26, "ig_priest", start.x, start.y, start.z, 268.9422, false, false)
local pilot2 = CreatePed(26, "ig_priest", stoploc.x-3, stoploc.y-3, stoploc.z-1, 268.9422, false, false)
FreezeEntityPosition(pilot2, true)
SetEntityInvincible(pilot2, true)
SetEntityAsMissionEntity(leancar)
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 = Lang.targets.lean.st,
action = function()
hit = hit + 1
if not minigame() then return end
TriggerServerEvent('md-drugs:server:givelean')
started = nil
if math.random(1,100) <= 30 or hit == 4 then
hit = 0
DeleteVehicle(leancar)
DeleteEntity(driver)
DeleteEntity(pilot2)
end
end}, nil)
else
DeleteVehicle(leancar) DeleteEntity(driver) DeleteEntity(pilot2)
end
end
end
function SpawnMethCarPedChase()
local ped = GetEntityCoords(PlayerPedId())
local stoploc = vector3(-1157.63, -3056.71, 13.94)
local config = lib.callback.await('md-drugs:server:getLocs', false)
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, false)
local methdriver = CreatePed(26, "a_m_m_hillbilly_02", start.x, start.y, start.z, 268.9422, false, false)
local methpilot = CreatePed(26, "a_m_m_hillbilly_02", stoploc.x-3, stoploc.y-3, stoploc.z-1, 268.9422, false, false)
FreezeEntityPosition(methpilot, true)
SetEntityInvincible(methpilot, true)
SetEntityAsMissionEntity(methcar)
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 = false
if math.random(1,100) <= 30 then
DeleteVehicle(methcar)
DeleteEntity(methdriver)
DeleteEntity(methpilot)
end
end,
}, nil )
else
DeleteVehicle(methcar)
DeleteEntity(methdriver)
DeleteEntity(methpilot)
end
end
end
function SetUpPeds()
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
+196 -76
View File
@@ -1,90 +1,210 @@
local CocaPlant = {}
local cuttingcoke = nil
local baggingcoke = nil
local locations = Config.Cocaine.Locations
local function pick(loc)
if not progressbar(Lang.Coke.picking, 4000, 'uncuff') then return end
TriggerServerEvent("coke:pickupCane", loc)
return true
local function CutCoke(coords, offset, rotation)
cuttingcoke = true
local animDict, animName = "anim@amb@business@coc@coc_unpack_cut_left@", "coke_cut_v5_coccutter"
Bridge.Anim.RequestDict(animDict, 500)
local animDuration = GetAnimDuration(animDict, animName) * 1000
local ped = PlayerPedId()
local scenePos, sceneRot = vector3(coords.x + offset.x, coords.y + offset.y,coords.z + offset.z), rotation
local scenes = {
{
{ hash = "bkr_prop_coke_bakingsoda_o", animName = "coke_cut_v5_bakingsoda"},
{ hash = "prop_cs_credit_card", animName = "coke_cut_v5_creditcard"},
{ hash = "prop_cs_credit_card", animName = "coke_cut_v5_creditcard^1"}
},
}
local scenesList, entitiesList = {}, {}
for i=1, #scenes, 1 do
local scene = NetworkCreateSynchronisedScene(scenePos, sceneRot, 2, false, false, 1065353216, 0, 1.3)
NetworkAddPedToSynchronisedScene(ped, scene, animDict, animName, 1.5, -4.0, 1, 16, 1148846080, 0)
for j=1, #scenes[i], 1 do
local s = scenes[i][j]
RequestModel(s.hash)
while not HasModelLoaded(s.hash) do
Wait(0)
end
local obj = CreateObjectNoOffset(s.hash, coords, true, true, true)
SetModelAsNoLongerNeeded(s.hash)
entitiesList[#entitiesList+1] = obj
NetworkAddEntityToSynchronisedScene(obj, scene, animDict, s.animName, 4.0, -8.0, 1)
end
scenesList[#scenesList+1] = scene
end
DisableCamCollisionForEntity(ped)
FreezeEntityPosition(ped, true)
for i=1, #scenesList, 1 do
NetworkStartSynchronisedScene(scenesList[i])
end
Wait(animDuration-11000)
for i=1, #scenesList, 1 do
NetworkStopSynchronisedScene(scenesList[i])
end
for i=1, #entitiesList, 1 do
DeleteEntity(entitiesList[i])
end
RemoveAnimDict(animDict)
FreezeEntityPosition(ped, false)
cuttingcoke = nil
end
RegisterNetEvent('coke:respawnCane', function(loc)
local v = GlobalState.CocaPlant[loc]
local hash = GetHashKey(v.model)
if not CocaPlant[loc] then
CocaPlant[loc] = CreateObject(hash, v.location, false, true, true)
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)
local function BagCoke(coords, offset, rotation)
baggingcoke = true
local ver = ""
local animDict, animName = "anim@amb@business@meth@meth_smash_weight_check@", "break_weigh_"..ver.."char01"
Bridge.Anim.RequestDict(animDict, 500)
local animDuration = GetAnimDuration(animDict, animName) * 1000
local ped = PlayerPedId()
local scenePos, sceneRot = vector3(coords.x + offset.x, coords.y + offset.y,coords.z + offset.z +0.03), rotation
local scenes = {
{
{ hash = "bkr_prop_coke_cutblock_01", animName = "break_weigh_"..ver.."box01"},
{ hash = "bkr_prop_coke_fullmetalbowl_02", animName = "break_weigh_"..ver.."box01^1"},
{ hash = "bkr_prop_coke_cutblock_01", animName = "break_weigh_"..ver.."methbag01"}
},
{
{ hash = "xm3_prop_xm3_bag_coke_01a", animName = "break_weigh_"..ver.."methbag01^1"},
{ hash = "xm3_prop_xm3_bag_coke_01a", animName = "break_weigh_"..ver.."methbag01^2"},
{ hash = "xm3_prop_xm3_bag_coke_01a", animName = "break_weigh_"..ver.."methbag01^3"}
},
{
{ hash = "bkr_prop_coke_fullscoop_01a", animName = "break_weigh_"..ver.."scoop"},
{ hash = "bkr_prop_coke_scale_01", animName = "break_weigh_"..ver.."scale"},
{ hash = "bkr_prop_fakeid_penclipboard", animName = "break_weigh_"..ver.."pen"}
},
{
{ hash = "bkr_prop_fakeid_clipboard_01a", animName = "break_weigh_"..ver.."clipboard"},
}
}
local scenesList, entitiesList = {}, {}
for i=1, #scenes, 1 do
local scene = NetworkCreateSynchronisedScene(scenePos, sceneRot, 2, false, false, 1065353216, 0, 1.3)
NetworkAddPedToSynchronisedScene(ped, scene, animDict, animName, 1.5, -4.0, 1, 16, 1148846080, 0)
for j=1, #scenes[i], 1 do
local s = scenes[i][j]
RequestModel(s.hash)
while not HasModelLoaded(s.hash) do
Wait(0)
end
local obj = CreateObjectNoOffset(s.hash, coords, true, true, true)
SetModelAsNoLongerNeeded(s.hash)
entitiesList[#entitiesList+1] = obj
NetworkAddEntityToSynchronisedScene(obj, scene, animDict, s.animName, 4.0, -8.0, 1)
end
scenesList[#scenesList+1] = scene
end
end)
RegisterNetEvent('coke:removeCane', function(loc)
if DoesEntityExist(CocaPlant[loc]) then DeleteEntity(CocaPlant[loc]) end
CocaPlant[loc] = nil
end)
RegisterNetEvent("coke:init", function()
for k, v in pairs (GlobalState.CocaPlant) do
local hash = GetHashKey(v.model)
LoadModel(hash)
if not v.taken then
CocaPlant[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z, false, true, true)
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
DisableCamCollisionForEntity(ped)
FreezeEntityPosition(ped, true)
for i=1, #scenesList, 1 do
NetworkStartSynchronisedScene(scenesList[i])
end
end)
AddEventHandler('onResourceStop', function(resourceName)
if GetCurrentResourceName() == resourceName then
SetModelAsNoLongerNeeded(GetHashKey('prop_plant_01a'))
for k, v in pairs(CocaPlant) do
if DoesEntityExist(v) then
DeleteEntity(v) SetEntityAsNoLongerNeeded(v)
end
end
Wait(animDuration-11000)
for i=1, #scenesList, 1 do
NetworkStopSynchronisedScene(scenesList[i])
end
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", function(data)
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
for i=1, #entitiesList, 1 do
DeleteEntity(entitiesList[i])
end
TriggerServerEvent("md-drugs:server:cutcokeone", data.data)
cuttingcoke = nil
end)
RegisterNetEvent("md-drugs:client:bagcoke", function(data)
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", data.data)
RemoveAnimDict(animDict)
FreezeEntityPosition(ped, false)
baggingcoke = nil
end)
end
for k, v in pairs (locations.MakePowder) do
Bridge.Target.AddBoxZone('cocaplant'..k, v.loc, v.size, v.loc.w or 180.0, {
{
label = Bridge.Language.Locale('coke.targetMakePow'),
icon = Bridge.Language.Locale('coke.targetMakePowIcon'),
action = function()
if not itemCheck('coca_leaf') then return end
if not progressbar(Bridge.Language.Locale('coke.makePow')) then return end
TriggerServerEvent("md-drugs:server:makepowder", k)
end,
canInteract = function()
return handleGang(v.gang)
end
}
})
targets[#targets+1] = 'cocaplant'..k
end
for k, v in pairs (locations.CuttingCoke) do
Bridge.Target.AddBoxZone('cutcoke'..k, v.loc, v.size, v.loc.w or 180.0, {
{
label = Bridge.Language.Locale('coke.targetCutCoke'),
icon = Bridge.Language.Locale('coke.targetCutCokeIcon'),
action = function()
if not itemCheck('bakingsoda') then return end
CutCoke(v.loc, v.offset, v.rotation)
TriggerServerEvent("md-drugs:server:cutcokeone", k)
end,
canInteract = function()
if not handleGang(v.gang) then return false end
if cuttingcoke ~= nil or baggingcoke ~= nil then return false end
return true
end,
}
})
targets[#targets+1] = 'cutcoke'..k
end
for k, v in pairs (locations.BaggingCoke) do
Bridge.Target.AddBoxZone('bagcoke'..k, v.loc, v.size, v.loc.w or 180.0, {
{
label = Bridge.Language.Locale('coke.targetBagCoke'),
icon = Bridge.Language.Locale('coke.targetBagCokeIcon'),
action = function()
if not itemCheck('empty_weed_bag') then return end
BagCoke(v.loc, v.offset, v.rotation)
TriggerServerEvent("md-drugs:server:bagcoke", k)
end,
canInteract = function()
if not handleGang(v.gang) then return false end
if cuttingcoke ~= nil or baggingcoke ~= nil then return false end
return true
end
}
})
targets[#targets+1] = 'bagcoke'..k
end
for k, v in pairs (locations.cokeTele) do
Bridge.Target.AddBoxZone('coke_tele'..k, v.inside, v.size, v.inside.w or 180.0,{
{
icon = Bridge.Language.Locale('coke.teleOutIcon'),
label = Bridge.Language.Locale('coke.teleOut'),
action = function()
SetEntityCoords(PlayerPedId(), v.outside)
end,
canInteract = function()
return handleGang(v.gang)
end
}
})
targets[#targets+1] = 'coke_tele'..k
Bridge.Target.AddBoxZone('coke_teleout'..k, v.outside, v.size, v.outside.w or 180.0,{
{
icon = Bridge.Language.Locale('coke.teleInIcon'),
label = Bridge.Language.Locale('coke.teleIn'),
action = function()
SetEntityCoords(PlayerPedId(), v.inside)
end,
canInteract = function()
return handleGang(v.gang)
end
}
})
targets[#targets+1] = 'coke_teleout'..k
end
CreateThread(function()
local config = lib.callback.await('md-drugs:server:getLocs', false)
if Config.FancyCokeAnims == false then
AddBoxZoneMulti('cuttcoke', config.CuttingCoke, { type = "client",event = "md-drugs:client:cutcokeone", icon = "fa-solid fa-mortar-pestle", label = Lang.targets.coke.cut})
AddBoxZoneMulti('baggcoke', config.BaggingCoke, { type = "client",event = "md-drugs:client:bagcoke", icon = "fa-solid fa-sack-xmark", label = Lang.targets.coke.bag})
else
AddBoxZoneSingle('cutcoke', config.singleSpot.cutcoke,
{ data = config.singleSpot.cutcoke, type = "client", event = "md-drugs:client:cutcokeone", icon = "fa-solid fa-mortar-pestle", label = Lang.targets.coke.cut, canInteract = function() if cuttingcoke == nil and baggingcoke == nil then return true end end })
AddBoxZoneSingle('bagcokepowder', config.singleSpot.bagcokepowder,
{ data = config.singleSpot.bagcokepowder, type = "client", event = "md-drugs:client:bagcoke", icon = "fa-solid fa-sack-xmark", label = Lang.targets.coke.bag, canInteract = function() if baggingcoke == nil and cuttingcoke == nil then return true end end })
end
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)
+102 -18
View File
@@ -1,13 +1,14 @@
if not Config.Drugs['consumables'] then return end
lib.callback.register('md-drugs:client:consumedrugs', function(time, effect, anim, progresstext, status, item)
if not progressbar(progresstext .. GetLabel(item).. "!", time, anim ) then return end
for k, v in pairs (status) do
Bridge.Callback.Register('md-drugs:client:consumedrugs', function(time, effect, anim, progresstext, status, item)
Bridge.Anim.RequestDict(anim.dict)
if not progressbar(progresstext .. Bridge.Inventory.GetItemInfo(item).label.. "!", time, anim ) then return end
for k, v in pairs (status) do
if k == 'health' then
local cur = GetEntityHealth(PlayerPedId())
SetEntityHealth(PlayerPedId(), cur + v)
elseif k == 'thirst' or k == 'stress' or k == 'hunger' then
TriggerServerEvent('md-drugs:server:updatestatus', k, v)
elseif k == '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')
@@ -33,30 +34,113 @@ RegisterNetEvent('md-drugs:client:recievebuff', function(type, amount)
until count == amount
SetRunSprintMultiplierForPlayer(PlayerPedId(), 1.00)
end
if type == 'strength' then
if type == 'strength' then
local strength = 0
SetCurrentPedWeapon(PlayerPedId(), 'weapon_unarmed', true)
SetWeaponDamageModifier(GetHashKey("WEAPON_UNARMED"), 50.0)
repeat
strength = strength + 1
Wait(1000)
Wait(1000)
until strength == amount
SetWeaponDamageModifier(GetHashKey("WEAPON_UNARMED"), 1.0)
end
end)
local function EcstasyEffect()
local startStamina = 50
SetFlash(0, 0, 500, 20000, 500)
while startStamina > 0 do
Wait(1000)
startStamina = startStamina - 1
RestorePlayerStamina(PlayerId(), 1.0)
if math.random(1, 100) < 51 then
SetFlash(0, 0, 500, 7000, 500)
ShakeGameplayCam('SMALL_EXPLOSION_SHAKE', 0.08)
end
end
if IsPedRunning(PlayerPedId()) then
SetPedToRagdoll(PlayerPedId(), math.random(1000, 3000), math.random(1000, 3000), 3, 0, 0, 0)
end
startStamina = 0
end
local function TrevorEffect()
StartScreenEffect("DrugsTrevorClownsFightIn", 3.0, 0)
Wait(3000)
StartScreenEffect("DrugsTrevorClownsFight", 3.0, 0)
Wait(3000)
StartScreenEffect("DrugsTrevorClownsFightOut", 3.0, 0)
StopScreenEffect("DrugsTrevorClownsFight")
StopScreenEffect("DrugsTrevorClownsFightIn")
StopScreenEffect("DrugsTrevorClownsFightOut")
end
local function MethBagEffect()
local startStamina = 30
TrevorEffect()
SetRunSprintMultiplierForPlayer(PlayerId(), 1.49)
while startStamina > 0 do
Wait(1000)
if math.random(5, 100) < 10 then
RestorePlayerStamina(PlayerId(), 1.0)
end
startStamina = startStamina - 1
if math.random(5, 100) < 51 then
TrevorEffect()
end
end
startStamina = 0
SetRunSprintMultiplierForPlayer(PlayerId(), 1.0)
end
local function AlienEffect()
StartScreenEffect("DrugsMichaelAliensFightIn", 3.0, 0)
Wait(math.random(5000, 8000))
StartScreenEffect("DrugsMichaelAliensFight", 3.0, 0)
Wait(math.random(5000, 8000))
StartScreenEffect("DrugsMichaelAliensFightOut", 3.0, 0)
StopScreenEffect("DrugsMichaelAliensFightIn")
StopScreenEffect("DrugsMichaelAliensFight")
StopScreenEffect("DrugsMichaelAliensFightOut")
end
local function CokeBaggyEffect()
local startStamina = 20
local ped = PlayerPedId()
AlienEffect()
SetRunSprintMultiplierForPlayer(PlayerId(), 1.1)
while startStamina > 0 do
Wait(1000)
if math.random(1, 100) < 20 then
RestorePlayerStamina(PlayerId(), 1.0)
end
startStamina = startStamina - 1
if math.random(1, 100) < 10 and IsPedRunning(ped) then
SetPedToRagdoll(ped, math.random(1000, 3000), math.random(1000, 3000), 3, 0, 0, 0)
end
if math.random(1, 300) < 10 then
AlienEffect()
Wait(math.random(3000, 6000))
end
end
if IsPedRunning(ped) then
SetPedToRagdoll(ped, math.random(1000, 3000), math.random(1000, 3000), 3, 0, 0, 0)
end
startStamina = 0
SetRunSprintMultiplierForPlayer(PlayerId(), 1.0)
end
RegisterNetEvent('md-drugs:client:applyFeeling', function(effect)
if effect == "alien" then
AlienEffect()
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
elseif effect == "meth" then
MethBagEffect()
elseif effect == "coke" then
CokeBaggyEffect()
elseif effect == "trevor" then
TrevorEffect()
end
end)
+201 -89
View File
@@ -1,115 +1,227 @@
local sell = false
local sold = false
local targbusy = false
local inZone = false
local active = false
local buyers = {}
local function reset(targ)
local function walkAway(targ)
FreezeEntityPosition(targ, false)
ClearPedTasks(targ)
local coords = GetEntityCoords(targ)
TaskWanderInArea(targ, coords.x, coords.y, coords.z, 100.0, 2, 10.0)
Wait(10000)
DeletePed(targ)
targbusy = false
sold = true
active = false
end
local function walkAway(targ)
FreezeEntityPosition(targ, false)
ClearPedTasks(targ)
local coords = GetEntityCoords(targ)
TaskWanderInArea(targ, coords.x, coords.y, coords.z, 100.0, 2, 10.0)
Wait(10000)
DeletePed(targ)
targbusy = false
active = false
end
local function 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)
if IsPedInAnyVehicle(PlayerPedId(), true) then
Bridge.Notify.SendNotify(Bridge.Language.Locale('Cornerselling.inVeh'), 'error')
walkAway(targ)
return
end
if not progressbar(Bridge.Language.Locale('Cornerselling.selling', Bridge.Inventory.GetItemInfo(item).label, price)) then
walkAway(targ)
return
end
buyers[targ] = 'sold'
TriggerServerEvent('md-drugs:server:sellCornerDrugs', item, amount, price, NetworkGetNetworkIdFromEntity(targ))
walkAway(targ)
end
local function deny(targ)
PoliceCall(20)
targbusy = true
if not progressbar(Lang.Cornerselling.deny, 4000, 'argue5') then return end
reset(targ)
buyers[targ] = 'sold'
if not progressbar(Bridge.Language.Locale('Cornerselling.deny'), 4000, {
dict = 'anim@amb@casino@brawl@fights@argue@',
clip = 'arguement_loop_mp_m_brawler_01',
flag = 49
}) then return end
walkAway(targ)
end
function Cornersell()
if active then return false end
local targ = lib.GetClosestPed(GetEntityCoords(PlayerPedId()), 8)
if targ == nil then return end
if IsPedInAnyVehicle(targ, false) or GetEntityHealth(targ) == 0 or not IsPedHuman(targ) then return end
local data = lib.callback.await('md-drugs:server:cornerselling:getAvailableDrugs', false, targ)
if data.item == 'nothing' then Notify(Lang.Cornerselling.nodrugs, 'error') sell = false FreezeEntityPosition(targ, false) ClearPedTasks(targ) active = false return false end
TaskGoToCoordAnyMeans(targ, GetEntityCoords(PlayerPedId()), 1.0, 0, 0, 0, 0)
active = true
local function getClosestPed()
local coords = GetEntityCoords(PlayerPedId())
local distance = 10.0
local pedList = GetGamePool('CPed')
local closestDistance = 1000.0
local PED = nil
for i = 1, #pedList do
local ped = pedList[i]
if ped ~= PlayerPedId() then
local pedCoords = GetEntityCoords(ped)
local dist = #(coords - pedCoords)
if dist < closestDistance then
PED = ped
closestDistance = dist
end
end
end
if PED and closestDistance < distance then
return PED, closestDistance
else
return nil
end
end
local function findPed()
local targ = nil
repeat
Wait(100)
targ = getClosestPed()
if IsPedInAnyVehicle(targ, false) or GetEntityHealth(targ) == 0 or not IsPedHuman(targ) then
targ = nil
end
if buyers[targ] then
targ = nil
end
if inZone then
targ = nil
end
until targ ~= nil or sell == false
if not sell then return end
buyers[targ] = true
Bridge.HelpText.ShowHelpText(Bridge.Language.Locale('Cornerselling.wait'))
repeat
Wait(1000)
until #(GetEntityCoords(PlayerPedId()) - GetEntityCoords(targ)) < 2.0
lib.requestAnimDict("rcmme_tracey1")
TaskStartScenarioInPlace(targ, "WORLD_HUMAN_STAND_IMPATIENT_UPRIGHT", 0, false) FreezeEntityPosition(targ, true)
AddMultiModel(data.ped, {
{ label = string.format(Lang.targets.CornerSell.sell, data.amount, GetLabel(data.item), data.price), icon ="fa-solid fa-money-bill",
action = function() sellDrug(data.item, data.amount, data.price, targ) end,
canInteract = function()
if not targbusy then return true end end,
},
{ label = Lang.targets.CornerSell.deny, icon = "fa-solid fa-person-harassing",
action = function() deny(targ) end,
canInteract = function()
if not targbusy then return true end end,
}}, nil)
local timer = 45
repeat
Wait(1000)
timer = timer - 1
until sold or timer == 0
if sold then sold = false return true end
if timer == 0 then Notify(Lang.Cornerselling.timeout, 'error') targbusy = true walkAway(targ) return false end
TaskGoToCoordAnyMeans(targ, GetEntityCoords(PlayerPedId()), 1.0, 0, 0, 0, 0)
until #(GetEntityCoords(PlayerPedId()) - GetEntityCoords(targ)) < 2.0 or sell == false or inZone
if not sell then return end
TaskTurnPedToFaceEntity(targ, PlayerPedId(), -1)
Bridge.HelpText.HideHelpText()
CreateThread(function()
Wait(45000)
walkAway(targ)
buyers[targ] = 'sold'
end)
return targ
end
local function checkItems()
local has = false
for k, v in pairs (GlobalState.DrugNames) do
if Bridge.Inventory.HasItem(v) then
has = true
break
end
end
if not has then
Bridge.Notify.SendNotify(Bridge.Language.Locale('Cornerselling.nodrugs', 'error'))
return false
end
return true
end
local function Cornersell()
if inZone then sell = false return end
if not sell then
return
end
local hasDrugs = checkItems()
if not hasDrugs then
sell = false
return
end
Bridge.HelpText.ShowHelpText(Bridge.Language.Locale('Cornerselling.searching'))
local targ = findPed()
local data = Bridge.Callback.Trigger('md-drugs:server:cornerselling:getAvailableDrugs', NetworkGetNetworkIdFromEntity(targ))
if data == false then
sell = false
return
end
if data == 'robbed' then
TaskGoStraightToCoord(targ, -1858.232910, -1242.395630, 8.60510, 100.0, -1, 0.0, 0.0)
SetPedMoveRateOverride(targ, 10.0)
local got = false
Bridge.Target.AddLocalEntity(targ, {
{
label = Bridge.Language.Locale('Cornerselling.targetTakeBack'),
icon = Bridge.Language.Locale("Cornerselling.targetTakeBackIcon"),
action = function()
got = true
TriggerServerEvent('md-drugs:server:getBackRobbed', NetworkGetNetworkIdFromEntity(targ))
Cornersell()
end,
canInteract = function()
if IsEntityDead(targ) and not got then
return true
end
end,
}
})
targets[#targets+1] = targ
else
Bridge.Anim.RequestDict("rcmme_tracey1")
TaskStartScenarioInPlace(targ, "WORLD_HUMAN_STAND_IMPATIENT_UPRIGHT", 0, false)
FreezeEntityPosition(targ, true)
Bridge.Target.AddLocalEntity(targ, {
{
label = Bridge.Language.Locale('Cornerselling.targetSell', data.amount, Bridge.Inventory.GetItemInfo(data.item).label, data.price),
icon = Bridge.Language.Locale("Cornerselling.targetSellIcon"),
action = function()
sellDrug(data.item, data.amount, data.price, targ)
Cornersell()
end,
canInteract = function()
if buyers[targ] ~= 'sold' and sell then
return true
end
end,
},
{
label = Bridge.Language.Locale('Cornerselling.targetDeny'),
icon = Bridge.Language.Locale("Cornerselling.targetDenyIcon"),
action = function()
deny(targ)
walkAway(targ)
Cornersell()
end,
canInteract = function()
if buyers[targ] == true and sell then
return true
end
end
}
})
targets[#targets+1] = targ
end
end
RegisterNetEvent('md-drugs:client:cornerselling', function()
if not GetCops(QBConfig.MinimumDrugSalePolice) then return end
if inZone then Notify(Lang.Cornerselling.no, 'error') return end
local has = lib.callback.await('md-drugs:server:hasDrugs', false)
if has then
if sell then
TriggerServerEvent('md-drugs:server:cornerselling:stop')
Notify(Lang.Cornerselling.stop, 'error')
sell = false
active = false
else
sell = true
Notify(Lang.Cornerselling.start, 'success')
repeat
Wait(1000)
Cornersell()
until not sell
end
if inZone then
Bridge.Notify.SendNotify(Bridge.Language.Locale('Cornerselling.inNoSellZone'), 'error')
return
end
if sell then
sell = false
Bridge.HelpText.HideHelpText()
Bridge.Notify.SendNotify(Bridge.Language.Locale('Cornerselling.stopped'), 'error')
else
Notify(Lang.Cornerselling.nodrugs, 'error')
sell = true
Bridge.Notify.SendNotify(Bridge.Language.Locale('Cornerselling.start'), 'success')
Cornersell()
end
end)
CreateThread(function()
for k, v in pairs (QBConfig.NoSellZones) do
local box = lib.zones.box({ coords = v.loc, size = vec3(v.width, v.length, v.height), rotation = 180.0, debug = false,
onEnter = function() inZone = true end, onExit = function() inZone = false end})
end
for k, v in pairs (Config.Cornerselling.noSellZones) do
Bridge.Point.Register(
'MDDRUGNOSELLZONE'..k,
v.loc,
((v.width or 10.0) + (v.length or 10.0)) / 2,
nil,
function()
inZone = true
end,
function(point, data)
inZone = false
end
)
end
end)
RegisterNetEvent('md-drugs:client:cornerselling:remove', function(ped)
DeletePed(ped)
end)
+42 -11
View File
@@ -1,12 +1,43 @@
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)
local locations = Config.Crack.Locations
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)
for k, v in pairs (locations.makecrack) do
Bridge.Target.AddBoxZone('makeCrack'..k, v.loc, v.size, v.loc.w or 180.0, {
{
label = Bridge.Language.Locale('crack.targetMake'),
icon = Bridge.Language.Locale('crack.makeIcon'),
action = function()
if not itemCheck('bakingsoda') then return end
if not minigame() then
TriggerServerEvent("md-drugs:server:failcrackone", k)
return
end
if not progressbar(Bridge.Language.Locale('crack.cook')) then return end
TriggerServerEvent('md-drugs:server:makecrackone', k)
end,
canInteract = function()
if not handleGang(v.gang) then return false end
return true
end
}
})
targets[#targets+1] = 'makeCrack'..k
end
for k, v in pairs (locations.bagcrack) do
Bridge.Target.AddBoxZone('bagCrack'..k, v.loc, v.size, v.loc.w or 180.0, {
{
label = Bridge.Language.Locale('crack.targetBag'),
icon = Bridge.Language.Locale('crack.bagIcon'),
action = function()
if not itemCheck('empty_weed_bag') then return end
if not progressbar(Bridge.Language.Locale('crack.bag')) then return end
TriggerServerEvent("md-drugs:server:bagcrack", k)
end,
canInteract = function()
if not handleGang(v.gang) then return false end
return true
end
}
})
targets[#targets+1] = 'bagCrack'..k
end
+70 -51
View File
@@ -1,64 +1,83 @@
local isActive = false
if not Config.Drugs['deliveries'] then return end
local dealer = {}
local buyer = nil
RegisterNetEvent('md-drugs:client:opendealermenu', function()
local rep = GetRep()
makeMenu('dealermenu', rep)
lib.showContext('dealermenu')
end)
repeat Wait(100) until GlobalState.MDDrugDealers ~= nil
local function SpawnDealer()
local getDealers = lib.callback.await('md-drugs:server:getDealers', false)
for k,v in pairs(getDealers) do
local Ped = "g_m_y_famdnf_01"
lib.requestModel(Ped, Config.RequestModelTime)
local loc = json.decode(v.coords)
dealer[k] = CreatePed(0, Ped,loc.x,loc.y, loc.z-1, loc.h, false, false)
Freeze(dealer[k], true, loc.h)
AddMultiModel(dealer[k], {
{ icon = 'fas fa-user-secret', label = string.format(Lang.targets.Delivery.Deliver, v.name),
action = function()
local bool, item, amount, coords = lib.callback.await('md-drugs:server:GetDeliveryItem', false, k)
if bool then
Email(Lang.Delivery.emailn, Lang.Delivery.emailsub, string.format(Lang.Delivery.emailcon, amount, GetLabel(item)))
TriggerEvent('md-drugs:client:setLocation', {bool = bool, item = item, amount = amount, coords = coords})
end
end,
},
{ icon = "fa-solid fa-store", label = string.format(Lang.targets.Delivery.open, v.name),
action = function() TriggerEvent('md-drugs:client:opendealermenu') end,
}}, dealer[k])
if #dealer >= 1 then
for k,v in pairs (dealer) do
DeletePed(v)
end
dealer = {}
end
for k,v in pairs(GlobalState.MDDrugDealers) do
requestModel(v.model)
dealer[k] = CreatePed(0, v.model, v.coords.x, v.coords.y, v.coords.z-1, v.coords.w, false, false)
Freeze(dealer[k], true, v.coords.w)
Bridge.Target.AddLocalEntity(dealer[k], {
{
icon = Bridge.Language.Locale('Deliveries.targetGetDelIcon'),
label = Bridge.Language.Locale('Deliveries.targetGetDel'),
action = function()
TriggerServerEvent('md-drugs:server:requestDelivery', k)
end,
},
{
icon = Bridge.Language.Locale('Deliveries.targetOpenShopIcon'),
label = Bridge.Language.Locale('Deliveries.targetOpenShop'),
action = function()
local rep = GetRep()
local options = {}
for m, d in pairs (Config.Deliveries.Recipes) do
if rep.dealerrep >= d.minrep then
options[#options+1] = {
title = Bridge.Inventory.GetItemInfo(d.name).label,
description = '$' .. d.price,
icon = Bridge.Inventory.GetItemInfo(d.name).image,
onSelect = function()
TriggerServerEvent('md-drugs:server:buyItemDealer', m, k)
end,
}
end
end
Bridge.Menu.Open({
id = 'DealerMenu',
title = Bridge.Language.Locale('Deliveries.shopHeader'),
description = Bridge.Language.Locale('Deliveries.shopHeader'),
options = options
})
end,
}
})
end
end
SpawnDealer()
RegisterNetEvent('md-drugs:client:RefreshDealers', function()
SpawnDealer()
end)
CreateThread(function()
SpawnDealer()
end)
RegisterNetEvent('md-drugs:client:setLocation', function(data)
local coord = json.decode(data.coords)
if buyer then
DeletePed(buyer)
end
local coord = data.coords
SetNewWaypoint(coord.x, coord.y)
if isActive then return end
isActive = true
local Buyer = CreatePed(0, "g_m_y_famdnf_01",coord.x, coord.y, coord.z-1, coord.w, false, false)
Freeze(Buyer, true, coord.w)
AddSingleModel(Buyer, {
icon = 'fas fa-user-secret',
label = Lang.targets.Delivery.hand,
action = function()
if not progressbar(Lang.Delivery.pack, 4000, 'uncuff') then return end
isActive = false
DeletePed(Buyer)
TriggerServerEvent('md-drugs:server:giveDeliveryItems', data.item, data.amount)
end,
canInteract = function()
if isActive then
return true
end
end
}, nil)
end)
requestModel("g_m_y_famdnf_01")
buyer = CreatePed(0, "g_m_y_famdnf_01",coord.x, coord.y, coord.z-1, coord.w, false, false)
Freeze(buyer, true, coord.w)
Bridge.Target.AddLocalEntity(buyer , {
{
icon = Bridge.Language.Locale('Deliveries.targetHandOffIcon'),
label = Bridge.Language.Locale('Deliveries.targetHandOff'),
action = function()
if not progressbar(Bridge.Language.Locale('Deliveries.delivering')) then return end
TriggerServerEvent('md-drugs:server:giveDeliveryItems')
Wait(400)
DeletePed(buyer)
end,
}
})
end)
+184 -480
View File
@@ -1,120 +1,38 @@
local QBCore = exports['qb-core']:GetCoreObject()
local progressbartype = Config.progressbartype
local minigametype = Config.minigametype
local notifytype = Config.Notify
local dispatch = Config.Dispatch
function getJobType()
return QBCore.Functions.GetPlayerData().job.type
end
function getJobName()
return QBCore.Functions.GetPlayerData().job.name
end
function progressbar(text, time, anim)
TriggerEvent('animations:client:EmoteCommandStart', {anim})
if progressbartype == 'oxbar' then
if lib.progressBar({ duration = time, label = text, useWhileDead = false, canCancel = true, disable = { car = true, move = true},}) then
if GetResourceState('scully_emotemenu') == 'started' then
exports.scully_emotemenu:cancelEmote()
else
TriggerEvent('animations:client:EmoteCommandStart', {"c"})
end
return true
end
elseif progressbartype == 'oxcir' then
if lib.progressCircle({ duration = time, label = text, useWhileDead = false, canCancel = true, position = 'bottom', disable = { car = true,move = true},}) then
if GetResourceState('scully_emotemenu') == 'started' then
exports.scully_emotemenu:cancelEmote()
else
TriggerEvent('animations:client:EmoteCommandStart', {"c"})
end
return true
end
elseif progressbartype == 'qb' then
local test = false
local cancelled = false
QBCore.Functions.Progressbar("drink_something", text, time, false, true, { disableMovement = true, disableCarMovement = true, disableMouse = false, disableCombat = true, disableInventory = true,
}, {}, {}, {}, function()-- Done
test = true
if GetResourceState('scully_emotemenu') == 'started' then
exports.scully_emotemenu:cancelEmote()
else
TriggerEvent('animations:client:EmoteCommandStart', {"c"})
end
end, function()
cancelled = true
if GetResourceState('scully_emotemenu') == 'started' then
exports.scully_emotemenu:cancelEmote()
else
TriggerEvent('animations:client:EmoteCommandStart', {"c"})
end
end)
repeat
Wait(100)
until cancelled or test
if test then return true end
else
print"^1 SCRIPT ERROR: Md-DRUGS set your progressbar with one of the options!"
end
end
function loadParticle(dict)
if not HasNamedPtfxAssetLoaded(dict) then
RequestNamedPtfxAsset(dict)
end
while not HasNamedPtfxAssetLoaded(dict) do
Wait(0)
end
SetPtfxAssetNextCall(dict)
end
function LoadModel(hash)
RequestModel(hash)
while not HasModelLoaded(hash) do
function requestModel(ped, timeout)
timeout = timeout or 15000
local startTime = GetGameTimer()
RequestModel(ped)
while not HasModelLoaded(ped) do
Wait(0)
end
if GetGameTimer() - startTime > timeout then
Bridge.Prints.Debug('requestModel timed out', ped, GetGameTimer() - startTime)
return false
end
end
return true
end
function minigame()
local time = 0
local game = Config.Minigames
if minigametype == 'ps_circle' then
local check
exports['ps-ui']:Circle(function(success)
check = success
end, game['ps_circle'].amount, game['ps_circle'].speed)
local check = exports['ps-ui']:Circle(false, game['ps_circle'].amount, game['ps_circle'].speed)
return check
elseif minigametype == 'ps_maze' then
local check
exports['ps-ui']:Maze(function(success)
check = success
end, game['ps_maze'].timelimit)
repeat Wait(10) until check ~= nil
local check = exports['ps-ui']:Maze(false, 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)
repeat Wait(10) until check ~= nil
local check = exports['ps-ui']:Scrambler(false, game['ps_scrambler'].type, game['ps_scrambler'].time, game['ps_scrambler'].mirrored)
return check
elseif minigametype == 'ps_var' then
local check
exports['ps-ui']:VarHack(function(success)
check = success
end, game['ps_var'].numBlocks, game['ps_var'].time)
repeat Wait(10) until check ~= nil
local check = exports['ps-ui']:VarHack(false, game['ps_var'].numBlocks, game['ps_var'].time)
return check
elseif minigametype == 'ps_thermite' then
local check
exports['ps-ui']:Thermite(function(success)
check = success
end, game['ps_thermite'].time, game['ps_thermite'].gridsize, game['ps_thermite'].incorrect)
repeat Wait(10) until check ~= nil
return check
local check = exports['ps-ui']:Thermite(false, game['ps_thermite'].time, game['ps_thermite'].gridsize, game['ps_thermite'].incorrect)
return check
elseif minigametype == 'ox' then
local success = lib.skillCheck(game['ox'], {'1', '2', '3', '4'})
return success
@@ -170,203 +88,34 @@ function minigame()
Wait(1000)
time = time + 1
until successes or time == 100
elseif minigametype == 'none' then
return true
elseif minigametype == 'none' then
return true
else
print"^1 SCRIPT ERROR: Md-Drugs set your minigame with one of the options!"
end
end
function Notify(text, type)
if notifytype =='ox' then
lib.notify({title = text, type = type})
elseif notifytype == 'qb' then
QBCore.Functions.Notify(text, type)
elseif notifytype == 'okok' then
exports['okokNotify']:Alert('', text, 4000, type, false)
else
print"^1 SCRIPT ERROR: Md-DRUGS set your notification with one of the options!"
end
end
function GetImage(img)
if GetResourceState('ox_inventory') == 'started' then
local Items = exports['ox_inventory']:Items()
if not Items[img] then print(' You Are Missing: ' .. img .. ' From Your ox items.lua') return end
local itemClient = Items[img] and Items[img]['client']
if itemClient and itemClient['image'] then
return itemClient['image']
else
return "nui://ox_inventory/web/images/" .. img .. '.png'
end
end
local invs = {
['ps-inventory'] = "nui://ps-inventory/html/images/",
['lj-inventory'] = "nui://lj-inventory/html/images/",
['qb-inventory'] = "nui://qb-inventory/html/images/",
['qs-inventory'] = "nui://qs-inventory/html/imgages/",
['origen_inventory'] = "nui://origen_inventory/html/img/",
['core_inventory'] = "nui://core_inventory/html/img/"
}
for k, v in pairs(invs) do
if not QBCore.Shared.Items[img] then print(' You Are Missing: ' .. img .. ' From Your QB items.lua') return end
if GetResourceState(k) == 'started' then
return v .. QBCore.Shared.Items[img].image
end
end
end
function GetLabel(label)
if GetResourceState('ox_inventory') == 'started' then
local Items = exports['ox_inventory']:Items()
if not Items[label] then print(' You Are Missing: ' .. label .. ' From Your ox items.lua') return end
return Items[label]['label']
else
if QBCore.Shared.Items[label] == nil then print("There Is No " .. label .. " In Your QB Items.lua") return end
return QBCore.Shared.Items[label]['label']
end
end
function GetRep()
local rep = lib.callback.await('md-drugs:server:GetRep', false)
local rep = Bridge.Callback.Trigger('md-drugs:server:GetRep')
return rep
end
function sorter(sorting, value)
table.sort(sorting, function(a, b) return a[value] < b[value] end)
end
function makeMenu(name, rep)
local menu = {}
local data = lib.callback.await('md-drugs:server:menu', false, name)
for k, v in pairs (data.table) do
local allow = false
if rep == nil then
allow = true
else
if rep.dealerrep >= v.minrep then allow = true end
end
if allow then
menu[#menu + 1] = {
icon = GetImage(v.name),
description = '$'.. v.price,
title = GetLabel(v.name),
onSelect = function()
local settext = "Cost: $"..v.price
local dialog = exports.ox_lib:inputDialog(v.name .."!", {
{ type = 'select', label = "Payment Type", default = "cash", options = { { value = "cash"}, { value = "bank"},}},
{ type = 'number', label = "Amount to buy", description = settext, min = 0, max = v.amount, default = 1 },
})
if not dialog[1] then return end
TriggerServerEvent("md-drugs:server:purchaseGoods", dialog[2], dialog[1], v.name, v.price, data.table, k)
end,
}
end
end
sorter(menu, 'title')
lib.registerContext({id = data.id, title = data.title, options = menu})
end
function ItemCheck(item)
if GetResourceState('ox_inventory') == 'started' then
if exports.ox_inventory:GetItemCount(item) >= 1 then return true else Notify('You Need ' .. GetLabel(item) .. " !", 'error') return false end
else
if QBCore.Shared.Items[item] == nil then print("There Is No " .. item .. " In Your QB Items.lua") return end
if QBCore.Functions.HasItem(item) then return true else Notify('You Need ' .. QBCore.Shared.Items[item].label .. " !", 'error') return false end
end
end
function hasItem(item)
if GetResourceState('ox_inventory') == 'started' then
if exports.ox_inventory:GetItemCount(item) >= 1 then return true else return false end
else
if QBCore.Shared.Items[item] == nil then print("There Is No " .. item .. " In Your QB Items.lua") return end
if QBCore.Functions.HasItem(item) then return true else return false end
end
end
function ItemCheckMulti(item)
local need = 0
local has = 0
for k,v in pairs (item) do
need = need + 1
if GetResourceState('ox_inventory') == 'started' then
if exports.ox_inventory:GetItemCount(v) >= 1 then has = has + 1 else Notify('You Need ' .. GetLabel(v) .. " !", 'error') end
else
if QBCore.Shared.Items[v] == nil then print("There Is No " .. item .. " In Your QB Items.lua") return end
if QBCore.Functions.HasItem(v) then has = has + 1 else Notify('You Need ' .. QBCore.Shared.Items[v].label .. " !", 'error') end
end
end
if need == has then
return true
else
return false
end
end
function Email(sender, subject, message)
if Config.Phone == 'yflip' then
local receiver = GetPlayerServerId(PlayerId())
local insertId, received = exports["yflip-phone"]:SendMail({
title = subject,
sender = sender,
senderDisplayName = sender,
content = message,
}, 'phoneNumber', receiver)
elseif Config.Phone == 'qs' then
TriggerServerEvent('qs-smartphone:server:sendNewMail', {
sender = sender,
subject = subject,
message = message,
button = {}
})
else
TriggerServerEvent('qb-phone:server:sendNewMail', {
sender = sender,
subject = subject,
message = message,
})
end
end
function PoliceCall(chance)
local math = math.random(1,100)
if math <= chance then
if dispatch == 'ps' then
exports['ps-dispatch']:DrugSale()
elseif dispatch == 'cd' then
local data = exports['cd_dispatch']:GetPlayerInfo()
TriggerServerEvent('cd_dispatch:AddNotification', {
job_table = {'police', },
coords = data.coords,
title = '420-69 Drug Sale',
message = 'A '..data.sex..' robbing a store at '..data.street,
flash = 0,
unique_id = data.unique_id,
sound = 1,
blip = { sprite = 431, scale = 1.2, colour = 3, flashes = false, text = '420-69 Drug Sale', time = 5, radius = 0,}
})
elseif dispatch == 'core' then
exports['core_dispatch']:addCall("420-69", "Drugs Are Being Sold", {
{icon="fa-ruler", info="4.5 MILES"},
}, {GetEntityCoords(PlayerPedId())}, "police", 3000, 11, 5 )
elseif dispatch == 'aty' then
exports["aty_dispatch"]:SendDispatch('Drug Sale', '420-69', 40, {'police'})
elseif dispatch == 'qs' then
exports['qs-dispatch']:DrugSale()
elseif dispatch == 'codem' then
local Data = {
type = 'Drug Sale',
header = 'Someone Selling Drugs',
text = 'Hurry up and save the community',
code = '420-69',
}
exports['codem-dispatch']:CustomDispatch(Data)
else
print('Congrats, You Choose 0 of the options :)')
end
Bridge.Dispatch.SendAlert({
message = Bridge.Language.Locale('Dispatch.header'),
code = Bridge.Language.Locale('Dispatch.code'),
coords = GetEntityCoords(PlayerPedId()),
jobs = {"police"},
blipData = {
sprite = 161,
color = 1,
scale = 1.0
},
time = 300000,
icon = Bridge.Language.Locale('Dispatch.icon')
})
else
return
end
@@ -374,11 +123,10 @@ 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
local amount = Bridge.Callback.Trigger('md-drugs:server:GetCoppers')
if amount >= number then return true else Bridge.Notify.SendNotify(string.format(Bridge.Language.Locale('Catches.YouNeedMoreCops'), number - amount), 'error') end
end
function Freeze(entity, toggle, head)
SetEntityInvincible(entity, toggle)
SetEntityAsMissionEntity(entity, toggle, toggle)
@@ -387,168 +135,41 @@ function Freeze(entity, toggle, head)
SetBlockingOfNonTemporaryEvents(entity, toggle)
end
function tele(coords)
DoScreenFadeOut(500)
Wait(1000)
SetEntityCoords(PlayerPedId(),coords.x, coords.y, coords.z)
Wait(1000)
DoScreenFadeIn(500)
local function RotationToDirection(rotation)
local adjustedRotation = {
x = (math.pi / 180) * rotation.x,
y = (math.pi / 180) * rotation.y,
z = (math.pi / 180) * rotation.z
}
local direction = {
x = -math.sin(adjustedRotation.z) * math.abs(math.cos(adjustedRotation.x)),
y = math.cos(adjustedRotation.z) * math.abs(math.cos(adjustedRotation.x)),
z = math.sin(adjustedRotation.x)
}
return direction
end
local function RayCastGamePlayCamera(distance)
local currentRenderingCam = false
if not IsGameplayCamRendering() then
currentRenderingCam = GetRenderingCam()
end
function AddBoxZoneSingle(name, loc, data)
if Config.Target == 'qb' then
exports['qb-target']:AddBoxZone(name, loc, 1.5, 1.75, {name = name, minZ = loc.z-1,maxZ = loc.z +1},
{ options = {
{
type = data.type or nil,
event = data.event or nil,
action = data.action or nil,
icon = data.icon or "fa-solid fa-eye",
label = data.label,
data = data.data,
canInteract = data.canInteract,
}
},
distance = 2.0
})
elseif Config.Target == 'ox' then
exports.ox_target:addBoxZone({coords = loc, size = vec3(1,1,1), options = {
{
type = data.type or nil,
event = data.event or nil,
onSelect = data.action or nil,
distance = 2.5,
icon = data.icon or "fa-solid fa-eye",
label = data.label,
data = data.data,
canInteract = data.canInteract,
}
}, })
elseif Config.Target == 'interact' then
exports.interact:AddInteraction({
coords = vector3(loc.x, loc.y, loc.z),
distance = 2.5,
interactDst = 2,
id = name,
options = {
{
type = data.type or nil,
event = data.event or nil,
onSelect = data.action or nil,
distance = 2.5,
label = data.label,
data = data.data,
canInteract = data.canInteract,
},
}
})
end
local cameraRotation = not currentRenderingCam and GetGameplayCamRot() or GetCamRot(currentRenderingCam, 2)
local cameraCoord = not currentRenderingCam and GetGameplayCamCoord() or GetCamCoord(currentRenderingCam)
local direction = RotationToDirection(cameraRotation)
local destination = {
x = cameraCoord.x + direction.x * distance,
y = cameraCoord.y + direction.y * distance,
z = cameraCoord.z + direction.z * distance
}
local _, hit, endCoords, surfaceNormal, entityHit = GetShapeTestResult(StartShapeTestRay(cameraCoord.x, cameraCoord.y, cameraCoord.z, destination.x, destination.y, destination.z, -1, PlayerPedId(), 0))
return _, hit, endCoords, surfaceNormal, entityHit
end
function AddBoxZoneMulti(name, table, data)
for k, v in pairs (table) do
if v.gang == nil or v.gang == '' or v.gang == "" then v.gang = 1 end
if Config.Target == 'qb' then
exports['qb-target']:AddBoxZone(name .. k, v.loc, 1.5, 1.75, {name = name..k, minZ = v.loc.z-1.50,maxZ = v.loc.z +1.5},
{ options = {
{
type = data.type or nil,
event = data.event or nil,
action = data.action or nil,
icon = data.icon or "fa-solid fa-eye",
label = data.label,
data = k,
canInteract = data.canInteract or function()
if QBCore.Functions.GetPlayerData().gang.name == v.gang or v.gang == 1 then return true end end
}
},
distance = 2.5
})
elseif Config.Target == 'ox' then
exports.ox_target:addBoxZone({coords = v.loc, size = vec3(1,1,1), options = {
{
type = data.type or nil,
event = data.event or nil,
onSelect = data.action or nil,
icon = data.icon or "fa-solid fa-eye",
label = data.label,
data = k,
distance = 2.5,
canInteract = data.canInteract or function()
if QBCore.Functions.GetPlayerData().gang.name == v.gang or v.gang == 1 then return true end end
}
}, })
elseif Config.Target == 'interact' then
exports.interact:AddInteraction({
coords = vector3(v.loc.x, v.loc.y, v.loc.z),
distance = 2.5,
interactDst = 2,
id = name,
options = {
{
type = data.type or nil,
event = data.event or nil,
action = data.action or nil,
distance = 2.5,
label = data.label or "fa-solid fa-eye",
data = k,
canInteract = data.canInteract or function()
if QBCore.Functions.GetPlayerData().gang.name == v.gang or v.gang == 1 then return true end end
},
}
})
end
end
end
function AddBoxZoneMultiOptions(name, loc, data)
local options = {}
for k, v in pairs (data) do
table.insert(options, {
icon = v.icon or "fa-solid fa-eye", label = v.label, event = v.event or nil, action = v.action or nil,
onSelect = v.action,data = v.data,canInteract = v.canInteract or nil, distance = 2.0,
})
end
if Config.Target == 'qb' then
exports['qb-target']:AddBoxZone(name , loc, 1.5, 1.75, {name = name, minZ = loc.z-1.50,maxZ = loc.z +1.5},
{ options = options, distance = 2.5})
elseif Config.Target == 'ox' then
exports.ox_target:addBoxZone({coords = loc, size = vec3(1,1,1), options = options })
elseif Config.Target == 'interact' then
exports.interact:AddInteraction({coords = vector3(loc.x, loc.y, loc.z),distance = 2.5,interactDst = 2,id = name,options = options})
end
end
function AddSingleModel(model, data, num)
if Config.Target == 'qb' then
exports['qb-target']:AddTargetEntity(model, {options = {
{icon = data.icon or "fa-solid fa-eye", label = data.label, event = data.event or nil, action = data.action or nil, data = num }
}, distance = 2.5})
elseif Config.Target == 'ox' then
exports.ox_target:addLocalEntity(model, {icon = data.icon, label = data.label, event = data.event or nil, onSelect = data.action or nil, data = num, distance = 2.5 })
elseif Config.Target == 'interact' then
exports.interact:AddLocalEntityInteraction({entity = model,offset = vec3(0.0, 0.0, 1.0),id = 'mddrugs'..model,distance = 2.5,interactDst = 2.5, options = {label = data.label, event = data.event or nil, action = data.action or nil, data = num, distance = 2.5 }})
end
end
function AddMultiModel(model, data, num)
local options = {}
for k, v in pairs (data) do
table.insert(options, {
icon = v.icon or "fa-solid fa-eye", label = v.label, event = v.event or nil, action = v.action or nil,
onSelect = v.action,data = v.data,canInteract = v.canInteract or nil, distance = 2.0,
})
end
if Config.Target == 'qb' then
exports['qb-target']:AddTargetEntity(model, {options = options, distance = 2.5})
elseif Config.Target == 'ox' then
exports.ox_target:addLocalEntity(model, options)
elseif Config.Target == 'interact' then
local loc = GetEntityCoords(model)
exports.interact:AddLocalEntityInteraction({entity = model,offset = vec3(0.0, 0.0, 1.0),id = 'mddrugss'..model,distance = 2.5,interactDst = 2.5, options = data})
end
local function ray()
local _, hit, endCoords, surfaceNormal, entityHit = RayCastGamePlayCamera(1000.0)
return hit, endCoords, surfaceNormal, entityHit
end
local created = false
@@ -556,13 +177,13 @@ local heading = 180.0
function StartRay()
local run = true
local pedcoord = GetEntityCoords(PlayerPedId())
lib.requestModel('v_ret_ml_tablea', 30000)
requestModel('v_ret_ml_tablea', 30000)
local table = CreateObject('v_ret_ml_tablea', pedcoord.x, pedcoord.y, pedcoord.z+1, heading, false, false)
repeat
local hit, entityHit, endCoords, surfaceNormal, matHash = lib.raycast.cam(511, 4, 10)
local hit, endCoords, surfaceNormal, entityHit = ray()
if not created then
created = true
lib.showTextUI([[[E] To Place
Bridge.HelpText.ShowHelpText([[[E] To Place
[DEL] To Cancel
[<-] To Move Left
[->] To Move Right]])
@@ -579,7 +200,7 @@ function StartRay()
heading = heading + 2
end
if IsControlPressed(0, 38) then
lib.hideTextUI()
Bridge.HelpText.HideHelpText()
run = false
DeleteObject(table)
created = false
@@ -587,7 +208,7 @@ function StartRay()
end
if IsControlPressed(0, 178) then
lib.hideTextUI()
Bridge.HelpText.HideHelpText()
run = false
created = false
DeleteObject(table)
@@ -600,13 +221,13 @@ end
function StartRay2()
local run = true
local pedcoord = GetEntityCoords(PlayerPedId())
lib.requestModel('bkr_prop_coke_press_01aa', 30000)
requestModel('bkr_prop_coke_press_01aa', 30000)
local table = CreateObject('bkr_prop_coke_press_01aa', pedcoord.x, pedcoord.y, pedcoord.z+1, heading, false, false)
repeat
local hit, entityHit, endCoords, surfaceNormal, matHash = lib.raycast.cam(511, 4, 10)
local hit, endCoords, surfaceNormal, entityHit = ray()
if not created then
created = true
lib.showTextUI([[[E] To Place
Bridge.HelpText.ShowHelpText([[[E] To Place
[DEL] To Cancel
[<-] To Move Left
[->] To Move Right]])
@@ -623,7 +244,7 @@ function StartRay2()
heading = heading + 2
end
if IsControlPressed(0, 38) then
lib.hideTextUI()
Bridge.HelpText.HideHelpText()
run = false
DeleteObject(table)
created = false
@@ -631,7 +252,7 @@ function StartRay2()
end
if IsControlPressed(0, 178) then
lib.hideTextUI()
Bridge.HelpText.HideHelpText()
run = false
created = false
DeleteObject(table)
@@ -641,38 +262,121 @@ function StartRay2()
until run == false
end
CreateThread(function()
LoadModel('prop_plant_01b')
LoadModel('prop_plant_01a')
LoadModel('prop_cactus_03')
LoadModel('prop_weed_01')
TriggerEvent('weed:init')
TriggerEvent('heroin:init')
TriggerEvent('coke:init')
TriggerEvent('Mescaline:init')
TriggerEvent('shrooms:init')
TriggerEvent('weed:init')
end)
lib.callback.register('md-drugs:client:uncuff', function(data)
if not progressbar(data, 4000, 'uncuff') then return end
Bridge.Callback.Register('md-drugs:client:uncuff', function(data)
if not progressbar(data) then return end
return true
end)
RegisterCommand('DrugRep', function()
if not Config.TierSystem then return end
local rep = lib.callback.await('md-drugs:server:GetRep', false)
lib.registerContext({
id = 'DrugRep',
title = 'Drug Reputation',
local rep = GetRep()
Bridge.Menu.Open({
id = 'drugrep',
title = Bridge.Language.Locale('DrugRep.header'),
description = Bridge.Language.Locale('DrugRep.increased'),
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 }
{icon = Bridge.Language.Locale('DrugRep.coke.icon'), title = Bridge.Language.Locale('DrugRep.coke.title', rep.coke)},
{icon = Bridge.Language.Locale('DrugRep.heroin.icon'), title = Bridge.Language.Locale('DrugRep.heroin.title', rep.heroin)},
{icon = Bridge.Language.Locale('DrugRep.lsd.icon'), title = Bridge.Language.Locale('DrugRep.lsd.title', rep.lsd)},
{icon = Bridge.Language.Locale('DrugRep.dealerrep.icon'), title = Bridge.Language.Locale('DrugRep.dealerrep.title', rep.dealerrep)},
{icon = Bridge.Language.Locale('DrugRep.cornerselling.icon'), title = Bridge.Language.Locale('DrugRep.cornerselling.title', rep.cornerselling.rep), description = Bridge.Language.Locale('DrugRep.cornerselling.description', rep.cornerselling.label) }
}
})
lib.showContext('DrugRep')
})
end, false)
if Bridge.Framework.GetResourceName() == 'es_extended' then
function handleGang(gang)
return true
end
else
function handleGang(gang)
if not gang then
return true
end
if #gang == 0 then
return true
end
local data = Bridge.Framework.GetPlayerData()
if not data.gang then
return false
end
return data.gang.name == gang
end
end
if Config.Emotes == 'scully' then
function playEmote(emote)
exports.scully_emotemenu:playEmoteByCommand(emote, 0)
end
function stopEmote()
exports.scully_emotemenu:cancelEmote()
end
end
if Config.Emotes == 'dpemotes' then
function playEmote(emote)
TriggerEvent('animations:client:EmoteCommandStart', {emote})
end
function stopEmote()
TriggerEvent('animations:client:EmoteCommandStart', {"c"})
end
end
if Config.Emotes == 'rpemotes' then
function playEmote(emote)
exports["rpemotes"]:EmoteCommandStart(emote, 0)
end
function stopEmote()
exports["rpemotes"]:EmoteCancel()
end
end
local animation = nil
function progressbar(text, time, emote, cancel)
local animData
if type(emote) == 'string' then
playEmote(emote)
animation = emote
elseif type(emote) == 'table' then
animData = emote
if emote.prop and not emote.prop.model then
emote.prop = nil
end
end
local success = Bridge.ProgressBar.Open({
duration = time or 5000,
label = text or 'LAZY AF DEVS',
canCancel = true,
disable = cancel or Config.ProgressBar.Disables,
anim = animData or Config.DefaultAnimation,
prop = animData and animData.prop or nil
})
if animation then
animation = nil
stopEmote()
end
return success
end
function itemCheck(item)
if not Bridge.Inventory.HasItem(item) then
Bridge.Notify.SendNotify(Bridge.Language.Locale('Catches.itemMissings', Bridge.Inventory.GetItemInfo(item).label), 'error')
return false
end
return true
end
AddEventHandler('onResourceStop', function(resourceName)
if GetCurrentResourceName() ~= resourceName then return end
for k, v in pairs (targets) do
if type(v) == 'number' then
Bridge.Target.RemoveLocalEntity(v)
if DoesEntityExist(v) then
DeleteEntity(v)
end
else
Bridge.Target.RemoveZone(v)
end
end
end)
+131 -103
View File
@@ -1,127 +1,155 @@
local PoppyPlants = {}
if not Config.Drugs['heroin'] then return end
local herointable = false
local dirty = false
local locations = Config.Heroin.Locations
local function createLabKit(coord, head)
local heroinlabkit = CreateObject("v_ret_ml_tablea", coord.x, coord.y, coord.z - 1, true, false,false)
SetEntityHeading(heroinlabkit, head)
PlaceObjectOnGroundProperly(heroinlabkit)
AddMultiModel(heroinlabkit, {
{data = heroinlabkit, event = "md-drugs:client:heatliquidheroin", icon = "fa-solid fa-temperature-high", label = Lang.targets.heroin.cook, canInteract = function() if not dirty then return true end end},
{data = heroinlabkit, event = "md-drugs:client:getheroinkitback", icon = "fas fa-box-circle-check", label = Lang.targets.heroin.up, canInteract = function() if not dirty then return true end end},
{data = heroinlabkit, event = "md-drugs:client:cleanheroinlabkit",icon = "fa-solid fa-hand-sparkles",label = Lang.targets.heroin.clean,canInteract = function() if dirty then return true end end}},heroinlabkit)
end
Bridge.Target.AddLocalEntity(heroinlabkit, {
{
icon = Bridge.Language.Locale('heroin.cookIcon'),
label = Bridge.Language.Locale('heroin.targetCook'),
action = function()
if not itemCheck('emptyvial') then return end
local function pickher(loc)
if not progressbar(Lang.Heroin.pick, 4000, 'uncuff') then return end
TriggerServerEvent("heroin:pickupCane", loc)
end
RegisterNetEvent('heroin:respawnCane', function(loc)
local v = GlobalState.PoppyPlants[loc]
local hash = GetHashKey(v.model)
if not PoppyPlants[loc] then
PoppyPlants[loc] = CreateObject(hash, v.location, false, true, true)
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)
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('onResourceStop', function(resourceName)
if GetCurrentResourceName() == resourceName then
SetModelAsNoLongerNeeded(GetHashKey('prop_plant_01b'))
for k, v in pairs(PoppyPlants) do
if DoesEntityExist(v) then
DeleteEntity(v) SetEntityAsNoLongerNeeded(v)
if not minigame() then
dirty = true
TriggerServerEvent("md-drugs:server:failheatingheroin")
local coords = GetEntityCoords(heroinlabkit)
AddExplosion(coords.x, coords.y, coords.z-1.0, 34, 0.0, true, false, true)
SetParticleFxLoopedAlpha(heroinkit, 3.0)
SetPedToRagdoll(PlayerPedId(), 1300, 1300, 0, 0, 0, 0)
return
end
if not progressbar(Bridge.Language.Locale('heroin.pbCook')) then return end
TriggerServerEvent("md-drugs:server:heatliquidheroin")
end,
canInteract = function()
if not dirty then return true end
end
end
end)
},
{
icon = Bridge.Language.Locale('heroin.targetPickupIcon'),
label = Bridge.Language.Locale('heroin.targetPickup'),
action = function()
if not progressbar(Bridge.Language.Locale('heroin.pbPickup')) then return end
herointable = false
DeleteObject(heroinlabkit)
TriggerServerEvent("md-drugs:server:getheroinlabkitback")
end,
canInteract = function()
if not dirty then return true end
return false
end
},
{
icon = Bridge.Language.Locale('heroin.targetCleanIcon'),
label = Bridge.Language.Locale('heroin.targetClean'),
action = function()
if not itemCheck('cleaningkit') then return end
if not progressbar(Bridge.Language.Locale('heroin.pbClean'), 4000, 'clean') then return end
local done = Bridge.Callback.Trigger('md-drugs:server:removeCleaningKitHeroin', false)
if done then dirty = false end
end,
canInteract = function()
if dirty then return true end
return false
end
}})
targets[#targets+1] = heroinlabkit
end
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)
for k, v in pairs (locations.dryplant) do
Bridge.Target.AddBoxZone('dryHeroin'..k, v.loc, v.size, v.loc.w or 180.0, {
{
label = Bridge.Language.Locale('heroin.targetDry'),
icon = Bridge.Language.Locale('heroin.dryIcon'),
action = function()
if not progressbar(Bridge.Language.Locale('heroin.pbDry')) then return end
TriggerServerEvent("md-drugs:server:dryplant", k)
end,
canInteract = function()
return handleGang(v.gang)
end
}
})
targets[#targets+1] = 'dryHeroin'..k
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)
for k, v in pairs (locations.cutheroinone) do
Bridge.Target.AddBoxZone('cutHeroin'..k, v.loc, v.size, v.loc.w or 180.0, {
{
label = Bridge.Language.Locale('heroin.targetCutHeroin'),
icon = Bridge.Language.Locale('heroin.cutIcon'),
action = function()
if not itemCheck('bakingsoda') then return end
if not progressbar(Bridge.Language.Locale('heroin.pbCutHeroin')) then return end
TriggerServerEvent("md-drugs:server:cutheroin", k)
end,
canInteract = function()
return handleGang(v.gang)
end
}
})
targets[#targets+1] = 'cutHeroin'..k
end
RegisterNetEvent("md-drugs:client:buyheroinlabkit", function()
if not progressbar(Lang.Heroin.secret, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:getheroinlabkit")
end)
local peds = {}
for k, v in pairs (locations.buyKit) do
requestModel(v.ped, 1000)
peds[k] = CreatePed(4, v.ped, v.loc.x, v.loc.y, v.loc.z, v.loc.w, false, false)
Freeze(peds[k], true, v.loc.w)
SetBlockingOfNonTemporaryEvents(peds[k], true)
SetEntityInvincible(peds[k], true)
Bridge.Target.AddLocalEntity(peds[k], {
{
label = Bridge.Language.Locale('heroin.targetBuyKit'),
icon = Bridge.Language.Locale('heroin.buyIcon'),
action = function()
if not progressbar(Bridge.Language.Locale('heroin.pbBuyKit')) then return end
TriggerServerEvent("md-drugs:server:getheroinlabkit", k)
end,
canInteract = function()
if not handleGang(v.gang) then return false end
return true
end
}
})
targets[#targets+1] = peds[k]
end
lib.callback.register("md-drugs:client:setheroinlabkit", function()
if herointable then
Notify(Lang.Heroin.tableout, 'error')
Bridge.Callback.Register("md-drugs:client:setheroinlabkit", function()
if herointable then
Bridge.Notify.SendNotify(Bridge.Language.Locale('heroin.tableout'), 'error')
return false
else
herointable = true
local location, head = StartRay()
if not location then herointable = false return end
if not progressbar(Lang.Heroin.table, 4000, 'uncuff') then return end
if not progressbar(Bridge.Language.Locale('heroin.placing')) then return end
createLabKit(location, head)
return true, location
end
end)
RegisterNetEvent("md-drugs:client:heatliquidheroin", function(data)
local loc, head = GetEntityCoords(data.data), GetEntityHeading(data.data)
if not ItemCheck('emptyvial') then return end
if not minigame() then
dirty = true
TriggerServerEvent("md-drugs:server:failheatingheroin")
loadParticle("core")
local heroinkit = StartParticleFxLoopedOnEntity("exp_air_molotov", data.data, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.5, false, false, false)
SetParticleFxLoopedAlpha(heroinkit, 3.0)
SetPedToRagdoll(PlayerPedId(), 1300, 1300, 0, 0, 0, 0)
return end
if not progressbar(Lang.Heroin.success, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:heatliquidheroin")
end)
RegisterNetEvent("md-drugs:client:cleanheroinlabkit", function(data)
if not ItemCheck('cleaningkit') then return end
if not progressbar(Lang.Heroin.clean, 4000, 'clean') then return end
local done = lib.callback.await('removeCleaningkit', false)
if done then dirty = false end
end)
RegisterNetEvent("md-drugs:client:deletedirtyheroin", function(data)
local location,head = GetEntityCoords(data), GetEntityHeading(data)
DeleteObject(data)
createLabKit(location, head)
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)
for k, v in pairs (locations.fillneedle) do
Bridge.Target.AddBoxZone('fillNeedle'..k, v.loc, v.size, v.loc.w or 180.0, {
{
label = Bridge.Language.Locale('heroin.targetFill'),
icon = Bridge.Language.Locale('heroin.fillNeedleIcon'),
action = function()
if not minigame() then TriggerServerEvent("md-drugs:server:failheroin", k) return end
if not progressbar(Bridge.Language.Locale('heroin.pbFill')) then return end
TriggerServerEvent("md-drugs:server:fillneedle", k)
end,
canInteract = function()
return handleGang(v.gang)
end
}
})
targets[#targets+1] = 'fillNeedle'..k
end
+126 -37
View File
@@ -1,41 +1,130 @@
RegisterNetEvent("md-drugs:client:getsyruplocationtobuy", function()
Notify(Lang.Lean.marked, "success")
SpawnCarPedChase()
end)
if not Config.Drugs['lean'] then return end
local started = false
local leanCar = nil
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})
local location = Config.Lean.Locations
local function SpawnCarPedChase(loc)
local stoploc = vector3(-1157.63, -3056.71, 13.94)
local start = location.StartLoc[math.random(1,#location.StartLoc)]
if started then Bridge.Notify.SendNotify(Bridge.Language.Locale('lean.alreadyChasing'), 'error') return end
started = true
requestModel("pounder", 30000)
requestModel("ig_priest", 30000)
requestModel("cargobob3", 30000)
leanCar = CreateVehicle("pounder", start.x+3, start.y-2, start.z-1, 52.0, true, false)
local driver = CreatePed(26, "ig_priest", start.x, start.y, start.z, 268.9422, false, false)
local pilot2 = CreatePed(26, "ig_priest", stoploc.x-3, stoploc.y-3, stoploc.z-1, 268.9422, false, false)
local can = Bridge.Callback.Trigger('md-drugs:server:registerLean', loc, NetworkGetNetworkIdFromEntity(leanCar))
if not can then
Bridge.Notify.SendNotify(Bridge.Language.Locale('lean.cantStart'), 'error')
DeleteVehicle(leanCar)
DeleteEntity(driver)
DeleteEntity(pilot2)
started = false
return
end
Bridge.Notify.SendNotify(Bridge.Language.Locale('lean.chaseStarted'), 'success')
SetPedIntoVehicle(pilot2, leanCar, 1)
FreezeEntityPosition(driver, true)
FreezeEntityPosition(pilot2, true)
SetEntityInvincible(pilot2, true)
SetEntityAsMissionEntity(leanCar)
AddBlipForEntity(leanCar)
SetPedIntoVehicle(driver, leanCar, -1)
SetPedFleeAttributes(driver,false)
TaskVehicleDriveToCoordLongrange(driver, leanCar, stoploc.x, stoploc.y, stoploc.z-1, 50.0, 524288, 25.0)
SetPedKeepTask(driver, true)
repeat
Wait(1000)
until #(GetEntityCoords(driver) - stoploc) < 20.0 or GetEntityHealth(driver) == 0
RemoveBlip(leanCar)
if GetEntityHealth(driver) == 0 then
Bridge.Target.AddLocalEntity(leanCar, {
{
name = 'leancar',
icon = Bridge.Language.Locale('lean.carIcon'),
label = Bridge.Language.Locale('lean.stealFromTruck'),
action = function()
if not minigame() then return end
TriggerServerEvent('md-drugs:server:givelean')
started = false
DeleteEntity(driver)
DeleteEntity(pilot2)
end
}
})
targets[#targets+1] = leanCar
else
DeleteEntity(driver)
DeleteEntity(pilot2)
end
end
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
local leanPeds = {}
for k, v in pairs (location.SyrupVendor) do
requestModel(v.ped)
leanPeds[k] = CreatePed(0, v.ped, v.loc.x, v.loc.y, v.loc.z, false, false)
Freeze(leanPeds[k], true, v.loc.w)
Bridge.Target.AddLocalEntity(leanPeds[k], {
{
icon = Bridge.Language.Locale('lean.startMissionIcon'),
label = Bridge.Language.Locale('lean.startMission'),
action = function()
SpawnCarPedChase(k)
end,
canInteract = function()
if not handleGang(v.gang) then return false end
return true
end
},
})
targets[#targets+1] = leanPeds[k]
end
local function concat(tbl)
local str = ""
for k, v in pairs (tbl) do
str = str .. v.item .. " X " .. v.amount .. " \n "
end
return str
end
local function getDisabled(recipe)
for k, v in pairs (recipe.ingredients) do
local count = Bridge.Inventory.GetItemCount(v.item)
if count < v.amount then
return true
end
end
return false
end
RegisterNetEvent("md-drugs:client:makeLean", function()
local menu = {}
for k, v in pairs (Config.Lean.Recipes) do
menu[#menu+1] = {
title = Bridge.Inventory.GetItemInfo(v.item).label,
description = concat(v.ingredients),
icon = Bridge.Inventory.GetItemInfo(v.item).image,
disabled = getDisabled(v),
onSelect = function()
if not progressbar(Bridge.Language.Locale('lean.makingLean')) then return end
TriggerServerEvent('md-drugs:server:makeLean', k)
end,
}
end
Bridge.Menu.Open({
id = 'makeLeanMenu',
title = Bridge.Language.Locale('lean.makeLeanMenuTitle'),
description = Bridge.Language.Locale('lean.makeLeanMenuDesc'),
options = menu
})
end)
+153 -73
View File
@@ -1,103 +1,183 @@
if not Config.Drugs['lsd'] then return end
local tableout = false
local dirtylsd = false
local locations = Config.LSD.Locations
local function createLabKit(coord, head)
requestModel("v_ret_ml_tablea")
local labkit = CreateObject("v_ret_ml_tablea", coord.x, coord.y, coord.z - 1, true, false)
SetEntityHeading(labkit, head)
PlaceObjectOnGroundProperly(labkit)
FreezeEntityPosition(labkit, true)
tableout = true
local options = {
{ event = "md-drugs:client:heatliquid", icon = "fa-solid fa-temperature-high", label = Lang.targets.lsd.heat, data = labkit, canInteract = function() if not dirtylsd then return true end end },
{ event = "md-drugs:client:refinequalityacid", icon = "fa-solid fa-temperature-high", label = Lang.targets.lsd.refine, data = labkit,canInteract = function() if not dirtylsd then return true end end },
{ event = "md-drugs:client:maketabpaper", icon = "fa-regular fa-note-sticky", label = Lang.targets.lsd.dab, data = labkit, canInteract = function() if not dirtylsd then return true end end },
{ event = "md-drugs:client:getlabkitback", icon = "fas fa-box-circle-check", label = Lang.targets.lsd.back, data = labkit, canInteract = function() if not dirtylsd then return true end end },
{icon = "fa-solid fa-hand-sparkles", label = Lang.targets.lsd.clean, data = labkit,
{
icon = Bridge.Language.Locale('lsd.targetHeatIcon'),
label = Bridge.Language.Locale('lsd.targetHeat'),
action = function()
if not ItemCheck('cleaningkit') then return end
if not progressbar(Lang.lsd.clean, 4000, 'clean') then return end
local check = lib.callback.await('md-drugs:server:removecleaningkit')
if check then
if not minigame() then
local coords = GetEntityCoords(labkit)
AddExplosion(coords.x, coords.y, coords.z-1.0, 34, 0.0, true, false, true)
dirtylsd = true
TriggerServerEvent("md-drugs:server:failheating")
return
end
if not progressbar(Bridge.Language.Locale('lsd.heating'), 7000) then return end
TriggerServerEvent("md-drugs:server:heatliquid")
end,
canInteract = function()
if not dirtylsd then return true end
end
},
{
icon = Bridge.Language.Locale('lsd.targetRefineIcon'),
label = Bridge.Language.Locale('lsd.targetRefine'),
action = function()
if not itemCheck('lsd_one_vial') then return end
if not minigame() then TriggerServerEvent("md-drugs:server:failrefinequality") return end
if not progressbar(Bridge.Language.Locale('lsd.refining')) then return end
TriggerServerEvent("md-drugs:server:refinequalityacid")
end,
canInteract = function()
if not dirtylsd then return true end
end
},
{
icon = Bridge.Language.Locale('lsd.targetDippingIcon'),
label = Bridge.Language.Locale('lsd.targetDipping'),
action = function()
if not itemCheck('tab_paper') then return end
if not minigame() then TriggerServerEvent("md-drugs:server:failtabs") return end
if not progressbar(Bridge.Language.Locale('lsd.dipping')) then return end
TriggerServerEvent("md-drugs:server:maketabpaper")
end,
canInteract = function()
if not dirtylsd then return true end
end
},
{
icon = Bridge.Language.Locale('lsd.targetPickupIcon'),
label = Bridge.Language.Locale('lsd.targetPickup'),
action = function()
if not progressbar(Bridge.Language.Locale('lsd.packup')) then return end
DeleteObject(labkit)
TriggerServerEvent('md-drugs:server:getlabkitback')
tableout = false
end,
canInteract = function()
if not dirtylsd then return true end
end
},
{
icon = Bridge.Language.Locale('lsd.targetCleanIcon'),
label = Bridge.Language.Locale('lsd.targetClean'),
action = function()
if not itemCheck('cleaningkit') then return end
if not progressbar(Bridge.Language.Locale('lsd.cleaning'), 4000, 'clean') then return end
local check = Bridge.Callback.Trigger('md-drugs:server:removecleaningkit')
if check then
dirtylsd = false
end
end,
canInteract = function() if dirtylsd then return true end end
}
}
AddMultiModel(labkit, options, labkit)
Bridge.Target.AddLocalEntity(labkit, options)
targets[#targets+1] = labkit
end
RegisterNetEvent("md-drugs:client:getlysergic", function(data)
if not minigame() then return end
if not progressbar(Lang.lsd.steallys, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:getlysergic",data.data)
end)
for k, v in pairs (locations.lysergicacid) do
Bridge.Target.AddBoxZone('lysergicacid'..k,v.loc, v.size, v.loc.w or 180.0, {
{
label = Bridge.Language.Locale('lsd.targetLys'),
icon = Bridge.Language.Locale('lsd.targetLysIcon'),
action = function()
if not minigame() then TriggerServerEvent("md-drugs:server:faillysergic") return end
if not progressbar(Bridge.Language.Locale('lsd.stealLys')) then return end
TriggerServerEvent("md-drugs:server:getlysergic", k)
end,
canInteract = function()
if not handleGang(v.gang) then return false end
return true
end
}
})
targets[#targets+1] = 'lysergicacid'..k
end
for k, v in pairs (locations.diethylamide) do
Bridge.Target.AddBoxZone('diethylamide'..k, v.loc, v.size, v.loc.w or 180.0, {
{
label = Bridge.Language.Locale('lsd.targetDie'),
icon = Bridge.Language.Locale('lsd.targetDieIcon'),
action = function()
if not minigame() then TriggerServerEvent("md-drugs:server:faildiethylamide") return end
if not progressbar(Bridge.Language.Locale('lsd.stealDie')) then return end
TriggerServerEvent("md-drugs:server:getdiethylamide", k)
end,
canInteract = function()
if not handleGang(v.gang) then return false end
return true
end
}
})
targets[#targets+1] = 'diethylamide'..k
end
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)
for k, v in pairs (locations.gettabs) do
Bridge.Target.AddBoxZone('gettabs'..k, v.loc, v.size, v.loc.w or 180.0, {
{
label = Bridge.Language.Locale('lsd.targetBuyTab'),
icon = Bridge.Language.Locale('lsd.targetBuyTabIcon'),
action = function()
TriggerServerEvent("md-drugs:server:gettabpaper", k)
end,
canInteract = function()
if not handleGang(v.gang) then return false end
return true
end
}
})
targets[#targets+1] = 'gettabs'..k
end
local seller = {}
for k, v in pairs (locations.buyLSDkit) do
requestModel(v.ped, 1000)
seller[k] = CreatePed(4, v.ped, v.loc.x, v.loc.y, v.loc.z, v.loc.w, false, false)
Freeze(seller[k], true, v.loc.w)
Bridge.Target.AddLocalEntity(seller[k], {
{
label = Bridge.Language.Locale('lsd.targetBuyKit'),
icon = Bridge.Language.Locale('lsd.targetBuyKitIcon'),
action = function()
if Bridge.Inventory.HasItem('lsdlabkit') then
Bridge.Notify.SendNotify(Bridge.Language.Locale('lsd.alreadyOwn'), 'error')
return
end
if not progressbar(Bridge.Language.Locale('lsd.buyingKit')) then return end
TriggerServerEvent('md-drugs:server:getlabkit', k)
end,
canInteract = function()
if not handleGang(v.gang) then return false end
return true
end
}
})
targets[#targets+1] = seller[k]
end
lib.callback.register("md-drugs:client:setlsdlabkit", function()
if tableout then
Notify(Lang.lsd.tableout, 'error')
Bridge.Callback.Register("md-drugs:client:setlsdlabkit", function()
if tableout then
Bridge.Notify.SendNotify(Bridge.Language.Locale('lsd.tableout'), 'error')
return false
else
tableout = true
local loc, head = StartRay()
if not loc then tableout = false return end
if not progressbar(Lang.lsd.place, 4000, 'uncuff') then return end
if not progressbar(Bridge.Language.Locale('lsd.placing')) then return end
createLabKit(loc, head)
return true, loc
end
end)
RegisterNetEvent("md-drugs:client:getlabkitback", function(data)
if not progressbar(Lang.lsd.tablepack, 4000, 'uncuff') then return end
DeleteObject(data.data)
TriggerServerEvent('md-drugs:server:getlabkitback')
tableout = false
end)
RegisterNetEvent("md-drugs:client:heatliquid", function(data)
local PedCoords, head = GetEntityCoords(data.data), GetEntityHeading(data.data)
local dict = "scr_ie_svm_technical2"
if not ItemCheck('lysergic_acid') then return end
if not ItemCheck('diethylamide') then return end
if not minigame() then
dirtylsd = true
loadParticle(dict)
local exitPtfx = StartParticleFxLoopedOnEntity("scr_dst_cocaine", data.data, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.5, false, false, false)
SetParticleFxLoopedAlpha(exitPtfx, 3.0)
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: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: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: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:buylabkit", function()
if hasItem('lsdlabkit') then Notify(Lang.lsd.hav, 'error') return end
if not progressbar(Lang.lsd.buykit, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:getlabkit")
end)
+35 -50
View File
@@ -1,62 +1,47 @@
local Mescaline = {}
local function pick(loc)
if not progressbar(Lang.mescaline.pick, 4000, 'uncuff') then return end
TriggerServerEvent("Mescaline:pickupCane", loc)
if not Config.Drugs['mescaline'] then return end
local badTrip = 100
local locations = Config.Mescaline.Locations
local function AlienEffect()
CreateThread(function()
StartScreenEffect("DrugsMichaelAliensFightIn", 3.0, 0)
StartScreenEffect("DrugsMichaelAliensFight", 3.0, 0)
Wait(math.random(25000, 35000))
StartScreenEffect("DrugsMichaelAliensFightOut", 3.0, 0)
StopScreenEffect("DrugsMichaelAliensFightIn")
StopScreenEffect("DrugsMichaelAliensFight")
StopScreenEffect("DrugsMichaelAliensFightOut")
end)
end
RegisterNetEvent('Mescaline:respawnCane', function(loc)
local v = GlobalState.Mescaline[loc]
local hash = GetHashKey(v.model)
if not Mescaline[loc] then
Mescaline[loc] = CreateObject(hash, v.location, false, true, true)
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)
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('onResourceStop', function(resourceName)
if GetCurrentResourceName() == resourceName then
SetModelAsNoLongerNeeded(GetHashKey('prop_cactus_03'))
for k, v in pairs(Mescaline) do
if DoesEntityExist(v) then
DeleteEntity(v) SetEntityAsNoLongerNeeded(v)
end
end
end
end)
RegisterNetEvent("md-drugs:client:drymescaline", 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)
for k, v in pairs (locations.DryOutMescaline) do
Bridge.Target.AddBoxZone('dryoutMesc'..k, v.loc, v.size, v.loc.w or 180.0,{
{
label = Bridge.Language.Locale('mesc.targetDry'),
icon = 'fa-solid fa-temperature-high',
action = function()
if not itemCheck('cactusbulb') then return end
if not progressbar(Bridge.Language.Locale('mesc.dry')) then return end
TriggerServerEvent("md-drugs:server:drymescaline", k)
end,
canInteract = function()
if not handleGang(v.gang) then return false end
return true
end
}
})
targets[#targets+1] = 'dryoutMesc'..k
end
RegisterNetEvent("md-drugs:client:takemescaline", function()
local chance, chance2 = math.random(1,100), math.random(1,100)
local weapon = ''
if chance2 == 100 then weapon = 'weapon_rpg' else weapon = 'weapon_flaregun' end
if not progressbar(Lang.mescaline.eat, 4000, 'uncuff') then return end
if chance <= Config.Badtrip then
if not progressbar(Bridge.Language.Locale('mesc.eat')) then return end
if chance <= badTrip then
AlienEffect()
local clone = ClonePed(PlayerPedId(), false, false, true)
Wait(math.random(3000,6000))
local clone = ClonePed(PlayerPedId(), true, true, true)
SetEntityAsMissionEntity(clone)
SetPedFleeAttributes(clone, false)
GiveWeaponToPed(clone, weapon, 1, false, true)
+427 -101
View File
@@ -1,126 +1,452 @@
local amonia = nil
local tray = nil
local heated = nil
local active = nil
if not Config.Drugs['meth'] then return end
local amonia, tray, heated, active, trays, startedmeth, methVan = false, false, false, false, nil, false, nil
local locations = Config.Meth.Locations
--- meth heist
local function 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
local function SpawnMethCarPedChase(loc)
local stoploc = vector3(-1157.63, -3056.71, 13.94)
local start = locations.StartLoc[math.random(1,#locations.StartLoc)]
if startedmeth then
Bridge.Notify.SendNotify(Bridge.Language.Locale('meth.alreadyChasing'),'error')
else
startedmeth = true
requestModel("journey", 30000)
requestModel("a_m_m_hillbilly_02", 30000)
requestModel("cargobob3", 30000)
methVan = CreateVehicle("journey", start.x+3, start.y-2, start.z-1, 52.0, true, false)
local methdriver = CreatePed(26, "a_m_m_hillbilly_02", start.x, start.y, start.z, 268.9422, false, false)
local methpilot = CreatePed(26, "a_m_m_hillbilly_02", stoploc.x-3, stoploc.y-3, stoploc.z-1, 268.9422, false, false)
local can = Bridge.Callback.Trigger('md-drugs:server:registerMeth', loc, NetworkGetNetworkIdFromEntity(methVan))
if not can then
startedmeth = false
DeleteVehicle(methVan)
DeleteEntity(methdriver)
DeleteEntity(methpilot)
return
end
FreezeEntityPosition(methpilot, true)
SetEntityInvincible(methpilot, true)
SetEntityAsMissionEntity(methVan)
AddBlipForEntity(methVan)
SetPedIntoVehicle(methdriver, methVan, -1)
SetPedFleeAttributes(methdriver,false)
TaskVehicleDriveToCoordLongrange(methdriver, methVan, stoploc.x, stoploc.y, stoploc.z-1, 50.0, 524288, 25.0)
SetPedKeepTask(methdriver, true)
repeat
Wait(1000)
until #(GetEntityCoords(methdriver) - stoploc) < 20.0 or GetEntityHealth(methdriver) == 0
if GetEntityHealth(methdriver) == 0 then
Bridge.Target.AddLocalEntity(methVan, {
{
name = 'methcar',
icon = Bridge.Language.Locale('meth.targetStealFromCarIcon'),
label = Bridge.Language.Locale('meth.targetStealFromCar'),
action = function()
if not minigame() then return end
TriggerServerEvent('md-drugs:server:givemethingridients', NetworkGetNetworkIdFromEntity(methVan))
startedmeth = false
DeleteEntity(methdriver)
DeleteEntity(methpilot)
end,
}
})
else
DeleteVehicle(methVan)
DeleteEntity(methdriver)
DeleteEntity(methpilot)
end
end
end
local peds = {}
for k, v in pairs (locations.MethHeist) do
peds[k] = CreatePed(4, GetHashKey(v.ped), v.loc.x, v.loc.y, v.loc.z, v.loc.w, false, true)
Freeze(peds[k], true, v.loc.w)
Bridge.Target.AddLocalEntity(peds[k], {
{
icon = Bridge.Language.Locale('meth.targetHeistIcon'),
label = Bridge.Language.Locale('meth.targetHeist'),
action = function()
if startedmeth then
Bridge.Notify.SendNotify(Bridge.Language.Locale('meth.alreadyChasing'),'error')
return
end
SpawnMethCarPedChase(k)
end,
canInteract = function()
return handleGang(v.gang)
end
}
})
targets[#targets+1] = peds[k]
end
---- start animation shit
local function loadParticle(dict)
if not HasNamedPtfxAssetLoaded(dict) then
RequestNamedPtfxAsset(dict)
end
while not HasNamedPtfxAssetLoaded(dict) do
Wait(0)
end
SetPtfxAssetNextCall(dict)
end
local function dialSuccess(coords)
requestModel('hei_prop_heist_thermite', 2000)
loadParticle('scr_ornate_heist')
local thermite = CreateObject('hei_prop_heist_thermite', coords.x - 0.5, coords.y - 0.5, coords.z -0.5, true, false, false)
FreezeEntityPosition(thermite, true)
SetEntityVisible(thermite, false)
Wait(1000)
local therm = StartParticleFxLoopedOnEntity('scr_heist_ornate_thermal_burn', thermite, 0.0, 1.4, 0.0, 0.0, 0.0, 0.0, 1.5, false, false, false)
Wait(math.random(10000, 20000))
StopParticleFxLooped(therm, true)
DeleteObject(thermite)
end
local function MethCooking(coords, offset, rotation)
local animDict, animName = "anim@amb@business@meth@meth_monitoring_cooking@cooking@", "chemical_pour_short_cooker"
Bridge.Anim.RequestDict(animDict)
SetEntityCoords(PlayerPedId(), coords)
local targetPosition = GetEntityCoords(PlayerPedId())
local animDuration = GetAnimDuration(animDict, animName) * 800
FreezeEntityPosition(PlayerPedId(), true)
local scenePos, sceneRot = vector3(coords.x + offset.x, coords.y + offset.y, coords.z + offset.z), rotation
local netScene = NetworkCreateSynchronisedScene(scenePos, sceneRot, 2, false, false, 1065353216, 0, 1.3)
NetworkAddPedToSynchronisedScene(PlayerPedId(), netScene, animDict, animName, 1.5, -4.0, 1, 16, 1148846080, 0)
local sacid = CreateObjectNoOffset("bkr_prop_meth_sacid", targetPosition, 1, 1, 0)
NetworkAddEntityToSynchronisedScene(sacid, netScene, animDict, "chemical_pour_short_sacid", 4.0, -8.0, 1)
local ammonia = CreateObjectNoOffset("bkr_prop_meth_ammonia", targetPosition, 1, 1, 0)
NetworkAddEntityToSynchronisedScene(ammonia, netScene, animDict, "chemical_pour_short_ammonia", 4.0, -8.0, 1)
NetworkStartSynchronisedScene(netScene)
Wait(animDuration)
NetworkStopSynchronisedScene(netScene)
DeleteObject(sacid) DeleteObject(ammonia)
FreezeEntityPosition(PlayerPedId(), false)
end
local function SmashMeth(coords, offset, rotation)
local ver = ""
local animDict, animName = "anim@amb@business@meth@meth_smash_weight_check@", "break_weigh_"..ver.."char02"
Bridge.Anim.RequestDict(animDict, 500)
local ped = PlayerPedId()
local targetPosition = coords
SetEntityCoords(ped, targetPosition)
Wait(1)
local animDuration = GetAnimDuration(animDict, animName) * 800
FreezeEntityPosition(ped, true)
local scenePos, sceneRot = vector3(coords.x + offset.x, coords.y + offset.y, coords.z + offset.z), rotation
local netScene = NetworkCreateSynchronisedScene(scenePos, sceneRot, 2, false, false, 1065353216, 0, 1.3)
NetworkAddPedToSynchronisedScene(ped, netScene, animDict, animName, 1.5, -4.0, 1, 16, 1148846080, 0)
local objects, sceneObjects = {}, {
{ hash = "w_me_hammer", animName = "break_weigh_" .. ver .. "hammer"},
{ hash = "bkr_Prop_Meth_SmashedTray_01_frag_", animName = "break_weigh_"..ver.."tray01"},
{ hash = "bkr_Prop_Meth_Tray_02a", animName = "break_weigh_"..ver.."tray01^1"},
{ hash = "bkr_Prop_Meth_Tray_02a", animName = "break_weigh_"..ver.."tray01^2"},
{ hash = "bkr_Prop_Meth_SmashedTray_01_frag_", animName = "break_weigh_"..ver.."tray01^3"},
}
for i=1, #sceneObjects, 1 do
local obj = CreateObjectNoOffset(sceneObjects[i].hash, targetPosition, true, true, true)
NetworkAddEntityToSynchronisedScene(obj, netScene, animDict, sceneObjects[i].animName, 4.0, -8.0, 1)
objects[#objects+1] = obj
end
NetworkStartSynchronisedScene(netScene)
Wait(animDuration)
NetworkStopSynchronisedScene(netScene)
for i=1, #objects, 1 do
DeleteObject(objects[i])
end
RemoveAnimDict(animDict)
FreezeEntityPosition(ped, false)
end
local function BagMeth(coords, offset, rotation)
local ver = ""
local animDict, animName = "anim@amb@business@meth@meth_smash_weight_check@", "break_weigh_"..ver.."char01"
Bridge.Anim.RequestDict(animDict, 500)
local animDuration = GetAnimDuration(animDict, animName) * 1000
local ped = PlayerPedId()
SetEntityCoords(ped, coords)
local scenePos, sceneRot = vector3(coords.x + offset.x, coords.y + offset.y, coords.z + offset.z), rotation
local scenes = {
{
{ hash = "bkr_prop_meth_bigbag_04a", animName = "break_weigh_"..ver.."box01"},
{ hash = "bkr_prop_meth_bigbag_03a", animName = "break_weigh_"..ver.."box01^1"},
{ hash = "bkr_prop_meth_openbag_02", animName = "break_weigh_"..ver.."methbag01"}
},
{
{ hash = "bkr_prop_meth_openbag_02", animName = "break_weigh_"..ver.."methbag01^1"},
{ hash = "bkr_prop_meth_openbag_02", animName = "break_weigh_"..ver.."methbag01^2"},
{ hash = "bkr_prop_meth_openbag_02", animName = "break_weigh_"..ver.."methbag01^3"}
},
{
{ hash = "bkr_prop_meth_openbag_02", animName = "break_weigh_"..ver.."methbag01^4"},
{ hash = "bkr_prop_meth_openbag_02", animName = "break_weigh_"..ver.."methbag01^5"},
{ hash = "bkr_prop_meth_openbag_02", animName = "break_weigh_"..ver.."methbag01^6"}
},
{
{ hash = "bkr_prop_meth_scoop_01a", animName = "break_weigh_"..ver.."scoop"},
{ hash = "bkr_prop_coke_scale_01", animName = "break_weigh_"..ver.."scale"},
{ hash = "bkr_prop_fakeid_penclipboard", animName = "break_weigh_"..ver.."pen"}
},
{
{ hash = "bkr_prop_fakeid_clipboard_01a", animName = "break_weigh_"..ver.."clipboard"},
{ hash = "bkr_Prop_Meth_Tray_02a", animName = "break_weigh_"..ver.."tray01^5"}
}
}
local scenesList, entitiesList = {}, {}
for i=1, #scenes, 1 do
local scene = NetworkCreateSynchronisedScene(scenePos, sceneRot, 2, false, false, 1065353216, 0, 1.3)
NetworkAddPedToSynchronisedScene(ped, scene, animDict, animName, 1.5, -4.0, 1, 16, 1148846080, 0)
for j=1, #scenes[i], 1 do
local s = scenes[i][j]
RequestModel(s.hash)
while not HasModelLoaded(s.hash) do
Wait(0)
end
local obj = CreateObjectNoOffset(s.hash, coords, true, true, true)
SetModelAsNoLongerNeeded(s.hash)
entitiesList[#entitiesList+1] = obj
NetworkAddEntityToSynchronisedScene(obj, scene, animDict, s.animName, 4.0, -8.0, 1)
end
scenesList[#scenesList+1] = scene
end
DisableCamCollisionForEntity(ped)
FreezeEntityPosition(ped, true)
for i=1, #scenesList, 1 do
NetworkStartSynchronisedScene(scenesList[i])
end
Wait(animDuration-11000)
for i=1, #scenesList, 1 do
NetworkStopSynchronisedScene(scenesList[i])
end
for i=1, #entitiesList, 1 do
DeleteEntity(entitiesList[i])
end
RemoveAnimDict(animDict)
FreezeEntityPosition(ped, false)
end
---------------------- end animation shit
---
local function startcook(num, coords, offset, rotation)
if not amonia then
local adding = Bridge.Callback.Trigger('md-drugs:server:startcook', num)
if not adding then return end
active = true
TriggerServerEvent("md-drugs:server:startcook")
MethCooking()
MethCooking(coords, offset, rotation)
amonia = true
else
Notify(Lang.meth.inside, "error")
Bridge.Notify.SendNotify(Bridge.Language.Locale('meth.started'), "error")
end
end
local function dials()
if amonia == true then
local function dials(coords)
if amonia then
if not minigame() then
AddExplosion(1005.773, -3200.402, -38.524, 49, 10, true, false, true)
ClearPedTasks(PlayerPedId())
amonia = nil
active = nil
return end
Notify(Lang.meth.increaseheat, "success")
ClearPedTasks(PlayerPedId())
heated = true
else
AddExplosion(coords.x, coords.y,coords.z, 49, 10, true, false, true)
amonia = false
active = false
return
end
Bridge.Notify.SendNotify(Bridge.Language.Locale('meth.increaseHeat'), "success")
dialSuccess(coords)
heated = true
end
end
local function smash()
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
local function smash(coords, offset, rotation, buckets, k)
if active and tray and amonia and heated then
DeleteObject(trays)
tray = false
local bucket = CreateObject("bkr_prop_meth_bigbag_03a", buckets.x, buckets.y, buckets.z, true, true, true)
Freeze(bucket, true, buckets.w)
SmashMeth(coords, offset, rotation)
Wait(100)
Bridge.Target.AddLocalEntity(bucket, {
{
name = 'bucket',
icon = Bridge.Language.Locale('meth.targetBagIcon'),
label = Bridge.Language.Locale('meth.targetBag'),
action = function()
DeleteObject(bucket)
active = false
amonia = false
heated = false
tray = false
BagMeth(locations.BagMeth[k].loc, locations.BagMeth[k].offset, locations.BagMeth[k].rotation)
TriggerServerEvent('md-drugs:server:getmeth', k)
end,
canInteract = function()
if not active then return false end
return true
end,
}
})
targets[#targets+1] = bucket
end
end
local function trayscarry()
if amonia then
if amonia and heated 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)
Bridge.Anim.RequestDict('anim@heists@box_carry@')
TaskPlayAnim(PlayerPedId(), 'anim@heists@box_carry@', 'idle', 5.0, -1, -1, 50, 0, false, false, false)
requestModel('bkr_prop_meth_tray_02a')
trays = CreateObject("bkr_prop_meth_tray_02a", pos.x, pos.y, pos.z, true, true, true)
AttachEntityToEntity(trays, PlayerPedId(), GetPedBoneIndex(PlayerPedId(), 28422), 0.01, -0.2,-0.2, 20.0, 0.0, 0.0, true, true, false, true, 1, true)
tray = true
end
end
for k, v in pairs (locations.CookMeth) do
Bridge.Target.AddBoxZone('cookMeth'..k, v.loc, v.size, v.loc.w or 180.0, {
{
label = Bridge.Language.Locale('meth.targetCook'),
icon = Bridge.Language.Locale('meth.targetCookIcon'),
action = function()
startcook(k, v.loc, v.offset or vec3(0,0,0), v.rotation or vector3(0,0,180.0))
end,
canInteract = function()
if not handleGang(v.gang) then return false end
if not amonia and not active then
return true
end
end,
},
{
icon = Bridge.Language.Locale('meth.targetGrabTrayIcon'),
label = Bridge.Language.Locale('meth.targetGrabTray'),
action = function() trayscarry() end,
canInteract = function()
if not handleGang(v.gang) then return false end
if heated and amonia and not tray then
return true
end
end,
},
})
targets[#targets+1] = 'cookMeth'..k
end
for k, v in pairs (locations.MethDials) do
Bridge.Target.AddBoxZone('adjustMethDials'..k, v.loc, v.size, v.loc.w or 180.0, {
{
name = 'adjustdials',
icon = Bridge.Language.Locale('meth.targetHeatIcon'),
label = Bridge.Language.Locale('meth.targetHeat'),
action = function()
dials(locations.CookMeth[k].loc)
end,
canInteract = function()
if not handleGang(v.gang) then return false end
if amonia and heated == false then return true end
end
}
})
targets[#targets+1] = 'adjustMethDials'..k
end
for k, v in pairs (locations.MethSmash) do
Bridge.Target.AddBoxZone('smashMeth'..k, v.loc, v.size, v.loc.w or 180.0, {
{
name = 'smash',
icon = Bridge.Language.Locale('meth.targetSmashIcon'),
label = Bridge.Language.Locale('meth.targetSmash'),
action = function()
smash(v.loc, v.offset, v.rotation, v.bucket,k)
end,
canInteract = function()
if not handleGang(v.gang) then return false end
if heated and amonia and tray then return true end
end
}
})
targets[#targets+1] = 'smashMeth'..k
end
for k, v in pairs (locations.MethTele) do
Bridge.Target.AddBoxZone('meth_tele'..k, v.inside, v.size, v.rot, {
{
icon = Bridge.Language.Locale('meth.teleOutIcon'),
label = Bridge.Language.Locale('meth.teleOut'),
action = function()
SetEntityCoords(PlayerPedId(), v.outside)
end,
canInteract = function()
return handleGang(v.gang)
end
}
})
Bridge.Target.AddBoxZone('meth_teleout'..k, v.outside, v.size, v.rot, {
{
icon = Bridge.Language.Locale('meth.teleInIcon'),
label = Bridge.Language.Locale('meth.teleIn'),
action = function()
SetEntityCoords(PlayerPedId(), v.inside)
end,
canInteract = function()
return handleGang(v.gang)
end
}
})
targets[#targets+1] = 'meth_tele'..k
targets[#targets+1] = 'meth_teleout'..k
end
RegisterCommand('offset', function()
local pos = GetEntityCoords(PlayerPedId())
Wait(4000)
local offset = GetEntityCoords(PlayerPedId()) - pos
print("Offset: ", offset)
end)
for k, v in pairs (locations.MethEph) do
Bridge.Target.AddBoxZone('stealMethEph'..k, v.loc, v.size, v.loc.w or 180.0, {
{
label = Bridge.Language.Locale('meth.targetStealEPH'),
icon = Bridge.Language.Locale('meth.targetStealEPHIcon'),
action = function()
if not progressbar(Bridge.Language.Locale('meth.stealingEPH')) then return end
TriggerServerEvent("md-drugs:server:geteph", k)
end,
canInteract = function()
return handleGang(v.gang)
end
}
})
targets[#targets+1] = 'stealMethEph'..k
end
for k, v in pairs (locations.MethAce) do
Bridge.Target.AddBoxZone('stealMethAce'..k, v.loc, v.size, v.loc.w or 180.0, {
{
label = Bridge.Language.Locale('meth.targetStealACE'),
icon = Bridge.Language.Locale('meth.targetStealACEIcon'),
action = function()
if not progressbar(Bridge.Language.Locale('meth.stealingACE')) then return end
TriggerServerEvent("md-drugs:server:getace", k)
end,
canInteract = function()
return handleGang(v.gang)
end
}
})
targets[#targets+1] = 'stealMethAce'..k
end
CreateThread(function()
BikerMethLab = exports['bob74_ipl']:GetBikerMethLabObject()
BikerMethLab.Style.Set(BikerMethLab.Style.upgrade)
BikerMethLab.Security.Set(BikerMethLab.Security.upgrade)
BikerMethLab.Details.Enable(BikerMethLab.Details.production, true)
RefreshInterior(BikerMethLab.interiorId)
end)
CreateThread(function()
local config = lib.callback.await('md-drugs:server:getLocs', false)
AddBoxZoneSingle("methTeleOut",config.singleSpot.MethTeleIn, {name = 'teleout', icon = "fa-solid fa-door-open", label = Lang.targets.meth.enter, action = function() SetEntityCoords(PlayerPedId(), config.singleSpot.MethTeleOut) end} )
AddBoxZoneSingle("methtelein",config.singleSpot.MethTeleOut, {name = 'teleout', icon = "fa-solid fa-door-closed", label = Lang.targets.meth.exit, action = function() SetEntityCoords(PlayerPedId(), config.singleSpot.MethTeleIn) end} )
local options = {
{ name = 'methcook', icon = "fa-solid fa-temperature-high", label = Lang.targets.meth.cook, distance = 2.5, action = function() startcook() end,
canInteract = function()
if amonia == nil 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 = "fa-solid fa-weight-scale",label = Lang.targets.meth.box,action = function() smash()end,
canInteract = function()
if tray then return true end
end})
AddBoxZoneSingle('adjustdials',vector3(1007.89, -3201.17, -38.99),{ name = 'adjustdials', icon = "fa-solid fa-temperature-three-quarters", label = Lang.targets.meth.adjust,
distance = 5, action = function() dials() end,
canInteract = function()
if amonia and heated == nil then return true end end
})
if Config.MethHeist == false then
AddBoxZoneMulti('methep', config.MethEph, {icon = "fa-solid fa-bucket", label = Lang.targets.meth.eph, event = 'md-drugs:client:stealeph'})
AddBoxZoneMulti('methace', config.Methace, {icon = "fa-solid fa-bucket", label = Lang.targets.meth.ace, event = 'md-drugs:client:stealace'})
end
end)
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)
+95 -68
View File
@@ -1,74 +1,101 @@
if not Config.Drugs['oxyruns'] then return end
local carryPackage = nil
local onMission = false
local locations = Config.Oxy.Locations
local pdAlert = 90
local vehicle = nil
RegisterNetEvent("md-drugs:client:GetOxyCar", function()
lib.requestModel("burrito3", Config.RequestModelTime)
local paid = lib.callback.await('md-drugs:server:payfortruck', false)
if not paid then return end
local loca = lib.callback.await('md-drugs:server:getLocs', false)
local loc = loca.singleSpot.truckspawn
local oxycar = CreateVehicle("burrito3",loc.x, loc.y,loc.z, loc.w, true, false)
exports[Config.Fuel]:SetFuel(oxycar, 100.0)
TriggerEvent("vehiclekeys:client:SetOwner", GetVehicleNumberPlateText(oxycar))
Notify(Lang.oxy.truck, 'success')
TriggerEvent("md-drugs:client:getoxylocationroute")
AddSingleModel(oxycar, { event = "md-drugs:client:getfromtrunk", icon = "fa-solid fa-box", label = Lang.targets.oxy.pack}, nil )
end)
local function getRoute()
local Route = Bridge.Callback.Trigger('md-drugs:server:getRoute')
if not Route then
Bridge.Notify.SendNotify(Bridge.Language.Locale('oxy.ditchCar'), "error")
onMission = false
return false
end
local Route = locations.oxylocations[Route]
SetNewWaypoint(Route.x, Route.y)
requestModel('g_m_y_famdnf_01', 30000)
local oxybuyer = CreatePed(0, 'g_m_y_famdnf_01',Route.x,Route.y,Route.z-1, Route.w, false, false)
Freeze(oxybuyer, true, Route.w)
local timeOut = 300
RegisterNetEvent("md-drugs:client:getoxylocationroute", function()
local config = lib.callback.await('md-drugs:server:getLocs', false)
local loc = config.oxylocations[math.random(#config.oxylocations)]
if loc ~= nil then
SetNewWaypoint(loc.x, loc.y)
local current = "g_m_y_famdnf_01"
lib.requestModel(current, Config.RequestModelTime)
local oxybuyer = CreatePed(0, current,loc.x,loc.y,loc.z-1, loc.w, false, false)
Freeze(oxybuyer, true, loc.w)
repeat
Wait(1000)
until #(GetEntityCoords(PlayerPedId()) - vector3(loc.x,loc.y,loc.z)) < 5.0
PoliceCall(Config.PoliceAlertOxy)
AddSingleModel(oxybuyer, { type = "client", label = Lang.targets.oxy.talk, icon = "fa-solid fa-dollar-sign",
action = function()
if carryPackage then
if not progressbar(Lang.oxy.hand, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:giveoxybox")
DeleteEntity(oxybuyer)
DetachEntity(carryPackage, true, true)
DeleteObject(carryPackage)
carryPackage = nil
else
Notify(Lang.oxy.empty, "error")
repeat
Wait(1000)
timeOut = timeOut - 1
until #(GetEntityCoords(PlayerPedId()) - vector3(Route.x,Route.y,Route.z)) < 5.0 or timeOut == 0
PoliceCall(pdAlert)
Bridge.Target.AddLocalEntity(oxybuyer,{
{
label = Bridge.Language.Locale('oxy.targetHandoff'),
icon = Bridge.Language.Locale('oxy.targetHandOffIcon'),
action = function()
if carryPackage then
if not progressbar(Bridge.Language.Locale('oxy.handingoff')) then return end
TriggerServerEvent("md-drugs:server:giveoxybox")
DeleteEntity(oxybuyer)
DetachEntity(carryPackage, true, true)
DeleteObject(carryPackage)
carryPackage = nil
getRoute()
else
Bridge.Notify.SendNotify(Bridge.Language.Locale('oxy.emptyHands'), "error")
end
end
end}, oxybuyer)
end
end)
}
})
targets[#targets+1] = oxybuyer
end
for k, v in pairs(locations.OxyPayForTruck) do
Bridge.Target.AddBoxZone('oxyTruckPur' ..k , v.loc, v.size, v.loc.w or 180.0, {
{
icon = Bridge.Language.Locale('oxy.targetPayIcon'),
label = Bridge.Language.Locale('oxy.targetPay'),
action = function()
requestModel("burrito3", 30000)
RegisterNetEvent("md-drugs:client:getfromtrunk", function()
if carryPackage then
Notify(Lang.oxy.cantcarry, "error")
else
local pos = GetEntityCoords(PlayerPedId(), true)
lib.requestAnimDict('anim@heists@box_carry@')
TaskPlayAnim(PlayerPedId(), 'anim@heists@box_carry@', 'idle', 5.0, -1, -1, 50, 0, false, false, false)
lib.RequestModel("hei_prop_drug_statue_box_big")
local object = CreateObject("hei_prop_drug_statue_box_big", pos.x, pos.y, pos.z, true, true, true)
AttachEntityToEntity(object, PlayerPedId(), GetPedBoneIndex(PlayerPedId(), 57005), 0.05, 0.1, -0.3, 300.0, 250.0, 20.0, true, true, false, true, 1, true)
carryPackage = object
end
end)
RegisterNetEvent("md-drugs:client:giveoxybox", function(data)
if carryPackage then
if not progressbar(Lang.oxy.hand, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:giveoxybox")
DeleteEntity(data.ped)
DetachEntity(carryPackage, true, true)
DeleteObject(carryPackage)
carryPackage = nil
else
Notify(Lang.oxy.empty, "error")
end
end)
local paid = Bridge.Callback.Trigger('md-drugs:server:payfortruck', k)
if not paid then return end
vehicle = CreateVehicle("burrito3",v.truckSpawn.x, v.truckSpawn.y, v.truckSpawn.z, v.truckSpawn.w, true, false)
SetVehicleFuelLevel(vehicle, 100.0)
local plate = GetVehicleNumberPlateText(vehicle)
Bridge.VehicleKey.GiveKeys(vehicle, plate)
Bridge.Notify.SendNotify(Bridge.Language.Locale('oxy.keys'), 'success')
onMission = true
TriggerServerEvent('md-drugs:server:startOxyRun', NetworkGetNetworkIdFromEntity(vehicle))
Bridge.Target.AddLocalEntity(vehicle, {
{
icon = Bridge.Language.Locale('oxy.targetGetPackageIcon'),
label = Bridge.Language.Locale('oxy.targetGetPackage'),
action = function()
if carryPackage then
Bridge.Notify.SendNotify(Bridge.Language.Locale('oxy.alreadyCarrying'), "error")
else
local pos = GetEntityCoords(PlayerPedId(), true)
Bridge.Anim.RequestDict('anim@heists@box_carry@')
TaskPlayAnim(PlayerPedId(), 'anim@heists@box_carry@', 'idle', 5.0, -1, -1, 50, 0, false, false, false)
requestModel("hei_prop_drug_statue_box_big")
carryPackage = CreateObject("hei_prop_drug_statue_box_big", pos.x, pos.y, pos.z, true, true, true)
AttachEntityToEntity(carryPackage, PlayerPedId(), GetPedBoneIndex(PlayerPedId(), 57005), 0.05, 0.1, -0.3, 300.0, 250.0, 20.0, true, true, false, true, 1, true)
end
end,
canInteract = function()
return handleGang(v.gang)
end
}
})
Wait(1000)
getRoute()
end,
canInteract = function()
if onMission then
return false
end
return true
end
}
})
targets[#targets+1] = 'oxyTruckPur' ..k
end
-27
View File
@@ -1,27 +0,0 @@
CreateThread(function()
local config = lib.callback.await('md-drugs:server:getLocs', false)
local num = lib.callback.await('md-drugs:server:GetMerchant', false)
local model = {"g_m_y_famdnf_01", 's_m_m_doctor_01', 'u_m_m_jesus_01', "prop_cooker_03"}
for k, v in pairs (model) do
lib.requestModel(v, Config.RequestModelTime)
end
local tabdealer = CreatePed(0, 'g_m_y_famdnf_01',config.singleSpot.buylsdlabkit.x,config.singleSpot.buylsdlabkit.y,config.singleSpot.buylsdlabkit.z-1,config.singleSpot.buylsdlabkit.w, false, false)
local heroinkitdealer = CreatePed(0,"g_m_y_famdnf_01",config.singleSpot.buyheroinlabkit.x, config.singleSpot.buyheroinlabkit.y, config.singleSpot.buyheroinlabkit.z-1, config.singleSpot.buyheroinlabkit.w, false, false)
local SyrupLocation = CreatePed(0, 's_m_m_doctor_01', config.singleSpot.SyrupVendor.x,config.singleSpot.SyrupVendor.y,config.singleSpot.SyrupVendor.z-1, config.singleSpot.SyrupVendor.w, false, false)
local WeedGuy = CreatePed(0,'u_m_m_jesus_01',config.singleSpot.WeedSaleman.x,config.singleSpot.WeedSaleman.y,config.singleSpot.WeedSaleman.z-1, config.singleSpot.WeedSaleman.w, false, false)
local methdealer = CreatePed(0, "g_m_y_famdnf_01", config.singleSpot.MethHeistStart.x, config.singleSpot.MethHeistStart.y, config.singleSpot.MethHeistStart.z - 1, false, false)
local travellingmerchant = CreatePed(0, "g_m_y_famdnf_01",num.x,num.y,num.z-1, num.w, false, false)
Freeze(tabdealer, true,config.singleSpot.buylsdlabkit.w)
Freeze(SyrupLocation, true, config.singleSpot.SyrupVendor.w)
Freeze(heroinkitdealer, true, config.singleSpot.buyheroinlabkit.w)
Freeze(WeedGuy, true, config.singleSpot.WeedSaleman.w)
Freeze(methdealer, true, 220.0)
Freeze(travellingmerchant, true, num.w)
AddSingleModel(tabdealer,{ type = "client", label = Lang.targets.lsd.buy, icon = "fa-solid fa-money-bill", event = "md-drugs:client:buylabkit", distance = 2.0}, tabdealer )
AddSingleModel(heroinkitdealer, { label = Lang.targets.heroin.kit, icon = "fa-solid fa-money-bill", event = "md-drugs:client:buyheroinlabkit", distance = 2.0}, nil )
AddSingleModel(SyrupLocation, { type = "client", label = Lang.targets.lean.git, icon = "fa-solid fa-circle-info", event = "md-drugs:client:getsyruplocationtobuy", distance = 2.0}, nil )
AddSingleModel(WeedGuy, {label = "Weed Shop",icon = "fa-solid fa-cannabis", action = function() makeMenu('WeedShop') lib.showContext('WeedShop')end}, nil)
AddSingleModel(methdealer,{label = Lang.targets.meth.mission, icon = "fa-solid fa-circle-info", action = function() Notify(Lang.meth.mission, "success") SpawnMethCarPedChase() end,},nil )
AddSingleModel(travellingmerchant, {label = Lang.targets.travel.travel, icon = "fa-solid fa-cart-shopping", action = function() makeMenu('travellingMerchant') lib.showContext('travellingMerchant') end}, nil)
end)
+41 -14
View File
@@ -1,20 +1,47 @@
lib.callback.register("md-drugs:client:prescriptionpad", function(data, op)
if getJobType() ~= 'ems' then return end
local input = lib.inputDialog('Who To Give A Prescription To?',{
{type = 'select', label = 'Player Name', options = data},
{type = 'select', label = 'Prescription', options = op}})
if not Config.Drugs['pharma'] then return end
local locations = Config.Pharma.Locations
Bridge.Callback.Register("md-drugs:client:prescriptionpad", function( data, op)
local job = Bridge.Framework.GetPlayerJob()
if job ~= 'ambulance' then
Bridge.Notify.SendNotify(Bridge.Language.Locale('pharma.notPharma'), 'error')
return
end
local input = Bridge.Input.Open(Bridge.Language.Locale('pharma.input.header'), {
{type = 'select', title = Bridge.Language.Locale('pharma.input.title1'), options = data},
{type = 'select', title = Bridge.Language.Locale('pharma.input.title2'), options = op}
})
if not input[1] then return end
if not progressbar(Lang.Pharma.write, 4000, 'notepad') then return end
return {who = input[1], what = input[2]}
if not progressbar(Bridge.Language.Locale('pharma.write'), 4000, {
dict = 'missheistdockssetup1clipboard@base',
clip = 'base',
flag = 49,
prop = {
model = 'prop_notepad_01',
bone = 18905,
pos = {0.1, 0.02, 0.03},
rot = { -90.0, 0.0, 0.0}
}
}) then return end
return {who = input[1], what = input[2]}
end)
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)
lib.callback.register("md-drugs:client:unbottle", function()
if not progressbar(Lang.Pharma.open, 4000, 'uncuff') then return end
Bridge.Callback.Register("md-drugs:client:unbottle", function()
if not progressbar(Bridge.Language.Locale('pharma.opening')) then return end
return true
end)
for k, v in pairs (locations.FillPrescription) do
Bridge.Target.AddBoxZone('pharma' ..k , v.loc,v.size, v.loc.w or 180, {
{
icon = Bridge.Language.Locale('pharma.fillIcon'),
label = Bridge.Language.Locale('pharma.targetFill'),
action = function()
if not progressbar(Bridge.Language.Locale('pharma.fill')) then return end
TriggerServerEvent("md-drugs:server:fillprescription", k)
end,
}
})
end
+100
View File
@@ -0,0 +1,100 @@
local DrugPlants = {
{model = 'prop_plant_01a', label = 'coke', langs = Bridge.Language.Locale('coke.targetPick'), tbl = GlobalState.CocaPlant, plantTbl = {},
pick = function(loc)
if not progressbar(Bridge.Language.Locale('coke.picking')) then return end
TriggerServerEvent("coke:pickupCane", loc)
return true
end,
allow = Config.Drugs.cocaine,
icon = Bridge.Language.Locale('coke.pickIcon'),
},
{model = 'prop_plant_01b', label = 'heroin',langs = Bridge.Language.Locale('heroin.targetPick'), tbl = GlobalState.PoppyPlants, plantTbl = {},
pick = function(loc)
if not progressbar(Bridge.Language.Locale('heroin.picking')) then return end
TriggerServerEvent("heroin:pickupCane", loc)
return true
end,
allow = Config.Drugs.heroin,
icon = Bridge.Language.Locale('heroin.pickIcon'),
},
{model = 'prop_cactus_03', label = 'Mescaline', langs = Bridge.Language.Locale('mesc.targetPick'), tbl = GlobalState.Mescaline, plantTbl = {},
pick = function(loc)
if not progressbar(Bridge.Language.Locale('mesc.picking')) then return end
TriggerServerEvent("Mescaline:pickupCane", loc)
return true
end,
allow = Config.Drugs.mescaline,
icon = Bridge.Language.Locale('mesc.pickIcon'),
},
{model = 'prop_weed_01', label = 'weed', langs = Bridge.Language.Locale('weed.targetPick'), tbl = GlobalState.WeedPlant, plantTbl = {},
pick = function(loc)
if not progressbar(Bridge.Language.Locale('weed.picking')) then return end
TriggerServerEvent("weed:pickupCane", loc)
return true
end,
allow = Config.Drugs.weed,
icon = Bridge.Language.Locale('weed.pickIcon'),
},
{model = 'mushroom', label = 'shrooms', langs = Bridge.Language.Locale('shrooms.targetPick'), tbl = GlobalState.shrooms, plantTbl = {},
pick = function(loc)
if not progressbar(Bridge.Language.Locale('shrooms.picking')) then return end
TriggerServerEvent("shrooms:pickupCane", loc)
return true
end,
allow = Config.Drugs.shrooms,
icon = Bridge.Language.Locale('shrooms.pickIcon'),
},
}
for k, v in pairs (DrugPlants) do
if not v.allow then goto continue end
RegisterNetEvent(v.label ..':respawnCane', function(loc)
local plant = v.tbl[loc]
local hash = GetHashKey(plant.model)
if not v.plantTbl[loc] then
requestModel(hash)
v.plantTbl[loc] = CreateObject(hash, plant.location, false, true, true)
Freeze(v.plantTbl[loc], true, plant.heading)
Bridge.Target.AddLocalEntity(v.plantTbl[loc], {
{
icon = v.icon,
label = v.langs,
action = function()
if not v.pick(loc) then return end
end
}
})
targets[#targets+1] = v.plantTbl[loc]
end
end)
RegisterNetEvent(v.label ..':removeCane', function(loc)
DeleteEntity(v.plantTbl[loc])
v.plantTbl[loc] = nil
end)
RegisterNetEvent(v.label ..":init", function()
if not v.plantTbl then v.plantTbl = {} end
for key, value in pairs (v.tbl) do
local hash = GetHashKey(value.model)
if not value.taken then
v.plantTbl[key] = CreateObject(hash, value.location.x, value.location.y, value.location.z, false, true, true)
Freeze(v.plantTbl[key], true, v.heading)
Bridge.Target.AddLocalEntity(v.plantTbl[key], {
{
icon = v.icon,
label = v.langs,
action = function()
if not v.pick(key) then return end
end
}
})
targets[#targets+1] = v.plantTbl[key]
end
end
end)
TriggerEvent(v.label ..":init")
::continue::
end
+26 -55
View File
@@ -1,60 +1,31 @@
local shrooms = {}
if not Config.Drugs['shrooms'] then return end
local function LoadModels(hash)
hash = GetHashKey(hash)
RequestModel(hash)
local timeout = GetGameTimer() + 5000 -- 5-second timeout
while not HasModelLoaded(hash) and GetGameTimer() < timeout do
Wait(10)
end
if HasModelLoaded(hash) then return true end
end
local function pick(loc)
if not progressbar(Lang.Shrooms.pick, 4000, 'uncuff') then return end
TriggerServerEvent("shrooms:pickupCane", loc)
end
RegisterNetEvent('shrooms:respawnCane', function(loc)
local v = GlobalState.shrooms[loc]
local hash = GetHashKey(v.model)
if not shrooms[loc] then
shrooms[loc] = CreateObject(hash, v.location, false, true, true)
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('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
local function EcstasyEffect()
local startStamina = 50
SetFlash(0, 0, 500, 20000, 500)
while startStamina > 0 do
Wait(1000)
startStamina = startStamina - 1
RestorePlayerStamina(PlayerId(), 1.0)
if math.random(1, 100) < 51 then
SetFlash(0, 0, 500, 7000, 500)
ShakeGameplayCam('SMALL_EXPLOSION_SHAKE', 0.08)
end
end
end)
RegisterNetEvent('shrooms:removeCane', function(loc)
if DoesEntityExist(shrooms[loc]) then DeleteEntity(shrooms[loc]) end
shrooms[loc] = nil
end)
RegisterNetEvent("shrooms:init", function()
for k, v in pairs (GlobalState.shrooms) do
local hash = GetHashKey(v.model)
if not HasModelLoaded(hash) then LoadModels(hash) end
if not v.taken then
shrooms[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z, false, true, true)
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
if IsPedRunning(PlayerPedId()) then
SetPedToRagdoll(PlayerPedId(), math.random(1000, 3000), math.random(1000, 3000), 3, 0, 0, 0)
end
end)
startStamina = 0
end
RegisterNetEvent('md-drugs:client:takeshrooms', function()
if not progressbar(Lang.Shrooms.eat, 500, 'eat') then return end
TriggerEvent("evidence:client:SetStatus", "widepupils", 300)
EcstasyEffect()
end)
Bridge.Callback.Register("md-drugs:client:shrooms", function()
if not progressbar(Bridge.Language.Locale('shrooms.eat'), 5000, {
dict = 'mp_player_inteat@burger',
clip = 'mp_player_int_eat_burger',
flags = 49
}) then return end
CreateThread(function()
EcstasyEffect()
end)
return true
end)
-24
View File
@@ -1,24 +0,0 @@
CreateThread(function()
local config = lib.callback.await('md-drugs:server:getLocs', false)
if not config then print('Yo Dawg You Broke Your Locations.lua') return end
AddBoxZoneSingle('telecokein', config.singleSpot.CokeTeleIn, {action = function()tele(config.singleSpot.CokeTeleOut)end, icon = 'fa-solid fa-door-open', label = Lang.targets.coke.enter}) -- coke
AddBoxZoneSingle('telecokeout', config.singleSpot.CokeTeleOut, {action = function()tele(config.singleSpot.CokeTeleIn) end, icon = "fa-solid fa-door-closed", label = Lang.targets.coke.exit}) -- coke
AddBoxZoneMulti('makepowder', config.MakePowder, {event = "md-drugs:client:makepowder", icon = "fa-solid fa-scissors", label = Lang.targets.coke.chop}) -- coke
AddBoxZoneMulti('steallysergic', config.lysergicacid, {event = "md-drugs:client:getlysergic", icon = "fa-solid fa-prescription-bottle", label = Lang.targets.lsd.lys}) -- lsd
AddBoxZoneMulti('stealdiethylamide', config.diethylamide, {event = "md-drugs:client:getdiethylamide", icon = "fa-solid fa-prescription-bottle", label = Lang.targets.lsd.die}) -- lsd
AddBoxZoneMulti('gettabs', config.gettabs, {event = "md-drugs:client:buytabs", icon = "fa-solid fa-eye-dropper", label = Lang.targets.lsd.buyt}) -- lsd
AddBoxZoneMulti('dryheroin', config.dryplant, {event = "md-drugs:client:dryplant", icon = "fa-solid fa-temperature-full", label = Lang.targets.heroin.dry}) -- heroin
AddBoxZoneMulti('cutheroin', config.cutheroinone, {event = "md-drugs:client:cutheroin", icon = "fa-solid fa-flask", label = Lang.targets.heroin.cut}) -- heroin
AddBoxZoneMulti('fillneedle', config.fillneedle, {event = "md-drugs:client:fillneedle", icon = "fa-solid fa-syringe", label = Lang.targets.heroin.fill}) -- heroin
AddBoxZoneMulti('makecrack', config.makecrack, {event = "md-drugs:client:makecrackone", icon = "fa-solid fa-temperature-high", label = Lang.targets.crack.cook}) -- crack
AddBoxZoneMulti('bagcrack', config.bagcrack, {event = "md-drugs:client:bagcrack", icon = "fa-solid fa-weight-scale", label = Lang.targets.crack.bag}) -- crack
AddBoxZoneMulti('fillprescription', config.FillPrescription, {event = "md-drugs:client:fillprescription", icon = "fa-solid fa-prescription", label = Lang.targets.pha.fill}) -- pharma
AddBoxZoneSingle('payfortruck', config.singleSpot.Payfortruck, {event = "md-drugs:client:GetOxyCar", icon = "fa-solid fa-truck-moving", label = Lang.targets.oxy.pay}) -- oxy runs
AddBoxZoneSingle('drymescaline', config.singleSpot.DryOut, {event = "md-drugs:client:drymescaline", icon = "fa-solid fa-temperature-full", label = Lang.targets.mescaline.dry}) -- mescaline
AddBoxZoneMulti('stealisosafrole', config.isosafrole, {event = "md-drugs:client:stealisosafrole", icon = "fa-solid fa-vial", label = Lang.targets.xtc.iso}) -- xtc
AddBoxZoneMulti('stealmdp2p', config.mdp2p, {event = "md-drugs:client:stealmdp2p", icon = "fa-solid fa-vial", label = Lang.targets.xtc.mdp}) -- xtc
AddBoxZoneMulti('rawxtcloc', config.rawxtcloc, {event = "md-drugs:client:makingrawxtc", icon = "fa-solid fa-tablets", label = Lang.targets.xtc.raw}) -- xtc
AddBoxZoneSingle('buypress', config.singleSpot.buypress, {event = "md-drugs:client:buypress", icon = "fa-solid fa-mortar-pestle", label = Lang.targets.xtc.press}) -- xtc
AddBoxZoneMulti('stamp', config.stamp, {event = "md-drugs:client:stampwhite", icon = "fa-solid fa-tablets", label = Lang.targets.xtc.stamp}) -- xtc
end)
+199 -153
View File
@@ -1,133 +1,64 @@
local WeedPlant = {}
if not Config.Drugs['weed'] then return end
local exploded, drying = false, false
local function hasJob()
if Config.Joblock then
if getJobName() == Config.weedjob then
return true else return false end
else
return true end
end
local function pick(loc)
if not progressbar(Lang.Weed.pick, 4000, 'uncuff') then return end
TriggerServerEvent("weed:pickupCane", loc)
end
RegisterNetEvent('weed:respawnCane', function(loc)
local v = GlobalState.WeedPlant[loc]
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() pick(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)
lib.requestModel('prop_weed_01', 1000)
if not v.taken then
WeedPlant[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z-3.5, false, true, true)
print(WeedPlant[k])
Freeze(WeedPlant[k],true, v.heading)
AddSingleModel(WeedPlant[k], {icon = "fas fa-hand",label = Lang.targets.weed.pick, action = function() pick(k) end}, k)
end
end
end)
AddEventHandler('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()
local config = lib.callback.await('md-drugs:server:getLocs', false)
AddBoxZoneMulti('weeddry', config.WeedDry, {
name = 'dryweed',
icon = "fas fa-sign-in-alt",
label = Lang.targets.weed.dry,
distance = 1,
action = function()
if not ItemCheck('wetcannabis') then return end
if drying then
Notify(Lang.Weed.busy, "error")
else
local locations, recipes = Config.Weed.Locations, Config.Weed.Recipes
for k, v in pairs (locations.WeedDry) do
Bridge.Target.AddBoxZone('weed_dry'..k, v.loc, v.size, v.loc.w or 180.0, {
{
icon = Bridge.Language.Locale('weed.targetDryIcon'),
label = Bridge.Language.Locale('weed.targetDry'),
action = function()
if not itemCheck("wetcannabis") then return end
if drying then return end
local loc = GetEntityCoords(PlayerPedId())
local weedplant = CreateObject("bkr_prop_weed_drying_01a", loc.x, loc.y+.2, loc.z, true, false)
drying = true
FreezeEntityPosition(weedplant, true)
Notify(Lang.Weed.wait, "success")
Bridge.Notify.SendNotify(Bridge.Language.Locale('weed.wait'), "success")
Wait(math.random(1000,5000))
Notify(Lang.Weed.take, "success")
AddSingleModel(weedplant, {
icon = "fa-solid fa-cannabis",
label = Lang.targets.weed.dpick,
action = function()
DeleteEntity(weedplant)
drying = false
TriggerServerEvent('md-drugs:server:dryoutweed')
end,
canInteract = function()
if hasJob() then return true end end
}, nil)
Bridge.Notify.SendNotify(Bridge.Language.Locale('weed.take'), "success")
Bridge.Target.AddLocalEntity(weedplant, {
{
icon = Bridge.Language.Locale('weed.targetDryIcon'),
label = Bridge.Language.Locale('weed.targetDryed'),
action = function()
DeleteEntity(weedplant)
drying = false
TriggerServerEvent('md-drugs:server:dryoutweed', k)
end,
}
})
end,
canInteract = function()
if drying then return false end
return true
end
end,
canInteract = function()
if hasJob() then return true end end
}
})
targets[#targets+1] = 'weed_dry'..k
end
AddBoxZoneSingle('teleinweedout', config.singleSpot.weedTeleout, { name = 'teleout', icon = "fa-solid fa-door-closed", label = Lang.targets.coke.exit, distance = 2.0, action = function() SetEntityCoords(PlayerPedId(),config.singleSpot.weedTelein) end,
canInteract = function() if hasJob() then return true end end
})
AddBoxZoneSingle('teleinweedin', config.singleSpot.weedTelein, { name = 'teleout', icon = "fa-solid fa-door-open", label = Lang.targets.coke.enter, distance = 2.0, action = function() SetEntityCoords(PlayerPedId(),config.singleSpot.weedTeleout) end,
canInteract = function() if hasJob() then return true end end
})
AddBoxZoneSingle('MakeButterCrafting', config.singleSpot.MakeButter, {label = Lang.targets.weed.butt, action = function() lib.showContext('ButterCraft') end, icon = "fa-solid fa-cookie",
canInteract = function() if hasJob() then return true end end
})
AddBoxZoneSingle('makeoil',config.singleSpot.MakeOil, {
name = 'Oil',
icon = "fa-solid fa-oil-can",
label = Lang.targets.weed.oil,
action = function()
if not ItemCheckMulti({'butane', 'grindedweed'}) then return end
if not minigame() then
local loc = GetEntityCoords(PlayerPedId())
AddExplosion(loc.x, loc.y, loc.z, 49, 10, true, false, true)
exploded = true
Notify(Lang.Weed.stovehot, "error")
Wait(1000 * 30)
exploded = false
return end
if not progressbar(Lang.Weed.shat, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:makeoil")
end,
canInteract = function()
if hasJob() and exploded == false then return true end
end,
for k, v in pairs (locations.WeedTele) do
Bridge.Target.AddBoxZone('weed_tele'..k, v.inside, v.size, v.rot or 180.0, {
{
icon = Bridge.Language.Locale('weed.teleportOutIcon'),
label = Bridge.Language.Locale('weed.teleportOut'),
action = function()
SetEntityCoords(PlayerPedId(), v.outside)
end
}
})
local stove = CreateObject("prop_cooker_03",config.singleSpot.MakeButter.x, config.singleSpot.MakeButter.y, config.singleSpot.MakeButter.z-1, true, false)
SetEntityHeading(stove, 270.00)
FreezeEntityPosition(stove, true)
local stove2 = CreateObject("prop_cooker_03",config.singleSpot.MakeOil.x,config.singleSpot.MakeOil.y, config.singleSpot.MakeOil.z-1, true, false)
SetEntityHeading(stove2, 90.00)
FreezeEntityPosition(stove2, true)
end)
targets[#targets+1] = 'weed_tele'..k
Bridge.Target.AddBoxZone('weed_teleout'..k, v.outside, v.size, v.rot or 180.0, {
{
icon = Bridge.Language.Locale('weed.teleportInIcon'),
label = Bridge.Language.Locale('weed.teleportIn'),
action = function()
SetEntityCoords(PlayerPedId(), v.inside)
end
}
})
targets[#targets+1] = 'weed_teleout'..k
end
CreateThread(function()
BikerWeedFarm = exports['bob74_ipl']:GetBikerWeedFarmObject()
@@ -141,53 +72,168 @@ CreateThread(function()
RefreshInterior(BikerWeedFarm.interiorId)
end)
local function AlienEffect()
StartScreenEffect("DrugsMichaelAliensFightIn", 3.0, 0)
Wait(math.random(5000, 8000))
StartScreenEffect("DrugsMichaelAliensFight", 3.0, 0)
Wait(math.random(5000, 8000))
StartScreenEffect("DrugsMichaelAliensFightOut", 3.0, 0)
StopScreenEffect("DrugsMichaelAliensFightIn")
StopScreenEffect("DrugsMichaelAliensFight")
StopScreenEffect("DrugsMichaelAliensFightOut")
end
RegisterNetEvent("md-drugs:client:dodabs", function()
if not progressbar('Doing Dabs', 4000, 'bong2') then AlienEffect() return end
AlienEffect()
if not progressbar(Bridge.Language.Locale('weed.dabs'), 4000, 'bong2') then AlienEffect() return end
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
for k, v in pairs(recipes[tableName]) 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.take) do table.insert(label, Bridge.Inventory.GetItemInfo(m).label .. ' X ' .. d .. ' \n ') end
for m, d in pairs(v.give) do item = m end
local itemData = Bridge.Inventory.GetItemInfo(item)
options[#options + 1] = {
icon = 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
}
icon = itemData.image,
description = table.concat(label, " "),
title = itemData.label,
onSelect = function()
if not minigame() then return end
if not progressbar( Bridge.Language.Locale(eventLabelPrefix, itemData.label)) then return end
TriggerServerEvent('md-drugs:server:RollBlunt', tableName, item)
end
}
end
sorter(options, 'title')
lib.registerContext({ id = contextId, title = contextTitle, options = options})
Bridge.Menu.Open({
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')
createBluntOptions('mddrugsbluntwraps', "Dipping Syrup", 'weed.bluntWrap', 'bluntwrap')
end)
RegisterNetEvent('md-drugs:client:rollBlunt', function(data)
lib.showContext('mddrugsblunts')
end)
createBluntOptions('mddrugsblunts', "Roll Blunts", 'weed.rolling', 'blunts')
end)
for k, v in pairs (locations.WeedSalesman) do
requestModel(v.ped)
local ped = CreatePed(4, v.ped, v.loc.x, v.loc.y, v.loc.z - 1.0, v.loc.w, false, true)
FreezeEntityPosition(ped, true)
SetEntityInvincible(ped, true)
SetBlockingOfNonTemporaryEvents(ped, true)
Bridge.Target.AddLocalEntity(ped, {
{
icon = Bridge.Language.Locale('weed.salesIcon'),
label = Bridge.Language.Locale('weed.targetSales'),
action = function()
local options = {}
for m, d in pairs (recipes.weedStore) do
local itemInfo = Bridge.Inventory.GetItemInfo(m)
options[#options + 1] = {
icon = itemInfo.image,
title = itemInfo.label,
description = '$' .. d,
onSelect = function()
local input = Bridge.Input.Open(Bridge.Language.Locale('weed.salesHeader'),{
{type = 'number', title = Bridge.Language.Locale('weed.salesDesc'), min = 1, max = 1000}
})
if not input and input[1] then return end
if not progressbar(Bridge.Language.Locale('weed.buying', Bridge.Inventory.GetItemInfo(m).label)) then return end
TriggerServerEvent('md-drugs:server:buyWeedItem', k, m, input[1])
end
}
end
Bridge.Menu.Open({
id = 'weedDude',
title = Bridge.Language.Locale('weed.salessHeader'),
options = options,
})
end
}
})
targets[#targets+1] = ped
end
local props = {}
for locationKey, locationData in pairs (locations.MakeButter) do
if locationData.prop then
requestModel(locationData.prop)
props[#props+1] = CreateObject(locationData.prop, locationData.loc.x, locationData.loc.y, locationData.loc.z - 1.0, false, false, false)
FreezeEntityPosition(props[#props], true)
SetEntityHeading(props[#props], locationData.loc.w)
Bridge.Target.AddLocalEntity(props[#props], {
{
icon = Bridge.Language.Locale('weed.cannabisIcon'),
label = Bridge.Language.Locale('weed.targetMakeButter'),
action = function()
local options = {}
for k, v in pairs (recipes.makeButter) do
local itemInfo = Bridge.Inventory.GetItemInfo(k)
local label = {}
for m, d in pairs(v.recipe) do table.insert(label, Bridge.Inventory.GetItemInfo(m).label .. ' X ' .. d .. ' \n ') end
options[#options + 1] = {
icon = itemInfo.image,
title = itemInfo.label,
description = table.concat(label, " "),
onSelect = function()
if not progressbar(Bridge.Language.Locale('weed.making', itemInfo.label)) then return end
TriggerServerEvent('md-drugs:server:MakeWeedItems', 'makeButter', k, locationKey)
end
}
end
Bridge.Menu.Open({
id = 'weedMakeButter',
title = Bridge.Language.Locale('weed.makeButter'),
options = options,
})
end
}
})
targets[#targets+1] = props[#props]
end
end
for locationKey, locationData in pairs (locations.MakeOil) do
if locationData.prop then
requestModel(locationData.prop)
props[#props+1] = CreateObject(locationData.prop, locationData.loc.x, locationData.loc.y, locationData.loc.z - 1.0, false, false, false)
FreezeEntityPosition(props[#props], true)
SetEntityHeading(props[#props], locationData.loc.w)
Bridge.Target.AddLocalEntity(props[#props], {
{
icon = Bridge.Language.Locale('weed.cannabisIcon'),
label = Bridge.Language.Locale('weed.targetMakeOil'),
action = function()
local options = {}
for k, v in pairs (recipes.makeOil) do
local itemInfo = Bridge.Inventory.GetItemInfo(k)
local label = {}
for m, d in pairs(v.recipe) do table.insert(label, Bridge.Inventory.GetItemInfo(m).label .. ' X ' .. d .. ' \n ') end
options[#options + 1] = {
icon = itemInfo.image,
title = itemInfo.label,
description = table.concat(label, " "),
onSelect = function()
if not progressbar(Bridge.Language.Locale('weed.making', itemInfo.label)) then return end
TriggerServerEvent('md-drugs:server:MakeWeedItems', 'makeOil', k, locationKey)
end
}
end
Bridge.Menu.Open({
id = 'weedMakeOil',
title = Bridge.Language.Locale('weed.makeOil'),
options = options,
})
end
}
})
targets[#targets+1] = props[#props]
end
end
+84
View File
@@ -0,0 +1,84 @@
if not Config.Drugs['whippit'] then return end
local prop = nil
local function animation(color)
local coords = GetEntityCoords(PlayerPedId())
Bridge.Anim.RequestDict('mp_player_intdrink')
requestModel(color)
prop = CreateObject(GetHashKey(color), coords.x, coords.y, coords.z, true, true, true)
AttachEntityToEntity(prop, PlayerPedId(), GetPedBoneIndex(PlayerPedId(), 18905), 0.087000, -0.130001, 0.138999, 63.630001, 3.299881, -21.000000, true, true, false, true, 1, true)
TaskPlayAnim(PlayerPedId(), 'mp_player_intdrink', 'loop_bottle', 8.0, -8.0, -1, 49, 0, false, false, false)
if progressbar('Inhaling Nitrous', 5000, false) then
ClearPedTasks(PlayerPedId())
DetachEntity(prop, true, true)
DeleteEntity(prop)
prop = nil
return true
else
ClearPedTasks(PlayerPedId())
DetachEntity(prop, true, true)
DeleteEntity(prop)
prop = nil
return false
end
end
local function blur(duration)
CreateThread(function()
TriggerScreenblurFadeIn(1000)
Wait(duration)
TriggerScreenblurFadeOut(1000)
end)
end
Bridge.Callback.Register('md-drugs:client:useWhippit', function(color)
if animation(color) then
blur(30000)
return true
else
return false
end
end)
local function spawnShops()
for k, v in pairs(Config.Whippit.Locations.Whippit) do
requestModel(v.ped)
local ped = CreatePed(5, GetHashKey(v.ped), v.loc.x, v.loc.y, v.loc.z, v.loc.w, true, true)
FreezeEntityPosition(ped, true)
SetEntityInvincible(ped, true)
SetBlockingOfNonTemporaryEvents(ped, true)
Bridge.Target.AddLocalEntity(ped, {
{
label = Bridge.Language.Locale('Whippit.targetShop'),
icon = Bridge.Language.Locale('Whippit.whippitIcon'),
action = function()
local menu = {}
for item, price in pairs (Config.Whippit.Recipes.shop) do
local itemInfo = Bridge.Inventory.GetItemInfo(item)
menu[#menu + 1] = {
title = itemInfo.label,
icon = itemInfo.image,
description = '$' .. price,
onSelect = function()
local amount = Bridge.Input.Open(itemInfo.label, {
{type = 'number', label = 'Amount', name = 'amount', min = 1, max = 100, default = 1}
})
if amount and amount[1] then
TriggerServerEvent('md-drugs:server:buyWhippitItem', k, item, amount[1])
end
end
}
end
Bridge.Menu.Open({
id = 'whippitShop',
title = Bridge.Language.Locale('Whippit.shopHeader'),
options = menu
})
end
},
})
targets[#targets+1] = ped
end
end
spawnShops()
+88 -41
View File
@@ -1,48 +1,95 @@
local miss = false
if not Config.Drugs['wholesale'] then return end
local active, ped, peds = false, nil, {}
RegisterNetEvent("md-drugs:client:GetLocation", function(drug)
if not GetCops(Config.PoliceCount) then return end
if miss then
Notify(Lang.Wholesale.al, 'error')
else
local loc = drug.location
local timer = 0
miss = true
SetNewWaypoint(loc.x, loc.y)
lib.requestModel("g_m_y_famdnf_01", Config.RequestModelTime)
local current = "g_m_y_famdnf_01"
local drugdealer = CreatePed(0, current,loc.x,loc.y,loc.z-1, 90.0, false, false)
FreezeEntityPosition(drugdealer, true)
SetEntityInvincible(drugdealer, true)
AddMultiModel(drugdealer, {{
label = Lang.targets.Wholesale.talk,
icon = "fas fa-eye",
action = function()
local luck = math.random(1,100)
if luck <= Config.SuccessfulChance then
if not progressbar("Wholesaling Drugs", 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:SuccessSale", drug)
else
progressbar("YOU FUCKED NOW", 4000, 'uncuff')
SetUpPeds()
local function loop(wholesaleData)
local timeout = 600 -- 10 minutes
while active do
Wait(1000)
local dist = #(GetEntityCoords(PlayerPedId()) - vector3(wholesaleData.location.x, wholesaleData.location.y, wholesaleData.location.z))
if dist < 100.0 then
if IsEntityDead(PlayerPedId()) then
active = false
Bridge.Point.Remove('md-drugs:wholesaleZone'..Bridge.Framework.GetPlayerIdentifier())
TriggerServerEvent('md-drugs:server:getkilledFuckingNoob')
for k, v in pairs (peds) do
DeleteEntity(v)
end
Wait(3000)
DeleteEntity(drugdealer)
miss = false
peds = {}
break
end
}},drugdealer )
repeat
Wait(1000)
timer = timer + 1
until #(GetEntityCoords(PlayerPedId()) - vector3(loc.x, loc.y, loc.z) ) < 4.0 or timer == Config.WholesaleTimeout + 1
PoliceCall(Config.AlertPoliceWholesale)
if timer <= Config.WholesaleTimeout or #(GetEntityCoords(PlayerPedId()) - vector3(loc.x, loc.y, loc.z) ) < 4.0 then
timer = 0
else
Notify('The Buyer Waited To Long', 'error')
DeleteEntity(drugdealer)
end
end
timeout = timeout - 1
if timeout <= 0 then
break
end
end
end
function SetUpPeds(attackerCount, location)
local models = {"g_m_y_ballasout_01", "g_m_y_famdnf_01", "g_m_y_famca_01", "g_m_y_mexgoon_01", "g_m_y_salvagoon_01"}
for i = 1, attackerCount do
local angle = (360 / attackerCount) * i
local x = location.x + math.cos(math.rad(angle)) * 15
local y = location.y + math.sin(math.rad(angle)) * 15
local z = location.z
local modelHash = GetHashKey(models[math.random(1, #models)])
requestModel(modelHash)
peds[#peds+1] = CreatePed(4, modelHash, x, y, z, 0.0, true, true)
local weapon = math.random(1, 2) == 1 and "WEAPON_PISTOL" or "WEAPON_BAT"
SetPedRelationshipGroupHash(peds[#peds], GetHashKey("HATES_PLAYER"))
SetPedCombatAttributes(peds[#peds], 46, true)
SetPedCombatAttributes(peds[#peds], 0, true)
SetPedCombatAttributes(peds[#peds], 5, true)
SetPedCombatAttributes(peds[#peds], 2, true)
GiveWeaponToPed(peds[#peds], GetHashKey(weapon), 500, false, true)
TaskCombatPed(peds[#peds], PlayerPedId(), 0, 16)
end
end
RegisterNetEvent("md-drugs:client:GetLocation", function(wholesaleData)
if active then return end
if not wholesaleData then return end
active = true
SetNewWaypoint(wholesaleData.location.x, wholesaleData.location.y)
Bridge.Notify.SendNotify(Bridge.Language.Locale('wholesale.go_location'), 'success')
Bridge.Point.Register(
'md-drugs:wholesaleZone'..Bridge.Framework.GetPlayerIdentifier(),
vector3(wholesaleData.location.x, wholesaleData.location.y, wholesaleData.location.z),
50.0,
nil,
function(point, data)
if wholesaleData.ambush then
SetUpPeds(wholesaleData.attackerCount, wholesaleData.location)
loop(wholesaleData)
end
requestModel(GetHashKey("s_m_m_ammucountry"))
ped = CreatePed(4, GetHashKey("s_m_m_ammucountry"), wholesaleData.location.x, wholesaleData.location.y, wholesaleData.location.z, wholesaleData.location.w, false, true)
FreezeEntityPosition(ped, true)
TaskStartScenarioInPlace(ped, "WORLD_HUMAN_STAND_IMPATIENT", 0, true)
Bridge.Notify.SendNotify(Bridge.Language.Locale('wholesale.meet_dealer'), 'info')
Bridge.Target.AddLocalEntity(ped, {
{
label = Bridge.Language.Locale('wholesale.sell_drugs'),
icon = Bridge.Language.Locale('wholesale.sell_drugs_icon'),
action = function()
if not progressbar(Bridge.Language.Locale('wholesale.selling_drugs'), 15000) then return end
TriggerServerEvent('md-drugs:server:SuccessSale')
DeleteEntity(ped)
active = false
Bridge.Point.Remove('md-drugs:wholesaleZone'.. Bridge.Framework.GetPlayerIdentifier())
end
}
})
targets[#targets+1] = ped
end,
function(point, data)
Bridge.Point.Remove('md-drugs:wholesaleZone'.. Bridge.Framework.GetPlayerIdentifier())
return data
end)
end)
RegisterNetEvent('md-drugs:client:MarkLocation', function(data)
SetNewWaypoint(data.x, data.y)
Bridge.Notify.SendNotify(Bridge.Language.Locale('wholesale.go_location'), 'success')
end)
+210 -146
View File
@@ -1,157 +1,221 @@
if not Config.Drugs['xtc'] then return end
local xtcpress = false
local locations = Config.XTC.Locations
RegisterNetEvent("md-drugs:client:setpress", function(type)
if xtcpress then
Notify(Lang.xtc.out, 'error')
else
local coords, head = StartRay2()
xtcpress = true
progressbar('Setting Press On The Ground', 4000, 'uncuff')
local press = CreateObject("bkr_prop_coke_press_01aa", coords.x, coords.y, coords.z, true, false, false)
PlaceObjectOnGroundProperly(press)
Freeze(press, true, head)
local options = {
{ icon = "fas fa-eye", label = Lang.targets.xtc.make, distance = 2.0, action = function() TriggerEvent("md-drugs:client:XTCMenu", type) end,
canInteract = function() if xtcpress then return true end end
},
{icon = "fas fa-eye", label = Lang.targets.xtc.pick, action = function() TriggerEvent("md-drugs:client:GetPressBack", type, press) end, distance = 2.0,
canInteract = function() if xtcpress then return true end end
},
}
AddMultiModel(press, options, nil)
end
end)
lib.callback.register('md-drugs:client:setpress', function(type)
if xtcpress then
Notify(Lang.xtc.out, 'error')
return false
local function getRecipeList(tbl, type)
local rec
if type == 'presses' then
rec = {'XTC FROM THE PREVIOUS TIER REQUIRED TO UPGRADE \n '}
else
rec = {'REQUIRED INGREDIENTS: \n '}
end
for m, d in pairs(tbl) do table.insert(rec, Bridge.Inventory.GetItemInfo(m).label .. ' X ' .. d .. ' \n ') end
return table.concat(rec, ' ')
end
Bridge.Callback.Register('md-drugs:client:setpress', function(xtcData)
if xtcpress then
Bridge.Notify.SendNotify(Bridge.Language.Locale('xtc.alreadyOut'), 'error')
return
end
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)
if not progressbar(Bridge.Language.Locale('xtc.settingDown')) then return end
local press = CreateObject("bkr_prop_coke_press_01aa", coords.x, coords.y, coords.z, true, false, false)
PlaceObjectOnGroundProperly(press)
Freeze(press, true, head)
local options = {
{ icon = "fa-solid fa-tablets", label = Lang.targets.xtc.make, distance = 2.0, action = function() TriggerEvent("md-drugs:client:XTCMenu", type) end,
canInteract = function() if xtcpress then return true end end
},
{icon = "fas fa-eye", label = Lang.targets.xtc.pick, action = function() TriggerEvent("md-drugs:client:GetPressBack", type, press) end, distance = 2.0,
canInteract = function() if xtcpress then return true end end
},
}
AddMultiModel(press, options, nil)
return true, GetEntityCoords(press)
end
local options = {
{
icon = Bridge.Language.Locale('xtc.pressIcon'),
label = Bridge.Language.Locale('xtc.targetMake'),
distance = 2.0,
action = function()
local options = {}
for k, v in pairs(xtcData.recipes) do
local descript = getRecipeList(v.take)
local itemInfo = Bridge.Inventory.GetItemInfo(k)
options[#options + 1] = {
icon = itemInfo.image,
title = Bridge.Language.Locale(k),
description = descript,
onSelect = function()
if not minigame() then return end
if not progressbar(Bridge.Language.Locale('xtc.making', Bridge.Language.Locale(k))) then return end
TriggerServerEvent("md-drugs:server:makextc", k)
end,
distance = 2.0
}
end
Bridge.Menu.Open({
id = 'XTC Recipes',
title = 'XTC Recipes',
options = options
})
end,
canInteract = function()
if xtcpress then return true end
end
},
{
icon = Bridge.Language.Locale('xtc.pressIcon'),
label = Bridge.Language.Locale('xtc.targetPickup'),
action = function()
if not progressbar(Bridge.Language.Locale('xtc.picking')) then return end
DeleteObject(press)
xtcpress = false
TriggerServerEvent("md-drugs:server:getpressback")
end,
canInteract = function()
if xtcpress then return true end
end
},
}
Bridge.Target.AddLocalEntity(press, options)
targets[#targets+1] = press
return coords
end)
RegisterNetEvent("md-drugs:client:XTCMenu", function(type)
local event = "md-drugs:client:MakeXTC"
lib.registerContext({
id = 'XTCmenu',
title = 'XTC Menu',
options = {
{icon = GetImage('white_xtc'), title = 'White XTC', description = '1 X Raw XTC', event = event, args = { data = type, color = 'white'}},
{icon = GetImage('red_xtc'), title = 'Red XTC', description = '1 X Raw XTC and 1 X Loose Coke', event = event, args = { data = type, color = 'red'}},
{icon = GetImage('orange_xtc'), title = 'Orange XTC', description = '1 X Raw XTC and 1 X Heroin Vial', event = event, args = { data = type, color = 'orange'}},
{icon = GetImage('blue_xtc'), title = 'Blue XTC', description = '1 X Raw XTC and 1 X Crack Rock', event = event, args = { data = type, color = 'blue'}},
for k, v in pairs(locations.mdp2p) do
Bridge.Target.AddBoxZone('mdp2p'..k, v.loc, v.size, v.rot or 180.0, {
{
icon = Bridge.Language.Locale('xtc.mdp2pIcon'),
label = Bridge.Language.Locale('xtc.targetStealMDP2P'),
action = function()
if not minigame() then return end
if not progressbar(Bridge.Language.Locale('xtc.stealingMDP2P')) then return end
TriggerServerEvent("md-drugs:server:stealmdp2p", k)
end,
canInteract = function()
return handleGang(v.gang)
end
}
})
lib.showContext('XTCmenu')
end)
RegisterNetEvent("md-drugs:client:GetPressBack", function(type, press)
if not progressbar(Lang.xtc.pickup, 5000, 'uncuff') then return end
DeleteObject(press)
xtcpress = false
TriggerServerEvent("md-drugs:server:getpressback", type)
end)
RegisterNetEvent("md-drugs:client:stealisosafrole", function(data)
if not minigame() then Notify(Lang.xtc.fail, "error") return end
if not progressbar(Lang.xtc.iso, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:stealisosafrole",data.data)
end)
RegisterNetEvent("md-drugs:client:stealmdp2p", function(data)
if not minigame() then Notify(Lang.xtc.fail, "error") return end
if not progressbar(Lang.xtc.mdp2p, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:stealmdp2p", data.data)
end)
RegisterNetEvent("md-drugs:client:makingrawxtc", function(data)
if not ItemCheck('isosafrole') then return end
if not ItemCheck('mdp2p') then return end
if not progressbar(Lang.xtc.raw, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:makingrawxtc",data.data)
end)
RegisterNetEvent("md-drugs:client:MakeXTC", function(data)
if not ItemCheck('raw_xtc') then return end
if not progressbar(Lang.xtc.pressing, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:makextc",data)
end)
RegisterNetEvent("md-drugs:client:stampwhite", function(data)
lib.registerContext({ id = 'stampxtc', title = 'Stamp XTC Menu',
options = {
{ icon = GetImage('white_xtc'), title = 'White XTC',
onSelect = function()
if not minigame() then Notify(Lang.xtc.fail, "error") return end
if not progressbar(string.format(Lang.xtc.stamp, 'White'), 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:stampwhite",data.data)
end
},
{ icon = GetImage('red_xtc'), title = 'Red XTC',
onSelect = function()
if not minigame() then Notify(Lang.xtc.fail, "error") return end
if not progressbar(string.format(Lang.xtc.stamp, 'Red'), 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:stampred", data.data)
end
},
{ icon = GetImage('orange_xtc'), title = 'Orange XTC',
onSelect = function()
if not minigame() then Notify(Lang.xtc.fail, "error") return end
if not progressbar(string.format(Lang.xtc.stamp, 'Orange'), 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:stamporange", data.data)
end,
},
{ icon = GetImage('blue_xtc'), title = 'Blue XTC',
onSelect = function()
if not minigame() then Notify(Lang.xtc.fail, "error") return end
if not progressbar(string.format(Lang.xtc.stamp, 'Blue'), 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:stampblue", data.data)
end
},
}
})
lib.showContext('stampxtc')
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: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:buypress", function()
local img = GetImage('singlepress')
lib.registerContext({
id = 'buypresses',
title = 'Purchase Presses',
options = {
{title = Lang.xtc.press.title.single, description = Lang.xtc.press.des.single, icon = img, event = 'md-drugs:client:getsinglepress'},
{title = Lang.xtc.press.title.dual, description = Lang.xtc.press.des.dual, icon = img, event = 'md-drugs:client:exchangepresses', args = {data = 'dual'}},
{title = Lang.xtc.press.title.triple, description = Lang.xtc.press.des.triple, icon = img, event = 'md-drugs:client:exchangepresses', args = {data = 'triple'}},
{title = Lang.xtc.press.title.quad, description = Lang.xtc.press.des.quad, icon = img, event = 'md-drugs:client:exchangepresses', args = {data = 'quad'}}
}
})
lib.showContext('buypresses')
end)
targets[#targets+1] = 'mdp2p'..k
end
for k, v in pairs(locations.isosafrole) do
Bridge.Target.AddBoxZone('isosafrole'..k, v.loc, v.size, v.rot or 180.0, {
{
icon = Bridge.Language.Locale('xtc.isosafroleIcon'),
label = Bridge.Language.Locale('xtc.targetStealIsosafrole'),
action = function()
if not minigame() then return end
if not progressbar(Bridge.Language.Locale('xtc.stealingIsosafrole')) then return end
TriggerServerEvent("md-drugs:server:stealisosafrole", k)
end,
canInteract = function()
return handleGang(v.gang)
end
}
})
targets[#targets+1] = 'isosafrole'..k
end
for k, v in pairs(locations.rawxtcloc) do
Bridge.Target.AddBoxZone('xtcraw'..k, v.loc, v.size, v.rot or 180.0, {
{
icon = Bridge.Language.Locale('xtc.rawIcon'),
label = Bridge.Language.Locale('xtc.targetRaw'),
action = function()
if not minigame() then return end
if not progressbar(Bridge.Language.Locale('xtc.makingRaw')) then return end
TriggerServerEvent("md-drugs:server:makingrawxtc", k)
end,
canInteract = function()
return handleGang(v.gang)
end
}
})
targets[#targets+1] = 'xtcraw'..k
end
for k, v in pairs(locations.xtcpress) do
requestModel(v.ped)
local ped = CreatePed(0, v.ped, v.loc, false, false)
Freeze(ped, true, v.loc.w)
Bridge.Target.AddLocalEntity(ped, {
{
icon = Bridge.Language.Locale('xtc.pressIcon'),
label = Bridge.Language.Locale('xtc.getPress'),
onSelect = function()
local options = {}
local recipeList = Config.XTC.Recipes.presses
for m, d in pairs(recipeList) do
if m == 'singlepress' then
local itemInfo = Bridge.Inventory.GetItemInfo(m)
options[#options + 1] = {
icon = itemInfo.image,
title = itemInfo.label,
description = Bridge.Language.Locale('xtc.buySingle', d.cash),
type = d.type,
onSelect = function()
if not progressbar(Bridge.Language.Locale('xtc.buyp')) then return end
TriggerServerEvent('md-drugs:server:buypress',k, m)
end,
}
else
local itemInfo = Bridge.Inventory.GetItemInfo(m)
local descript = getRecipeList(d.take, 'presses')
options[#options + 1] = {
icon = itemInfo.image,
title = itemInfo.label,
description = descript,
type = d.type,
onSelect = function()
if not progressbar(Bridge.Language.Locale('xtc.buyp')) then return end
TriggerServerEvent("md-drugs:server:upgradepress", k, m)
end,
distance = 2.0
}
end
end
table.sort(options, function(a, b) return a.type < b.type end)
Bridge.Menu.Open({
id = 'XTC Presses',
title = 'XTC Presses',
options = options
})
end,
canInteract = function() return handleGang(v.gang) end
}
})
targets[#targets+1] = ped
end
for k, v in pairs (locations.stamp) do
Bridge.Target.AddBoxZone('xtcstamp'..k, v.loc, v.size, v.rot or 180.0, {
{
icon = Bridge.Language.Locale('xtc.stampIcon'),
label = Bridge.Language.Locale('xtc.targetStamp'),
onSelect = function()
local item = {
{item = 'white_xtc', label = Bridge.Inventory.GetItemInfo('white_xtc').label, color = 'white'},
{item = 'red_xtc', label = Bridge.Inventory.GetItemInfo('red_xtc').label, color = 'red'},
{item = 'orange_xtc', label = Bridge.Inventory.GetItemInfo('orange_xtc').label, color = 'orange'},
{item = 'blue_xtc', label = Bridge.Inventory.GetItemInfo('blue_xtc').label, color = 'blue'},
}
local options = {}
for m, d in pairs (item) do
options[#options + 1] = {
icon = Bridge.Inventory.GetItemInfo(d.item).image,
title = d.label,
description = Bridge.Language.Locale('xtc.stamp_desc', d.color),
action = function()
if not minigame() then return end
if not progressbar(Bridge.Language.Locale('xtc.stamping', d.label)) then return end
TriggerServerEvent("md-drugs:server:stamp", k, d.color)
end,
distance = 2.0
}
end
Bridge.Menu.Open({
id = 'XTC Stamp',
title = 'XTC Stamp',
options = options
})
end,
canInteract = function() return handleGang(v.gang) end
}
})
targets[#targets+1] = 'xtcstamp'..k
end
+9 -9
View File
@@ -3,28 +3,28 @@ author "mustache_dom"
description "drugs by mustache dom"
fx_version "cerulean"
game "gta5"
version '3.9.0'
version '4.0.8'
client_scripts {
'client/functions.lua',
'client/**.lua',
}
server_scripts {
'server/functions.lua',
'server/**.lua',
'@oxmysql/lib/MySQL.lua',
'server/functions.lua',
'server/**.lua',
}
shared_scripts {
'@ox_lib/init.lua',
'shared/config.lua',
'@ox_lib/init.lua',
'shared/**.lua',
'shared/DrugData/*.lua',
}
lua54 'yes'
files {
'stream/mushroom.ytyp',
'stream/mushroom.ydr'
'client/**.lua',
'server/**.lua',
'locales/**.json'
}
data_file 'DLC_ITYP_REQUEST' 'stream/mushroom.ytyp'
Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

File renamed without changes.
File renamed without changes.
Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

File renamed without changes.
File renamed without changes.
Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

File renamed without changes.
Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

File renamed without changes.
Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Loaded 100 of 629 files, more files were not shown because too many files have changed in this diff. Show more