diff --git a/LICENSE b/LICENSE
new file mode 100644
index 00000000..b2b6280b
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,674 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc.
+ 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.
+
+ fxserver-es_extended
+ Copyright (C) 2015 Jérémie N'gadi
+
+ 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 .
+
+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:
+
+ fxserver-es_extended Copyright (C) 2015 Jérémie N'gadi
+ 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
+.
+
+ 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
+.
\ No newline at end of file
diff --git a/README.md b/README.md
index 25883c09..2270f37f 100644
--- a/README.md
+++ b/README.md
@@ -1,2 +1,104 @@
-# esx-legacy
-Consolidated esx-legacy files into one repo for easy download since we will not support it
+
ESX Legacy
Development Discord - Website - Support Discord
+
+
+##### ESX is the most popular framework for creating economy-based roleplay servers on FiveM, with many official and community resources designed to utilise the tools provided here. For a taste of what's available:
+> esx_identity: Enables character registration defining a players name, sex, height, and date of birth
+
+> esx_society: Allows job resources to register a society, gaining employee management, society funds, and more
+
+> esx_billing: Allows members of some societies to send fines or bills to other players
+
+> esx_vehicleshop: Allow players to purchase vehicles from a dealership, or setup society support for a player-managed dealership
+
+> esx_ambulancejop: Adds a death and respawn system while allowing players to work as EMS to heal and revive others
+
+Many more resources are included in this repository, or you can browse the [ESX Community Github](https://github.com/esx-community/) or [Cfx.re Releases board](https://forum.cfx.re/tag/esx) for more.
+
+### Information
+##### Legacy provides some necessary bug-fixes and improvements to optimise the framework before reaching the end of official support by the development team.
+##### Most resources designed for 1.2 will have no issues with Legacy, notable exceptions are those which modify spawning/loading behaviour. There are several minor feature updates which do not impact compatibility with old resources.
+##### NOTE: The loadouts system in ESX has always been problematic, and fixing it would require a complete overhaul. Your best option is to use a resource that handles weapons as items.
+
+#### Optimisation
+- Utilise compile-time jenkins hashing over the GetHashKey native
+- Update old MySQL queries to use MySQL.store to improve performance, especially during player saving
+- Several loops will now sleep when their tasks are not necessary to perform
+- Improved support when using ESX Identity to reduce events and queries during player login
+- Support for the latest weapons and components
+
+#### Features
+- Integrated support for identity data
+- Integrated commands from esx_adminplus
+- All players will be saved immediately before a txAdmin scheduled restart
+- Detect if a player is new and send the result to the playerLoaded event
+- Support for players logging out when using multicharacter resources
+- Cache the players ped id and death state in ESX.PlayerData
+- Added an imports file (similar to locales.lua) for setting up events and functions in other resources
+ - Before defining all manifest script files, add `shared_script '@es_extended/imports.lua'`
+ - Automatically retrieve the ESX object, removing the need to send a callback event on both the client and server
+ - Ensures current information is always returned when using `ESX.PlayerData` (except loadout and inventory)
+- Spawnmanager is being utilised to correctly handle player spawns
+ - Potential conflicts with some third-party resources that do not expect spawnmanager
+- Added an improved function when performing xPlayer loops to prevent large server hitches
+ - Using `ESX.GetExtendedPlayers()` instead of `ESX.GetPlayers()`
+ - You can use arguments with the new function as well, such as
+ - ESX.GetExtendedPlayers('job', 'police')
+ - ESX.GetExtendedPlayers('group', 'admin')
+
+#### Fixes
+- ESX.Jobs table is populated after all jobs are setup, allowing other resources to retrieve it if needed
+- All weapons are properly removed when using the clearloadout command
+##### For creating or updating resources refer to the [updated boilerplate](/esx_example).
+
+### 1.2 Features
+- Weight based inventory system
+- Weapons support, including support for attachments and tints
+- Supports different money accounts (defaulted with cash, bank and black money)
+- Many official resources available in our GitHub
+- Job system, with grades and clothes support
+- Supports multiple languages, most strings are localized
+- Easy to use API for developers to easily integrate ESX to their projects
+- Register your own commands easily, with argument validation, chat suggestion and using FXServer ACL
+
+### Requirements
+- All resources from the `core` folder
+- [spawnmanager](https://github.com/citizenfx/cfx-server-data)
+- [mysql-async](https://github.com/brouznouf/fivem-mysql-async/releases/tag/3.3.2)
+
+
+### Installation
+- Download files to the resources folder and, if desired, prepare directories for organisation (i.e. resources/[core]/es_extended)
+- Import `es_extended.sql` in your database
+- Import any other sql files for the resources you are using
+- Ensure all resources config files have been adjusted for your preferences
+- Use or refer to the included server.cfg for start order and settings
+
+### Conflicts
+* The following resources should not be used with ESX Legacy
+ - essentialsmode
+ - basic-gamemode
+ - fivem-map-skater
+ - fivem-map-hipster
+ - default_spawnpoint
+
+### Information
+ESX was initially developed by Gizz back in 2017 for his friend as the were creating an FiveM server and there wasn't any economy roleplaying frameworks available. The original code was written within a week or two and later open sourced, it has ever since been improved and parts been rewritten to further improve on it.
+- [ESX Forum](https://forum.esx-framework.org/)
+- [ESX Documentation](https://wiki.esx-framework.org/)
+- [ESX Development Discord](https://discord.me/esx)
+- [FiveM Native Reference](https://runtime.fivem.net/doc/reference.html)
+
+
+### Legal
+
+### License
+
+es_extended - ESX framework for FiveM
+
+Copyright (C) 2015-2021 Jérémie N'gadi
+
+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 http://www.gnu.org/licenses/.
diff --git a/[esx]/async/.editorconfig b/[esx]/async/.editorconfig
new file mode 100644
index 00000000..9b425256
--- /dev/null
+++ b/[esx]/async/.editorconfig
@@ -0,0 +1,9 @@
+root = true
+
+[*]
+indent_size = 4
+indent_style = tab
+end_of_line = crlf
+charset = utf-8
+trim_trailing_whitespace = true
+insert_final_newline = true
\ No newline at end of file
diff --git a/[esx]/async/LICENSE b/[esx]/async/LICENSE
new file mode 100644
index 00000000..0f4f5d61
--- /dev/null
+++ b/[esx]/async/LICENSE
@@ -0,0 +1,674 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc.
+ 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.
+
+ fxserver-async
+ Copyright (C) 2015 Jérémie N'gadi
+
+ 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 .
+
+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:
+
+ fxserver-async Copyright (C) 2015 Jérémie N'gadi
+ 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
+.
+
+ 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
+.
\ No newline at end of file
diff --git a/[esx]/async/README.md b/[esx]/async/README.md
new file mode 100644
index 00000000..12efddbd
--- /dev/null
+++ b/[esx]/async/README.md
@@ -0,0 +1,42 @@
+<<<<<<< HEAD
+# esx-legacy
+Consolidated esx-legacy files into one repo for easy download since we will not support it
+=======
+# async
+Async utilities for FXServer
+
+## Installation
+Set it as a dependency in you fxmanifest.lua
+```
+server_script '@async/async.lua'
+```
+
+## Usage
+```
+local tasks = {}
+
+for i = 1, 100, 1 do
+ local task = function(cb)
+ SetTimeout(1000, function()
+ local result = math.random(1, 50000)
+
+ cb(result)
+ end)
+ end
+
+ table.insert(tasks, task)
+end
+
+Async.parallel(tasks, function(results)
+ print(json.encode(results))
+end)
+
+Async.parallelLimit(tasks, 2, function(results)
+ print(json.encode(results))
+end)
+
+Async.series(tasks, function(results)
+ print(json.encode(results))
+end)
+```
+>>>>>>> async/master
diff --git a/[esx]/async/async.lua b/[esx]/async/async.lua
new file mode 100644
index 00000000..ba55f552
--- /dev/null
+++ b/[esx]/async/async.lua
@@ -0,0 +1,75 @@
+if Citizen and Citizen.CreateThread then
+ CreateThread = Citizen.CreateThread
+end
+
+Async = {}
+
+function Async.parallel(tasks, cb)
+ if #tasks == 0 then
+ cb({})
+ return
+ end
+
+ local remaining = #tasks
+ local results = {}
+
+ for i = 1, #tasks, 1 do
+ CreateThread(function()
+ tasks[i](function(result)
+ table.insert(results, result)
+
+ remaining = remaining - 1;
+
+ if remaining == 0 then
+ cb(results)
+ end
+ end)
+ end)
+ end
+end
+
+function Async.parallelLimit(tasks, limit, cb)
+ if #tasks == 0 then
+ cb({})
+ return
+ end
+
+ local remaining = #tasks
+ local running = 0
+ local queue, results = {}, {}
+
+ for i=1, #tasks, 1 do
+ table.insert(queue, tasks[i])
+ end
+
+ local function processQueue()
+ if #queue == 0 then
+ return
+ end
+
+ while running < limit and #queue > 0 do
+ local task = table.remove(queue, 1)
+
+ running = running + 1
+
+ task(function(result)
+ table.insert(results, result)
+
+ remaining = remaining - 1;
+ running = running - 1
+
+ if remaining == 0 then
+ cb(results)
+ end
+ end)
+ end
+
+ CreateThread(processQueue)
+ end
+
+ processQueue()
+end
+
+function Async.series(tasks, cb)
+ Async.parallelLimit(tasks, 1, cb)
+end
diff --git a/[esx]/async/fxmanifest.lua b/[esx]/async/fxmanifest.lua
new file mode 100644
index 00000000..84035837
--- /dev/null
+++ b/[esx]/async/fxmanifest.lua
@@ -0,0 +1,6 @@
+fx_version 'cerulean'
+game 'gta5'
+
+description 'Async'
+
+shared_script 'async.lua'
diff --git a/[esx]/cron/.editorconfig b/[esx]/cron/.editorconfig
new file mode 100644
index 00000000..9b425256
--- /dev/null
+++ b/[esx]/cron/.editorconfig
@@ -0,0 +1,9 @@
+root = true
+
+[*]
+indent_size = 4
+indent_style = tab
+end_of_line = crlf
+charset = utf-8
+trim_trailing_whitespace = true
+insert_final_newline = true
\ No newline at end of file
diff --git a/[esx]/cron/LICENSE b/[esx]/cron/LICENSE
new file mode 100644
index 00000000..d25a9795
--- /dev/null
+++ b/[esx]/cron/LICENSE
@@ -0,0 +1,674 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc.
+ 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.
+
+ fxserver-cron
+ Copyright (C) 2015 Jérémie N'gadi
+
+ 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 .
+
+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:
+
+ fxserver-cron Copyright (C) 2015 Jérémie N'gadi
+ 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
+.
+
+ 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
+.
\ No newline at end of file
diff --git a/[esx]/cron/README.md b/[esx]/cron/README.md
new file mode 100644
index 00000000..a6d49ac0
--- /dev/null
+++ b/[esx]/cron/README.md
@@ -0,0 +1,52 @@
+# cron
+
+## Download & Installation
+
+### Using [fvm](https://github.com/qlaffont/fvm-installer)
+```
+fvm install --save --folder=esx esx-org/cron
+```
+
+### Using Git
+```
+cd resources
+git clone https://github.com/ESX-Org/cron cron
+```
+
+### Manually
+- Download https://github.com/ESX-Org/cron/archive/master.zip
+- Put it in your resource directory
+
+
+## Usage
+```lua
+
+-- Execute task 5:10, every day
+function CronTask(d, h, m)
+ print('Task done')
+end
+
+TriggerEvent('cron:runAt', 5, 10, CronTask)
+
+-- Execute task every monday at 18:30
+function CronTask(d, h, m)
+ if d == 1 then
+ print('Task done')
+ end
+end
+
+TriggerEvent('cron:runAt', 18, 30, CronTask)
+
+```
+
+# Legal
+### License
+cron - do stuff in a specified time
+
+Copyright (C) 2015-2018 Jérémie N'gadi
+
+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 http://www.gnu.org/licenses/.
diff --git a/[esx]/cron/fxmanifest.lua b/[esx]/cron/fxmanifest.lua
new file mode 100644
index 00000000..1797c90e
--- /dev/null
+++ b/[esx]/cron/fxmanifest.lua
@@ -0,0 +1,9 @@
+fx_version 'adamant'
+
+game 'gta5'
+
+description 'cron'
+
+version '1.0.0'
+
+server_script 'server/main.lua'
diff --git a/[esx]/cron/server/main.lua b/[esx]/cron/server/main.lua
new file mode 100644
index 00000000..6dc7f8ed
--- /dev/null
+++ b/[esx]/cron/server/main.lua
@@ -0,0 +1,47 @@
+local Jobs = {}
+local LastTime = nil
+
+function RunAt(h, m, cb)
+ table.insert(Jobs, {
+ h = h,
+ m = m,
+ cb = cb
+ })
+end
+
+function GetTime()
+ local timestamp = os.time()
+ local d = os.date('*t', timestamp).wday
+ local h = tonumber(os.date('%H', timestamp))
+ local m = tonumber(os.date('%M', timestamp))
+
+ return {d = d, h = h, m = m}
+end
+
+function OnTime(d, h, m)
+
+ for i=1, #Jobs, 1 do
+ if Jobs[i].h == h and Jobs[i].m == m then
+ Jobs[i].cb(d, h, m)
+ end
+ end
+end
+
+function Tick()
+ local time = GetTime()
+
+ if time.h ~= LastTime.h or time.m ~= LastTime.m then
+ OnTime(time.d, time.h, time.m)
+ LastTime = time
+ end
+
+ SetTimeout(60000, Tick)
+end
+
+LastTime = GetTime()
+
+Tick()
+
+AddEventHandler('cron:runAt', function(h, m, cb)
+ RunAt(h, m, cb)
+end)
diff --git a/[esx]/es_extended/.editorconfig b/[esx]/es_extended/.editorconfig
new file mode 100644
index 00000000..9b425256
--- /dev/null
+++ b/[esx]/es_extended/.editorconfig
@@ -0,0 +1,9 @@
+root = true
+
+[*]
+indent_size = 4
+indent_style = tab
+end_of_line = crlf
+charset = utf-8
+trim_trailing_whitespace = true
+insert_final_newline = true
\ No newline at end of file
diff --git a/[esx]/es_extended/LICENSE b/[esx]/es_extended/LICENSE
new file mode 100644
index 00000000..b2b6280b
--- /dev/null
+++ b/[esx]/es_extended/LICENSE
@@ -0,0 +1,674 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc.
+ 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.
+
+ fxserver-es_extended
+ Copyright (C) 2015 Jérémie N'gadi
+
+ 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 .
+
+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:
+
+ fxserver-es_extended Copyright (C) 2015 Jérémie N'gadi
+ 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
+.
+
+ 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
+.
\ No newline at end of file
diff --git a/[esx]/es_extended/README.md b/[esx]/es_extended/README.md
new file mode 100644
index 00000000..d7a5ffcc
--- /dev/null
+++ b/[esx]/es_extended/README.md
@@ -0,0 +1,154 @@
+
ESX Legacy
There is no official support for this resource. Create a thread on the ESX Server Development board or find a support Discord.
+
+
+ESX is the most popular framework for creating an economy-based roleplay server on FiveM, with many more official and unofficial resources designed to utilise the tools provided by this resource. Here's a taste of what's available:
+
+###### `esx_identity` enable character registration using a name, sex, and date of birth
+###### `esx_society` add employee management, society funds and more
+###### `esx_billing` add support for registered societies to fine or bill players
+###### `esx_vehicleshop` allow players to purchase vehicles directly or from players
+###### `esx_ambulancejob` adds a death and respawn system while allowing players to become EMS to heal or revive others
+###### `esx_policejob` allow players to become cops, granting the ability to detain and fine others
+
+
+Many more resources are available on the [ESX Framework Github](https://github.com/esx-framework) and [ESX Community Github](https://github.com/esx-community/) pages.
+
+
+## Information
+
+- [ESX Forum](https://forum.esx-framework.org/)
+- [ESX Documentation](https://wiki.esx-framework.org/)
+- [ESX Development Discord](https://discord.me/esx)
+- [FiveM Native Reference](https://runtime.fivem.net/doc/reference.html)
+
+ESX was initially developed by Gizz back in 2017 for his friend as the were creating an FiveM server and there wasn't any economy roleplaying frameworks available. The original code was written within a week or two and later open sourced, it has ever since been improved and parts been rewritten to further improve on it.
+
+
+## Legacy
+
+ESX Legacy is mostly intended as a bug-fix and optimisation update to provide a more stable experience for the people using ESX 1.2 or Final, however there are also some new features added in to allow better server performance with other resources and official support for esx_multicharacter.
+#### Bug fixes
+* ESX.Jobs is no longer set until the full table has been creating, allowing other resources to retrieve it more easily
+* Now using spawnmanager to spawn players and prevent weird desync issues
+ - This may cause problems with some third-party resources that modify player spawns
+* /clearloadout now properly removes all weapons instead of needing to be performed multiple times
+
+#### Optimisation
+* Support for compile-time hashing instead of calling the native
+* Utilise the `MySQL.Store` function to reduce overhead when executing queries
+* Allow loops to sleep while not performing any tasks
+* The current player ped and death status are now stored in ESX.PlayerData, reducing the need to constantly call the native
+* Weapon ammo is no longer synced on every frame, instead triggering a server event once shooting has ceased
+* Reduced the number of queries being performed by a single player connecting to the server
+
+#### Features
+* Support for the latest weapons and components
+* Additional admin commands from esx_adminplus
+* Save all players before the txAdmin scheduled restarts
+* When loading a new player, send the isNew argument along with `esx:playerLoaded`
+* Added an imports file to load in other resource manifests with `shared_script '@es_extended/imports.lua'`
+ - Removes the need to define ESX in your resources, as it will perform the task for you
+ - Ensures ESX.PlayerData will always return current information (exception: loadout and inventory)
+* Support for relogging, clearing all player data and cancelling sync loops
+* Added the `ESX.GetExtendedPlayers` function to be used with xPlayer loops without causing massive server hitches
+
+To get an idea for how you can utilise imports and the new functions, you can refer to [this updated boilerplate](https://github.com/thelindat/esx_legacy_boilerplate).
+##### Any resources made using the imports will only work for ESX Legacy.
+
+
+## Conflicts
+* The following resources should not be used with ESX Legacy and can result in errors
+ - **essentialsmode**
+ - basic-gamemode
+ - fivem-map-skater
+ - fivem-map-hipster
+ - default_spawnpoint
+
+
+## 1.2 + Features
+
+- Weight based inventory system
+- Weapons support, including support for attachments and tints
+- Supports different money accounts (defaulted with cash, bank and black money)
+- Many official resources available in our GitHub
+- Job system, with grades and clothes support
+- Supports multiple languages, most strings are localized
+- Easy to use API for developers to easily integrate ESX to their projects
+- Register your own commands easily, with argument validation, chat suggestion and using FXServer ACL
+
+
+## Requirements
+
+- [mysql-async](https://github.com/brouznouf/fivem-mysql-async)
+- [async](https://github.com/esx-framework/async)
+
+
+## Download & Installation
+
+
+### Using Git
+
+```
+cd resources
+git clone https://github.com/esx-framework/es_extended.git --branch legacy
+git clone https://github.com/esx-framework/esx_menu_default [esx]/[ui]/esx_menu_default
+git clone https://github.com/esx-framework/esx_menu_dialog [esx]/[ui]/esx_menu_dialog
+git clone https://github.com/esx-framework/esx_menu_list [esx]/[ui]/esx_menu_list
+```
+
+### Plume ESX:
+
+PlumeESX is a full featured (13 jobs) and highly configurable yet lightweight ESX v1.2 base that can be easily extendable.
+Forum Thread: https://forum.cfx.re/t/recipe-plumeesx-full-base-2021/1964029
+YouTube Tutorial: https://www.youtube.com/watch?v=iGfwUCO0RZQ
+
+### Manually
+
+- Download https://github.com/esx-framework/es_extended/archive/refs/heads/legacy.zip
+- Put it in the `resource/[esx]` directory
+- Download https://github.com/esx-framework/esx_menu_default/archive/refs/heads/master.zip
+- Put it in the `resource/[esx]/[ui]` directory
+- Download https://github.com/esx-framework/esx_menu_dialog/archive/refs/heads/master.zip
+- Put it in the `resource/[esx]/[ui]` directory
+- Download https://github.com/esx-framework/esx_menu_list/archive/refs/heads/master.zip
+- Put it in the `resource/[esx]/[ui]` directory
+
+
+### Installation
+
+- Import `es_extended.sql` in your database
+- Configure your `server.cfg` to look like this
+
+```
+add_principal group.admin group.user
+add_ace resource.es_extended command.add_ace allow
+add_ace resource.es_extended command.add_principal allow
+add_ace resource.es_extended command.remove_principal allow
+add_ace resource.es_extended command.stop allow
+
+start mysql-async
+start es_extended
+
+start esx_menu_default
+start esx_menu_list
+start esx_menu_dialog
+```
+
+## Reborn
+
+ESX Reborn is the name for the framework being actively developed by the team, with many existing features being rewritten and improved upon. It is currently possible to create a server using ESX Reborn, however the project is still missing many features and should not be used unless you are a developer looking to contribute in some way.
+
+
+## Legal
+
+### License
+
+es_extended - ESX framework for FiveM
+
+Copyright (C) 2015-2021 Jérémie N'gadi
+
+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 http://www.gnu.org/licenses/.
diff --git a/[esx]/es_extended/client/common.lua b/[esx]/es_extended/client/common.lua
new file mode 100644
index 00000000..26c0ed40
--- /dev/null
+++ b/[esx]/es_extended/client/common.lua
@@ -0,0 +1,7 @@
+AddEventHandler('esx:getSharedObject', function(cb)
+ cb(ESX)
+end)
+
+function getSharedObject()
+ return ESX
+end
diff --git a/[esx]/es_extended/client/entityiter.lua b/[esx]/es_extended/client/entityiter.lua
new file mode 100644
index 00000000..541ae095
--- /dev/null
+++ b/[esx]/es_extended/client/entityiter.lua
@@ -0,0 +1,95 @@
+--[[The MIT License (MIT)
+
+Copyright (c) 2017 IllidanS4
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+]]
+
+local entityEnumerator = {
+ __gc = function(enum)
+ if enum.destructor and enum.handle then
+ enum.destructor(enum.handle)
+ end
+
+ enum.destructor = nil
+ enum.handle = nil
+ end
+}
+
+local function EnumerateEntities(initFunc, moveFunc, disposeFunc)
+ return coroutine.wrap(function()
+ local iter, id = initFunc()
+ if not id or id == 0 then
+ disposeFunc(iter)
+ return
+ end
+
+ local enum = {handle = iter, destructor = disposeFunc}
+ setmetatable(enum, entityEnumerator)
+ local next = true
+
+ repeat
+ coroutine.yield(id)
+ next, id = moveFunc(iter)
+ until not next
+
+ enum.destructor, enum.handle = nil, nil
+ disposeFunc(iter)
+ end)
+end
+
+function EnumerateEntitiesWithinDistance(entities, isPlayerEntities, coords, maxDistance)
+ local nearbyEntities = {}
+
+ if coords then
+ coords = vector3(coords.x, coords.y, coords.z)
+ else
+ local playerPed = ESX.PlayerData.ped
+ coords = GetEntityCoords(playerPed)
+ end
+
+ for k,entity in pairs(entities) do
+ local distance = #(coords - GetEntityCoords(entity))
+
+ if distance <= maxDistance then
+ table.insert(nearbyEntities, isPlayerEntities and k or entity)
+ end
+ end
+
+ return nearbyEntities
+end
+
+function EnumerateObjects()
+ return EnumerateEntities(FindFirstObject, FindNextObject, EndFindObject)
+end
+
+function EnumeratePeds()
+ return EnumerateEntities(FindFirstPed, FindNextPed, EndFindPed)
+end
+
+function EnumerateVehicles()
+ return EnumerateEntities(FindFirstVehicle, FindNextVehicle, EndFindVehicle)
+end
+
+function EnumeratePickups()
+ return EnumerateEntities(FindFirstPickup, FindNextPickup, EndFindPickup)
+end
diff --git a/[esx]/es_extended/client/functions.lua b/[esx]/es_extended/client/functions.lua
new file mode 100644
index 00000000..09174c08
--- /dev/null
+++ b/[esx]/es_extended/client/functions.lua
@@ -0,0 +1,1029 @@
+ESX = {}
+ESX.PlayerData = {}
+ESX.PlayerLoaded = false
+ESX.CurrentRequestId = 0
+ESX.ServerCallbacks = {}
+ESX.TimeoutCallbacks = {}
+
+ESX.UI = {}
+ESX.UI.HUD = {}
+ESX.UI.HUD.RegisteredElements = {}
+ESX.UI.Menu = {}
+ESX.UI.Menu.RegisteredTypes = {}
+ESX.UI.Menu.Opened = {}
+
+ESX.Game = {}
+ESX.Game.Utils = {}
+
+ESX.Scaleform = {}
+ESX.Scaleform.Utils = {}
+
+ESX.Streaming = {}
+
+ESX.SetTimeout = function(msec, cb)
+ table.insert(ESX.TimeoutCallbacks, {
+ time = GetGameTimer() + msec,
+ cb = cb
+ })
+ return #ESX.TimeoutCallbacks
+end
+
+ESX.ClearTimeout = function(i)
+ ESX.TimeoutCallbacks[i] = nil
+end
+
+ESX.IsPlayerLoaded = function()
+ return ESX.PlayerLoaded
+end
+
+ESX.GetPlayerData = function()
+ return ESX.PlayerData
+end
+
+ESX.SetPlayerData = function(key, val)
+ local current = ESX.PlayerData[key]
+ ESX.PlayerData[key] = val
+ if key ~= 'inventory' and key ~= 'loadout' then
+ if type(val) == 'table' or val ~= current then
+ TriggerEvent('esx:setPlayerData', key, val, current)
+ end
+ end
+end
+
+ESX.ShowNotification = function(msg)
+ SetNotificationTextEntry('STRING')
+ AddTextComponentString(msg)
+ DrawNotification(0,1)
+end
+
+ESX.ShowAdvancedNotification = function(sender, subject, msg, textureDict, iconType, flash, saveToBrief, hudColorIndex)
+ if saveToBrief == nil then saveToBrief = true end
+ AddTextEntry('esxAdvancedNotification', msg)
+ BeginTextCommandThefeedPost('esxAdvancedNotification')
+ if hudColorIndex then ThefeedNextPostBackgroundColor(hudColorIndex) end
+ EndTextCommandThefeedPostMessagetext(textureDict, textureDict, false, iconType, sender, subject)
+ EndTextCommandThefeedPostTicker(flash or false, saveToBrief)
+end
+
+ESX.ShowHelpNotification = function(msg, thisFrame, beep, duration)
+ AddTextEntry('esxHelpNotification', msg)
+
+ if thisFrame then
+ DisplayHelpTextThisFrame('esxHelpNotification', false)
+ else
+ if beep == nil then beep = true end
+ BeginTextCommandDisplayHelp('esxHelpNotification')
+ EndTextCommandDisplayHelp(0, false, beep, duration or -1)
+ end
+end
+
+ESX.ShowFloatingHelpNotification = function(msg, coords)
+ AddTextEntry('esxFloatingHelpNotification', msg)
+ SetFloatingHelpTextWorldPosition(1, coords)
+ SetFloatingHelpTextStyle(1, 1, 2, -1, 3, 0)
+ BeginTextCommandDisplayHelp('esxFloatingHelpNotification')
+ EndTextCommandDisplayHelp(2, false, false, -1)
+end
+
+ESX.TriggerServerCallback = function(name, cb, ...)
+ ESX.ServerCallbacks[ESX.CurrentRequestId] = cb
+
+ TriggerServerEvent('esx:triggerServerCallback', name, ESX.CurrentRequestId, ...)
+
+ if ESX.CurrentRequestId < 65535 then
+ ESX.CurrentRequestId = ESX.CurrentRequestId + 1
+ else
+ ESX.CurrentRequestId = 0
+ end
+end
+
+ESX.UI.HUD.SetDisplay = function(opacity)
+ SendNUIMessage({
+ action = 'setHUDDisplay',
+ opacity = opacity
+ })
+end
+
+ESX.UI.HUD.RegisterElement = function(name, index, priority, html, data)
+ local found = false
+
+ for i=1, #ESX.UI.HUD.RegisteredElements, 1 do
+ if ESX.UI.HUD.RegisteredElements[i] == name then
+ found = true
+ break
+ end
+ end
+
+ if found then
+ return
+ end
+
+ table.insert(ESX.UI.HUD.RegisteredElements, name)
+
+ SendNUIMessage({
+ action = 'insertHUDElement',
+ name = name,
+ index = index,
+ priority = priority,
+ html = html,
+ data = data
+ })
+
+ ESX.UI.HUD.UpdateElement(name, data)
+end
+
+ESX.UI.HUD.RemoveElement = function(name)
+ for i=1, #ESX.UI.HUD.RegisteredElements, 1 do
+ if ESX.UI.HUD.RegisteredElements[i] == name then
+ table.remove(ESX.UI.HUD.RegisteredElements, i)
+ break
+ end
+ end
+
+ SendNUIMessage({
+ action = 'deleteHUDElement',
+ name = name
+ })
+end
+
+ESX.UI.HUD.Reset = function()
+ SendNUIMessage({
+ action = 'resetHUDElements'
+ })
+ ESX.UI.HUD.RegisteredElements = {}
+end
+
+ESX.UI.HUD.UpdateElement = function(name, data)
+ SendNUIMessage({
+ action = 'updateHUDElement',
+ name = name,
+ data = data
+ })
+end
+
+ESX.UI.Menu.RegisterType = function(type, open, close)
+ ESX.UI.Menu.RegisteredTypes[type] = {
+ open = open,
+ close = close
+ }
+end
+
+ESX.UI.Menu.Open = function(type, namespace, name, data, submit, cancel, change, close)
+ local menu = {}
+
+ menu.type = type
+ menu.namespace = namespace
+ menu.name = name
+ menu.data = data
+ menu.submit = submit
+ menu.cancel = cancel
+ menu.change = change
+
+ menu.close = function()
+
+ ESX.UI.Menu.RegisteredTypes[type].close(namespace, name)
+
+ for i=1, #ESX.UI.Menu.Opened, 1 do
+ if ESX.UI.Menu.Opened[i] then
+ if ESX.UI.Menu.Opened[i].type == type and ESX.UI.Menu.Opened[i].namespace == namespace and ESX.UI.Menu.Opened[i].name == name then
+ ESX.UI.Menu.Opened[i] = nil
+ end
+ end
+ end
+
+ if close then
+ close()
+ end
+
+ end
+
+ menu.update = function(query, newData)
+
+ for i=1, #menu.data.elements, 1 do
+ local match = true
+
+ for k,v in pairs(query) do
+ if menu.data.elements[i][k] ~= v then
+ match = false
+ end
+ end
+
+ if match then
+ for k,v in pairs(newData) do
+ menu.data.elements[i][k] = v
+ end
+ end
+ end
+
+ end
+
+ menu.refresh = function()
+ ESX.UI.Menu.RegisteredTypes[type].open(namespace, name, menu.data)
+ end
+
+ menu.setElement = function(i, key, val)
+ menu.data.elements[i][key] = val
+ end
+
+ menu.setElements = function(newElements)
+ menu.data.elements = newElements
+ end
+
+ menu.setTitle = function(val)
+ menu.data.title = val
+ end
+
+ menu.removeElement = function(query)
+ for i=1, #menu.data.elements, 1 do
+ for k,v in pairs(query) do
+ if menu.data.elements[i] then
+ if menu.data.elements[i][k] == v then
+ table.remove(menu.data.elements, i)
+ break
+ end
+ end
+
+ end
+ end
+ end
+
+ table.insert(ESX.UI.Menu.Opened, menu)
+ ESX.UI.Menu.RegisteredTypes[type].open(namespace, name, data)
+
+ return menu
+end
+
+ESX.UI.Menu.Close = function(type, namespace, name)
+ for i=1, #ESX.UI.Menu.Opened, 1 do
+ if ESX.UI.Menu.Opened[i] then
+ if ESX.UI.Menu.Opened[i].type == type and ESX.UI.Menu.Opened[i].namespace == namespace and ESX.UI.Menu.Opened[i].name == name then
+ ESX.UI.Menu.Opened[i].close()
+ ESX.UI.Menu.Opened[i] = nil
+ end
+ end
+ end
+end
+
+ESX.UI.Menu.CloseAll = function()
+ for i=1, #ESX.UI.Menu.Opened, 1 do
+ if ESX.UI.Menu.Opened[i] then
+ ESX.UI.Menu.Opened[i].close()
+ ESX.UI.Menu.Opened[i] = nil
+ end
+ end
+end
+
+ESX.UI.Menu.GetOpened = function(type, namespace, name)
+ for i=1, #ESX.UI.Menu.Opened, 1 do
+ if ESX.UI.Menu.Opened[i] then
+ if ESX.UI.Menu.Opened[i].type == type and ESX.UI.Menu.Opened[i].namespace == namespace and ESX.UI.Menu.Opened[i].name == name then
+ return ESX.UI.Menu.Opened[i]
+ end
+ end
+ end
+end
+
+ESX.UI.Menu.GetOpenedMenus = function()
+ return ESX.UI.Menu.Opened
+end
+
+ESX.UI.Menu.IsOpen = function(type, namespace, name)
+ return ESX.UI.Menu.GetOpened(type, namespace, name) ~= nil
+end
+
+ESX.UI.ShowInventoryItemNotification = function(add, item, count)
+ SendNUIMessage({
+ action = 'inventoryNotification',
+ add = add,
+ item = item,
+ count = count
+ })
+end
+
+ESX.Game.GetPedMugshot = function(ped, transparent)
+ if DoesEntityExist(ped) then
+ local mugshot
+
+ if transparent then
+ mugshot = RegisterPedheadshotTransparent(ped)
+ else
+ mugshot = RegisterPedheadshot(ped)
+ end
+
+ while not IsPedheadshotReady(mugshot) do
+ Citizen.Wait(0)
+ end
+
+ return mugshot, GetPedheadshotTxdString(mugshot)
+ else
+ return
+ end
+end
+
+ESX.Game.Teleport = function(entity, coords, cb)
+ local vector = type(coords) == "vector4" and coords or type(coords) == "vector3" and vector4(coords, 0.0) or vec(coords.x, coords.y, coords.z, coords.heading or 0.0)
+
+ if DoesEntityExist(entity) then
+ RequestCollisionAtCoord(vector.xyz)
+ while not HasCollisionLoadedAroundEntity(entity) do
+ Citizen.Wait(0)
+ end
+
+ SetEntityCoords(entity, vector.xyz, false, false, false, false)
+ SetEntityHeading(entity, vector.w)
+ end
+
+ if cb then
+ cb()
+ end
+end
+
+ESX.Game.SpawnObject = function(object, coords, cb, networked)
+ local model = (type(object) == 'number' and model or GetHashKey(object))
+ local vector = type(coords) == "vector3" and coords or vec(coords.x, coords.y, coords.z)
+ networked = networked == nil and true or networked
+
+ Citizen.CreateThread(function()
+ ESX.Streaming.RequestModel(model)
+
+ -- The below has to be done just for CreateObject since for some reason CreateObjects model argument is set
+ -- as an Object instead of a hash so it doesn't automatically hash the item
+ model = type(model) == 'number' and model or GetHashKey(model)
+ local obj = CreateObject(model, vector.xyz, networked, false, true)
+ if cb then
+ cb(obj)
+ end
+ end)
+end
+
+ESX.Game.SpawnLocalObject = function(object, coords, cb)
+ -- Why have 2 separate functions for this? Just call the other one with an extra param
+ ESX.Game.SpawnObject(object, coords, cb, false)
+end
+
+ESX.Game.DeleteVehicle = function(vehicle)
+ SetEntityAsMissionEntity(vehicle, false, true)
+ DeleteVehicle(vehicle)
+end
+
+ESX.Game.DeleteObject = function(object)
+ SetEntityAsMissionEntity(object, false, true)
+ DeleteObject(object)
+end
+
+ESX.Game.SpawnVehicle = function(vehicle, coords, heading, cb, networked)
+ local model = (type(vehicle) == 'number' and vehicle or GetHashKey(vehicle))
+ local vector = type(coords) == "vector3" and coords or vec(coords.x, coords.y, coords.z)
+ networked = networked == nil and true or networked
+ Citizen.CreateThread(function()
+ ESX.Streaming.RequestModel(model)
+
+ local vehicle = CreateVehicle(model, vector.xyz, heading, networked, false)
+
+ if networked then
+ local id = NetworkGetNetworkIdFromEntity(vehicle)
+ SetNetworkIdCanMigrate(id, true)
+ SetEntityAsMissionEntity(vehicle, true, false)
+ end
+ SetVehicleHasBeenOwnedByPlayer(vehicle, true)
+ SetVehicleNeedsToBeHotwired(vehicle, false)
+ SetModelAsNoLongerNeeded(model)
+ SetVehRadioStation(vehicle, 'OFF')
+
+ RequestCollisionAtCoord(vector.xyz)
+ while not HasCollisionLoadedAroundEntity(vehicle) do
+ Citizen.Wait(0)
+ end
+
+ if cb then
+ cb(vehicle)
+ end
+ end)
+end
+
+ESX.Game.SpawnLocalVehicle = function(vehicle, coords, heading, cb)
+ -- Why have 2 separate functions for this? Just call the other one with an extra param
+ ESX.Game.SpawnVehicle(vehicle, coords, heading, cb, false)
+end
+
+ESX.Game.IsVehicleEmpty = function(vehicle)
+ local passengers = GetVehicleNumberOfPassengers(vehicle)
+ local driverSeatFree = IsVehicleSeatFree(vehicle, -1)
+
+ return passengers == 0 and driverSeatFree
+end
+
+ESX.Game.GetObjects = function()
+ local objects = {}
+
+ for object in EnumerateObjects() do
+ table.insert(objects, object)
+ end
+
+ return objects
+end
+
+ESX.Game.GetPeds = function(onlyOtherPeds)
+ local peds, myPed = {}, ESX.PlayerData.ped
+
+ for ped in EnumeratePeds() do
+ if ((onlyOtherPeds and ped ~= myPed) or not onlyOtherPeds) then
+ table.insert(peds, ped)
+ end
+ end
+
+ return peds
+end
+
+ESX.Game.GetVehicles = function()
+ local vehicles = {}
+
+ for vehicle in EnumerateVehicles() do
+ table.insert(vehicles, vehicle)
+ end
+
+ return vehicles
+end
+
+ESX.Game.GetPlayers = function(onlyOtherPlayers, returnKeyValue, returnPeds)
+ local players, myPlayer = {}, PlayerId()
+
+ for k,player in ipairs(GetActivePlayers()) do
+ local ped = GetPlayerPed(player)
+
+ if DoesEntityExist(ped) and ((onlyOtherPlayers and player ~= myPlayer) or not onlyOtherPlayers) then
+ if returnKeyValue then
+ players[player] = ped
+ else
+ table.insert(players, returnPeds and ped or player)
+ end
+ end
+ end
+
+ return players
+end
+
+ESX.Game.GetClosestObject = function(coords, modelFilter) return ESX.Game.GetClosestEntity(ESX.Game.GetObjects(), false, coords, modelFilter) end
+ESX.Game.GetClosestPed = function(coords, modelFilter) return ESX.Game.GetClosestEntity(ESX.Game.GetPeds(true), false, coords, modelFilter) end
+ESX.Game.GetClosestPlayer = function(coords) return ESX.Game.GetClosestEntity(ESX.Game.GetPlayers(true, true), true, coords, nil) end
+ESX.Game.GetClosestVehicle = function(coords, modelFilter) return ESX.Game.GetClosestEntity(ESX.Game.GetVehicles(), false, coords, modelFilter) end
+ESX.Game.GetPlayersInArea = function(coords, maxDistance) return EnumerateEntitiesWithinDistance(ESX.Game.GetPlayers(true, true), true, coords, maxDistance) end
+ESX.Game.GetVehiclesInArea = function(coords, maxDistance) return EnumerateEntitiesWithinDistance(ESX.Game.GetVehicles(), false, coords, maxDistance) end
+ESX.Game.IsSpawnPointClear = function(coords, maxDistance) return #ESX.Game.GetVehiclesInArea(coords, maxDistance) == 0 end
+
+ESX.Game.GetClosestEntity = function(entities, isPlayerEntities, coords, modelFilter)
+ local closestEntity, closestEntityDistance, filteredEntities = -1, -1, nil
+
+ if coords then
+ coords = vector3(coords.x, coords.y, coords.z)
+ else
+ local playerPed = ESX.PlayerData.ped
+ coords = GetEntityCoords(playerPed)
+ end
+
+ if modelFilter then
+ filteredEntities = {}
+
+ for k,entity in pairs(entities) do
+ if modelFilter[GetEntityModel(entity)] then
+ table.insert(filteredEntities, entity)
+ end
+ end
+ end
+
+ for k,entity in pairs(filteredEntities or entities) do
+ local distance = #(coords - GetEntityCoords(entity))
+
+ if closestEntityDistance == -1 or distance < closestEntityDistance then
+ closestEntity, closestEntityDistance = isPlayerEntities and k or entity, distance
+ end
+ end
+
+ return closestEntity, closestEntityDistance
+end
+
+ESX.Game.GetVehicleInDirection = function()
+ local playerPed = ESX.PlayerData.ped
+ local playerCoords = GetEntityCoords(playerPed)
+ local inDirection = GetOffsetFromEntityInWorldCoords(playerPed, 0.0, 5.0, 0.0)
+ local rayHandle = StartShapeTestRay(playerCoords, inDirection, 10, playerPed, 0)
+ local numRayHandle, hit, endCoords, surfaceNormal, entityHit = GetShapeTestResult(rayHandle)
+
+ if hit == 1 and GetEntityType(entityHit) == 2 then
+ local entityCoords = GetEntityCoords(entityHit)
+ return entityHit, entityCoords
+ end
+
+ return nil
+end
+
+ESX.Game.GetVehicleProperties = function(vehicle)
+ if DoesEntityExist(vehicle) then
+ local colorPrimary, colorSecondary = GetVehicleColours(vehicle)
+ local pearlescentColor, wheelColor = GetVehicleExtraColours(vehicle)
+ local extras = {}
+
+ for extraId=0, 12 do
+ if DoesExtraExist(vehicle, extraId) then
+ local state = IsVehicleExtraTurnedOn(vehicle, extraId) == 1
+ extras[tostring(extraId)] = state
+ end
+ end
+
+ return {
+ model = GetEntityModel(vehicle),
+
+ plate = ESX.Math.Trim(GetVehicleNumberPlateText(vehicle)),
+ plateIndex = GetVehicleNumberPlateTextIndex(vehicle),
+
+ bodyHealth = ESX.Math.Round(GetVehicleBodyHealth(vehicle), 1),
+ engineHealth = ESX.Math.Round(GetVehicleEngineHealth(vehicle), 1),
+ tankHealth = ESX.Math.Round(GetVehiclePetrolTankHealth(vehicle), 1),
+
+ fuelLevel = ESX.Math.Round(GetVehicleFuelLevel(vehicle), 1),
+ dirtLevel = ESX.Math.Round(GetVehicleDirtLevel(vehicle), 1),
+ color1 = colorPrimary,
+ color2 = colorSecondary,
+
+ pearlescentColor = pearlescentColor,
+ wheelColor = wheelColor,
+
+ wheels = GetVehicleWheelType(vehicle),
+ windowTint = GetVehicleWindowTint(vehicle),
+ xenonColor = GetVehicleXenonLightsColour(vehicle),
+
+ neonEnabled = {
+ IsVehicleNeonLightEnabled(vehicle, 0),
+ IsVehicleNeonLightEnabled(vehicle, 1),
+ IsVehicleNeonLightEnabled(vehicle, 2),
+ IsVehicleNeonLightEnabled(vehicle, 3)
+ },
+
+ neonColor = table.pack(GetVehicleNeonLightsColour(vehicle)),
+ extras = extras,
+ tyreSmokeColor = table.pack(GetVehicleTyreSmokeColor(vehicle)),
+
+ modSpoilers = GetVehicleMod(vehicle, 0),
+ modFrontBumper = GetVehicleMod(vehicle, 1),
+ modRearBumper = GetVehicleMod(vehicle, 2),
+ modSideSkirt = GetVehicleMod(vehicle, 3),
+ modExhaust = GetVehicleMod(vehicle, 4),
+ modFrame = GetVehicleMod(vehicle, 5),
+ modGrille = GetVehicleMod(vehicle, 6),
+ modHood = GetVehicleMod(vehicle, 7),
+ modFender = GetVehicleMod(vehicle, 8),
+ modRightFender = GetVehicleMod(vehicle, 9),
+ modRoof = GetVehicleMod(vehicle, 10),
+
+ modEngine = GetVehicleMod(vehicle, 11),
+ modBrakes = GetVehicleMod(vehicle, 12),
+ modTransmission = GetVehicleMod(vehicle, 13),
+ modHorns = GetVehicleMod(vehicle, 14),
+ modSuspension = GetVehicleMod(vehicle, 15),
+ modArmor = GetVehicleMod(vehicle, 16),
+
+ modTurbo = IsToggleModOn(vehicle, 18),
+ modSmokeEnabled = IsToggleModOn(vehicle, 20),
+ modXenon = IsToggleModOn(vehicle, 22),
+
+ modFrontWheels = GetVehicleMod(vehicle, 23),
+ modBackWheels = GetVehicleMod(vehicle, 24),
+
+ modPlateHolder = GetVehicleMod(vehicle, 25),
+ modVanityPlate = GetVehicleMod(vehicle, 26),
+ modTrimA = GetVehicleMod(vehicle, 27),
+ modOrnaments = GetVehicleMod(vehicle, 28),
+ modDashboard = GetVehicleMod(vehicle, 29),
+ modDial = GetVehicleMod(vehicle, 30),
+ modDoorSpeaker = GetVehicleMod(vehicle, 31),
+ modSeats = GetVehicleMod(vehicle, 32),
+ modSteeringWheel = GetVehicleMod(vehicle, 33),
+ modShifterLeavers = GetVehicleMod(vehicle, 34),
+ modAPlate = GetVehicleMod(vehicle, 35),
+ modSpeakers = GetVehicleMod(vehicle, 36),
+ modTrunk = GetVehicleMod(vehicle, 37),
+ modHydrolic = GetVehicleMod(vehicle, 38),
+ modEngineBlock = GetVehicleMod(vehicle, 39),
+ modAirFilter = GetVehicleMod(vehicle, 40),
+ modStruts = GetVehicleMod(vehicle, 41),
+ modArchCover = GetVehicleMod(vehicle, 42),
+ modAerials = GetVehicleMod(vehicle, 43),
+ modTrimB = GetVehicleMod(vehicle, 44),
+ modTank = GetVehicleMod(vehicle, 45),
+ modWindows = GetVehicleMod(vehicle, 46),
+ modLivery = GetVehicleLivery(vehicle)
+ }
+ else
+ return
+ end
+end
+
+ESX.Game.SetVehicleProperties = function(vehicle, props)
+ if DoesEntityExist(vehicle) then
+ local colorPrimary, colorSecondary = GetVehicleColours(vehicle)
+ local pearlescentColor, wheelColor = GetVehicleExtraColours(vehicle)
+ SetVehicleModKit(vehicle, 0)
+
+ if props.plate then SetVehicleNumberPlateText(vehicle, props.plate) end
+ if props.plateIndex then SetVehicleNumberPlateTextIndex(vehicle, props.plateIndex) end
+ if props.bodyHealth then SetVehicleBodyHealth(vehicle, props.bodyHealth + 0.0) end
+ if props.engineHealth then SetVehicleEngineHealth(vehicle, props.engineHealth + 0.0) end
+ if props.tankHealth then SetVehiclePetrolTankHealth(vehicle, props.tankHealth + 0.0) end
+ if props.fuelLevel then SetVehicleFuelLevel(vehicle, props.fuelLevel + 0.0) end
+ if props.dirtLevel then SetVehicleDirtLevel(vehicle, props.dirtLevel + 0.0) end
+ if props.color1 then SetVehicleColours(vehicle, props.color1, colorSecondary) end
+ if props.color2 then SetVehicleColours(vehicle, props.color1 or colorPrimary, props.color2) end
+ if props.pearlescentColor then SetVehicleExtraColours(vehicle, props.pearlescentColor, wheelColor) end
+ if props.wheelColor then SetVehicleExtraColours(vehicle, props.pearlescentColor or pearlescentColor, props.wheelColor) end
+ if props.wheels then SetVehicleWheelType(vehicle, props.wheels) end
+ if props.windowTint then SetVehicleWindowTint(vehicle, props.windowTint) end
+
+ if props.neonEnabled then
+ SetVehicleNeonLightEnabled(vehicle, 0, props.neonEnabled[1])
+ SetVehicleNeonLightEnabled(vehicle, 1, props.neonEnabled[2])
+ SetVehicleNeonLightEnabled(vehicle, 2, props.neonEnabled[3])
+ SetVehicleNeonLightEnabled(vehicle, 3, props.neonEnabled[4])
+ end
+
+ if props.extras then
+ for extraId,enabled in pairs(props.extras) do
+ if enabled then
+ SetVehicleExtra(vehicle, tonumber(extraId), 0)
+ else
+ SetVehicleExtra(vehicle, tonumber(extraId), 1)
+ end
+ end
+ end
+
+ if props.neonColor then SetVehicleNeonLightsColour(vehicle, props.neonColor[1], props.neonColor[2], props.neonColor[3]) end
+ if props.xenonColor then SetVehicleXenonLightsColour(vehicle, props.xenonColor) end
+ if props.modSmokeEnabled then ToggleVehicleMod(vehicle, 20, true) end
+ if props.tyreSmokeColor then SetVehicleTyreSmokeColor(vehicle, props.tyreSmokeColor[1], props.tyreSmokeColor[2], props.tyreSmokeColor[3]) end
+ if props.modSpoilers then SetVehicleMod(vehicle, 0, props.modSpoilers, false) end
+ if props.modFrontBumper then SetVehicleMod(vehicle, 1, props.modFrontBumper, false) end
+ if props.modRearBumper then SetVehicleMod(vehicle, 2, props.modRearBumper, false) end
+ if props.modSideSkirt then SetVehicleMod(vehicle, 3, props.modSideSkirt, false) end
+ if props.modExhaust then SetVehicleMod(vehicle, 4, props.modExhaust, false) end
+ if props.modFrame then SetVehicleMod(vehicle, 5, props.modFrame, false) end
+ if props.modGrille then SetVehicleMod(vehicle, 6, props.modGrille, false) end
+ if props.modHood then SetVehicleMod(vehicle, 7, props.modHood, false) end
+ if props.modFender then SetVehicleMod(vehicle, 8, props.modFender, false) end
+ if props.modRightFender then SetVehicleMod(vehicle, 9, props.modRightFender, false) end
+ if props.modRoof then SetVehicleMod(vehicle, 10, props.modRoof, false) end
+ if props.modEngine then SetVehicleMod(vehicle, 11, props.modEngine, false) end
+ if props.modBrakes then SetVehicleMod(vehicle, 12, props.modBrakes, false) end
+ if props.modTransmission then SetVehicleMod(vehicle, 13, props.modTransmission, false) end
+ if props.modHorns then SetVehicleMod(vehicle, 14, props.modHorns, false) end
+ if props.modSuspension then SetVehicleMod(vehicle, 15, props.modSuspension, false) end
+ if props.modArmor then SetVehicleMod(vehicle, 16, props.modArmor, false) end
+ if props.modTurbo then ToggleVehicleMod(vehicle, 18, props.modTurbo) end
+ if props.modXenon then ToggleVehicleMod(vehicle, 22, props.modXenon) end
+ if props.modFrontWheels then SetVehicleMod(vehicle, 23, props.modFrontWheels, false) end
+ if props.modBackWheels then SetVehicleMod(vehicle, 24, props.modBackWheels, false) end
+ if props.modPlateHolder then SetVehicleMod(vehicle, 25, props.modPlateHolder, false) end
+ if props.modVanityPlate then SetVehicleMod(vehicle, 26, props.modVanityPlate, false) end
+ if props.modTrimA then SetVehicleMod(vehicle, 27, props.modTrimA, false) end
+ if props.modOrnaments then SetVehicleMod(vehicle, 28, props.modOrnaments, false) end
+ if props.modDashboard then SetVehicleMod(vehicle, 29, props.modDashboard, false) end
+ if props.modDial then SetVehicleMod(vehicle, 30, props.modDial, false) end
+ if props.modDoorSpeaker then SetVehicleMod(vehicle, 31, props.modDoorSpeaker, false) end
+ if props.modSeats then SetVehicleMod(vehicle, 32, props.modSeats, false) end
+ if props.modSteeringWheel then SetVehicleMod(vehicle, 33, props.modSteeringWheel, false) end
+ if props.modShifterLeavers then SetVehicleMod(vehicle, 34, props.modShifterLeavers, false) end
+ if props.modAPlate then SetVehicleMod(vehicle, 35, props.modAPlate, false) end
+ if props.modSpeakers then SetVehicleMod(vehicle, 36, props.modSpeakers, false) end
+ if props.modTrunk then SetVehicleMod(vehicle, 37, props.modTrunk, false) end
+ if props.modHydrolic then SetVehicleMod(vehicle, 38, props.modHydrolic, false) end
+ if props.modEngineBlock then SetVehicleMod(vehicle, 39, props.modEngineBlock, false) end
+ if props.modAirFilter then SetVehicleMod(vehicle, 40, props.modAirFilter, false) end
+ if props.modStruts then SetVehicleMod(vehicle, 41, props.modStruts, false) end
+ if props.modArchCover then SetVehicleMod(vehicle, 42, props.modArchCover, false) end
+ if props.modAerials then SetVehicleMod(vehicle, 43, props.modAerials, false) end
+ if props.modTrimB then SetVehicleMod(vehicle, 44, props.modTrimB, false) end
+ if props.modTank then SetVehicleMod(vehicle, 45, props.modTank, false) end
+ if props.modWindows then SetVehicleMod(vehicle, 46, props.modWindows, false) end
+
+ if props.modLivery then
+ SetVehicleMod(vehicle, 48, props.modLivery, false)
+ SetVehicleLivery(vehicle, props.modLivery)
+ end
+ end
+end
+
+ESX.Game.Utils.DrawText3D = function(coords, text, size, font)
+ local vector = type(coords) == "vector3" and coords or vec(coords.x, coords.y, coords.z)
+
+ local camCoords = GetGameplayCamCoords()
+ local distance = #(vector - camCoords)
+
+ if not size then size = 1 end
+ if not font then font = 0 end
+
+ local scale = (size / distance) * 2
+ local fov = (1 / GetGameplayCamFov()) * 100
+ scale = scale * fov
+
+ SetTextScale(0.0 * scale, 0.55 * scale)
+ SetTextFont(font)
+ SetTextProportional(1)
+ SetTextColour(255, 255, 255, 215)
+ SetTextEntry('STRING')
+ SetTextCentre(true)
+ AddTextComponentString(text)
+ SetDrawOrigin(vector.xyz, 0)
+ DrawText(0.0, 0.0)
+ ClearDrawOrigin()
+end
+
+ESX.ShowInventory = function()
+ local playerPed = ESX.PlayerData.ped
+ local elements, currentWeight = {}, 0
+
+ for k,v in pairs(ESX.PlayerData.accounts) do
+ if v.money > 0 then
+ local formattedMoney = _U('locale_currency', ESX.Math.GroupDigits(v.money))
+ local canDrop = v.name ~= 'bank'
+
+ table.insert(elements, {
+ label = ('%s: %s'):format(v.label, formattedMoney),
+ count = v.money,
+ type = 'item_account',
+ value = v.name,
+ usable = false,
+ rare = false,
+ canRemove = canDrop
+ })
+ end
+ end
+
+ for k,v in ipairs(ESX.PlayerData.inventory) do
+ if v.count > 0 then
+ currentWeight = currentWeight + (v.weight * v.count)
+
+ table.insert(elements, {
+ label = ('%s x%s'):format(v.label, v.count),
+ count = v.count,
+ type = 'item_standard',
+ value = v.name,
+ usable = v.usable,
+ rare = v.rare,
+ canRemove = v.canRemove
+ })
+ end
+ end
+
+ for k,v in ipairs(Config.Weapons) do
+ local weaponHash = GetHashKey(v.name)
+
+ if HasPedGotWeapon(playerPed, weaponHash, false) then
+ local ammo, label = GetAmmoInPedWeapon(playerPed, weaponHash)
+
+ if v.ammo then
+ label = ('%s - %s %s'):format(v.label, ammo, v.ammo.label)
+ else
+ label = v.label
+ end
+
+ table.insert(elements, {
+ label = label,
+ count = 1,
+ type = 'item_weapon',
+ value = v.name,
+ usable = false,
+ rare = false,
+ ammo = ammo,
+ canGiveAmmo = (v.ammo ~= nil),
+ canRemove = true
+ })
+ end
+ end
+
+ ESX.UI.Menu.CloseAll()
+
+ ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'inventory', {
+ title = _U('inventory', currentWeight, ESX.PlayerData.maxWeight),
+ align = 'bottom-right',
+ elements = elements
+ }, function(data, menu)
+ menu.close()
+ local player, distance = ESX.Game.GetClosestPlayer()
+ elements = {}
+
+ if data.current.usable then
+ table.insert(elements, {label = _U('use'), action = 'use', type = data.current.type, value = data.current.value})
+ end
+
+ if data.current.canRemove then
+ if player ~= -1 and distance <= 3.0 then
+ table.insert(elements, {label = _U('give'), action = 'give', type = data.current.type, value = data.current.value})
+ end
+
+ table.insert(elements, {label = _U('remove'), action = 'remove', type = data.current.type, value = data.current.value})
+ end
+
+ if data.current.type == 'item_weapon' and data.current.canGiveAmmo and data.current.ammo > 0 and player ~= -1 and distance <= 3.0 then
+ table.insert(elements, {label = _U('giveammo'), action = 'give_ammo', type = data.current.type, value = data.current.value})
+ end
+
+ table.insert(elements, {label = _U('return'), action = 'return'})
+
+ ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'inventory_item', {
+ title = data.current.label,
+ align = 'bottom-right',
+ elements = elements,
+ }, function(data1, menu1)
+ local item, type = data1.current.value, data1.current.type
+
+ if data1.current.action == 'give' then
+ local playersNearby = ESX.Game.GetPlayersInArea(GetEntityCoords(playerPed), 3.0)
+
+ if #playersNearby > 0 then
+ local players = {}
+ elements = {}
+
+ for k,playerNearby in ipairs(playersNearby) do
+ players[GetPlayerServerId(playerNearby)] = true
+ end
+
+ ESX.TriggerServerCallback('esx:getPlayerNames', function(returnedPlayers)
+ for playerId,playerName in pairs(returnedPlayers) do
+ table.insert(elements, {
+ label = playerName,
+ playerId = playerId
+ })
+ end
+
+ ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'give_item_to', {
+ title = _U('give_to'),
+ align = 'bottom-right',
+ elements = elements
+ }, function(data2, menu2)
+ local selectedPlayer, selectedPlayerId = GetPlayerFromServerId(data2.current.playerId), data2.current.playerId
+ playersNearby = ESX.Game.GetPlayersInArea(GetEntityCoords(playerPed), 3.0)
+ playersNearby = ESX.Table.Set(playersNearby)
+
+ if playersNearby[selectedPlayer] then
+ local selectedPlayerPed = GetPlayerPed(selectedPlayer)
+
+ if IsPedOnFoot(selectedPlayerPed) and not IsPedFalling(selectedPlayerPed) then
+ if type == 'item_weapon' then
+ TriggerServerEvent('esx:giveInventoryItem', selectedPlayerId, type, item, nil)
+ menu2.close()
+ menu1.close()
+ else
+ ESX.UI.Menu.Open('dialog', GetCurrentResourceName(), 'inventory_item_count_give', {
+ title = _U('amount')
+ }, function(data3, menu3)
+ local quantity = tonumber(data3.value)
+
+ if quantity and quantity > 0 and data.current.count >= quantity then
+ TriggerServerEvent('esx:giveInventoryItem', selectedPlayerId, type, item, quantity)
+ menu3.close()
+ menu2.close()
+ menu1.close()
+ else
+ ESX.ShowNotification(_U('amount_invalid'))
+ end
+ end, function(data3, menu3)
+ menu3.close()
+ end)
+ end
+ else
+ ESX.ShowNotification(_U('in_vehicle'))
+ end
+ else
+ ESX.ShowNotification(_U('players_nearby'))
+ menu2.close()
+ end
+ end, function(data2, menu2)
+ menu2.close()
+ end)
+ end, players)
+ else
+ ESX.ShowNotification(_U('players_nearby'))
+ end
+ elseif data1.current.action == 'remove' then
+ if IsPedOnFoot(playerPed) and not IsPedFalling(playerPed) then
+ local dict, anim = 'weapons@first_person@aim_rng@generic@projectile@sticky_bomb@', 'plant_floor'
+ ESX.Streaming.RequestAnimDict(dict)
+
+ if type == 'item_weapon' then
+ menu1.close()
+ TaskPlayAnim(playerPed, dict, anim, 8.0, 1.0, 1000, 16, 0.0, false, false, false)
+ Citizen.Wait(1000)
+ TriggerServerEvent('esx:removeInventoryItem', type, item)
+ else
+ ESX.UI.Menu.Open('dialog', GetCurrentResourceName(), 'inventory_item_count_remove', {
+ title = _U('amount')
+ }, function(data2, menu2)
+ local quantity = tonumber(data2.value)
+
+ if quantity and quantity > 0 and data.current.count >= quantity then
+ menu2.close()
+ menu1.close()
+ TaskPlayAnim(playerPed, dict, anim, 8.0, 1.0, 1000, 16, 0.0, false, false, false)
+ Citizen.Wait(1000)
+ TriggerServerEvent('esx:removeInventoryItem', type, item, quantity)
+ else
+ ESX.ShowNotification(_U('amount_invalid'))
+ end
+ end, function(data2, menu2)
+ menu2.close()
+ end)
+ end
+ end
+ elseif data1.current.action == 'use' then
+ TriggerServerEvent('esx:useItem', item)
+ elseif data1.current.action == 'return' then
+ ESX.UI.Menu.CloseAll()
+ ESX.ShowInventory()
+ elseif data1.current.action == 'give_ammo' then
+ local closestPlayer, closestDistance = ESX.Game.GetClosestPlayer()
+ local closestPed = GetPlayerPed(closestPlayer)
+ local pedAmmo = GetAmmoInPedWeapon(playerPed, GetHashKey(item))
+
+ if IsPedOnFoot(closestPed) and not IsPedFalling(closestPed) then
+ if closestPlayer ~= -1 and closestDistance < 3.0 then
+ if pedAmmo > 0 then
+ ESX.UI.Menu.Open('dialog', GetCurrentResourceName(), 'inventory_item_count_give', {
+ title = _U('amountammo')
+ }, function(data2, menu2)
+ local quantity = tonumber(data2.value)
+
+ if quantity and quantity > 0 then
+ if pedAmmo >= quantity then
+ TriggerServerEvent('esx:giveInventoryItem', GetPlayerServerId(closestPlayer), 'item_ammo', item, quantity)
+ menu2.close()
+ menu1.close()
+ else
+ ESX.ShowNotification(_U('noammo'))
+ end
+ else
+ ESX.ShowNotification(_U('amount_invalid'))
+ end
+ end, function(data2, menu2)
+ menu2.close()
+ end)
+ else
+ ESX.ShowNotification(_U('noammo'))
+ end
+ else
+ ESX.ShowNotification(_U('players_nearby'))
+ end
+ else
+ ESX.ShowNotification(_U('in_vehicle'))
+ end
+ end
+ end, function(data1, menu1)
+ ESX.UI.Menu.CloseAll()
+ ESX.ShowInventory()
+ end)
+ end, function(data, menu)
+ menu.close()
+ end)
+end
+
+RegisterNetEvent('esx:serverCallback')
+AddEventHandler('esx:serverCallback', function(requestId, ...)
+ ESX.ServerCallbacks[requestId](...)
+ ESX.ServerCallbacks[requestId] = nil
+end)
+
+RegisterNetEvent('esx:showNotification')
+AddEventHandler('esx:showNotification', function(msg)
+ ESX.ShowNotification(msg)
+end)
+
+RegisterNetEvent('esx:showAdvancedNotification')
+AddEventHandler('esx:showAdvancedNotification', function(sender, subject, msg, textureDict, iconType, flash, saveToBrief, hudColorIndex)
+ ESX.ShowAdvancedNotification(sender, subject, msg, textureDict, iconType, flash, saveToBrief, hudColorIndex)
+end)
+
+RegisterNetEvent('esx:showHelpNotification')
+AddEventHandler('esx:showHelpNotification', function(msg, thisFrame, beep, duration)
+ ESX.ShowHelpNotification(msg, thisFrame, beep, duration)
+end)
+
+-- SetTimeout
+Citizen.CreateThread(function()
+ while true do
+ Citizen.Wait(0)
+ local letSleep = true
+ local currTime = GetGameTimer()
+
+ if #ESX.TimeoutCallbacks > 0 then
+ letSleep = false
+ for i=1, #ESX.TimeoutCallbacks, 1 do
+ if ESX.TimeoutCallbacks[i] then
+ if currTime >= ESX.TimeoutCallbacks[i].time then
+ ESX.TimeoutCallbacks[i].cb()
+ ESX.TimeoutCallbacks[i] = nil
+ end
+ end
+ end
+ end
+ if letSleep then
+ Citizen.Wait(500)
+ end
+ end
+end)
diff --git a/[esx]/es_extended/client/main.lua b/[esx]/es_extended/client/main.lua
new file mode 100644
index 00000000..e5d6aec7
--- /dev/null
+++ b/[esx]/es_extended/client/main.lua
@@ -0,0 +1,597 @@
+local pickups = {}
+
+Citizen.CreateThread(function()
+ while NetworkIsPlayerActive(PlayerId()) and not Config.Multichar do
+ Citizen.Wait(5)
+ DoScreenFadeOut(0)
+ TriggerServerEvent('esx:onPlayerJoined')
+ break
+ end
+end)
+
+RegisterNetEvent('esx:playerLoaded')
+AddEventHandler('esx:playerLoaded', function(xPlayer, isNew, skin)
+ ESX.PlayerLoaded = true
+ ESX.PlayerData = xPlayer
+
+ FreezeEntityPosition(PlayerPedId(), true)
+
+ if Config.Multichar then
+ Citizen.Wait(3000)
+ else
+ exports.spawnmanager:spawnPlayer({
+ x = ESX.PlayerData.coords.x,
+ y = ESX.PlayerData.coords.y,
+ z = ESX.PlayerData.coords.z + 0.25,
+ heading = ESX.PlayerData.coords.heading,
+ model = `mp_m_freemode_01`,
+ skipFade = false
+ }, function()
+ TriggerServerEvent('esx:onPlayerSpawn')
+ TriggerEvent('esx:onPlayerSpawn')
+ TriggerEvent('playerSpawned') -- compatibility with old scripts
+ TriggerEvent('esx:restoreLoadout')
+ if isNew then
+ if skin.sex == 0 then
+ TriggerEvent('skinchanger:loadDefaultModel', true)
+ else
+ TriggerEvent('skinchanger:loadDefaultModel', false)
+ end
+ elseif skin then TriggerEvent('skinchanger:loadSkin', skin) end
+ TriggerEvent('esx:loadingScreenOff')
+ ShutdownLoadingScreen()
+ ShutdownLoadingScreenNui()
+ FreezeEntityPosition(ESX.PlayerData.ped, false)
+ end)
+ end
+
+ while ESX.PlayerData.ped == nil do Citizen.Wait(20) end
+ -- enable PVP
+ if Config.EnablePVP then
+ SetCanAttackFriendly(ESX.PlayerData.ped, true, false)
+ NetworkSetFriendlyFireOption(true)
+ end
+
+ if Config.EnableHud then
+ for k,v in ipairs(ESX.PlayerData.accounts) do
+ local accountTpl = '
{{money}}
'
+ ESX.UI.HUD.RegisterElement('account_' .. v.name, k, 0, accountTpl, {money = ESX.Math.GroupDigits(v.money)})
+ end
+
+ local jobTpl = '
');
+ $('#inventory_notifications').append(elem);
+
+ $(elem).delay(3000).fadeOut(1000, function () {
+ elem.remove();
+ });
+ };
+
+ window.onData = (data) => {
+ switch (data.action) {
+ case 'setHUDDisplay': {
+ ESX.setHUDDisplay(data.opacity);
+ break;
+ }
+
+ case 'insertHUDElement': {
+ ESX.insertHUDElement(data.name, data.index, data.priority, data.html, data.data);
+ break;
+ }
+
+ case 'updateHUDElement': {
+ ESX.updateHUDElement(data.name, data.data);
+ break;
+ }
+
+ case 'deleteHUDElement': {
+ ESX.deleteHUDElement(data.name);
+ break;
+ }
+
+ case 'resetHUDElements': {
+ ESX.resetHUDElements();
+ break;
+ }
+
+ case 'inventoryNotification': {
+ ESX.inventoryNotification(data.add, data.item, data.count);
+ }
+ }
+ };
+
+ window.onload = function (e) {
+ window.addEventListener('message', (event) => {
+ onData(event.data);
+ });
+ };
+
+})();
diff --git a/[esx]/es_extended/html/js/mustache.min.js b/[esx]/es_extended/html/js/mustache.min.js
new file mode 100644
index 00000000..520cfcb9
--- /dev/null
+++ b/[esx]/es_extended/html/js/mustache.min.js
@@ -0,0 +1 @@
+(function defineMustache(global,factory){if(typeof exports==="object"&&exports&&typeof exports.nodeName!=="string"){factory(exports)}else if(typeof define==="function"&&define.amd){define(["exports"],factory)}else{global.Mustache={};factory(global.Mustache)}})(this,function mustacheFactory(mustache){var objectToString=Object.prototype.toString;var isArray=Array.isArray||function isArrayPolyfill(object){return objectToString.call(object)==="[object Array]"};function isFunction(object){return typeof object==="function"}function typeStr(obj){return isArray(obj)?"array":typeof obj}function escapeRegExp(string){return string.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function hasProperty(obj,propName){return obj!=null&&typeof obj==="object"&&propName in obj}var regExpTest=RegExp.prototype.test;function testRegExp(re,string){return regExpTest.call(re,string)}var nonSpaceRe=/\S/;function isWhitespace(string){return!testRegExp(nonSpaceRe,string)}var entityMap={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};function escapeHtml(string){return String(string).replace(/[&<>"'`=\/]/g,function fromEntityMap(s){return entityMap[s]})}var whiteRe=/\s*/;var spaceRe=/\s+/;var equalsRe=/\s*=/;var curlyRe=/\s*\}/;var tagRe=/#|\^|\/|>|\{|&|=|!/;function parseTemplate(template,tags){if(!template)return[];var sections=[];var tokens=[];var spaces=[];var hasTag=false;var nonSpace=false;function stripSpace(){if(hasTag&&!nonSpace){while(spaces.length)delete tokens[spaces.pop()]}else{spaces=[]}hasTag=false;nonSpace=false}var openingTagRe,closingTagRe,closingCurlyRe;function compileTags(tagsToCompile){if(typeof tagsToCompile==="string")tagsToCompile=tagsToCompile.split(spaceRe,2);if(!isArray(tagsToCompile)||tagsToCompile.length!==2)throw new Error("Invalid tags: "+tagsToCompile);openingTagRe=new RegExp(escapeRegExp(tagsToCompile[0])+"\\s*");closingTagRe=new RegExp("\\s*"+escapeRegExp(tagsToCompile[1]));closingCurlyRe=new RegExp("\\s*"+escapeRegExp("}"+tagsToCompile[1]))}compileTags(tags||mustache.tags);var scanner=new Scanner(template);var start,type,value,chr,token,openSection;while(!scanner.eos()){start=scanner.pos;value=scanner.scanUntil(openingTagRe);if(value){for(var i=0,valueLength=value.length;i0?sections[sections.length-1][4]:nestedTokens;break;default:collector.push(token)}}return nestedTokens}function Scanner(string){this.string=string;this.tail=string;this.pos=0}Scanner.prototype.eos=function eos(){return this.tail===""};Scanner.prototype.scan=function scan(re){var match=this.tail.match(re);if(!match||match.index!==0)return"";var string=match[0];this.tail=this.tail.substring(string.length);this.pos+=string.length;return string};Scanner.prototype.scanUntil=function scanUntil(re){var index=this.tail.search(re),match;switch(index){case-1:match=this.tail;this.tail="";break;case 0:match="";break;default:match=this.tail.substring(0,index);this.tail=this.tail.substring(index)}this.pos+=match.length;return match};function Context(view,parentContext){this.view=view;this.cache={".":this.view};this.parent=parentContext}Context.prototype.push=function push(view){return new Context(view,this)};Context.prototype.lookup=function lookup(name){var cache=this.cache;var value;if(cache.hasOwnProperty(name)){value=cache[name]}else{var context=this,names,index,lookupHit=false;while(context){if(name.indexOf(".")>0){value=context.view;names=name.split(".");index=0;while(value!=null&&index")value=this.renderPartial(token,context,partials,originalTemplate);else if(symbol==="&")value=this.unescapedValue(token,context);else if(symbol==="name")value=this.escapedValue(token,context);else if(symbol==="text")value=this.rawValue(token);if(value!==undefined)buffer+=value}return buffer};Writer.prototype.renderSection=function renderSection(token,context,partials,originalTemplate){var self=this;var buffer="";var value=context.lookup(token[1]);function subRender(template){return self.render(template,context,partials)}if(!value)return;if(isArray(value)){for(var j=0,valueLength=value.length;j {
+
+ let ESXWrapper = {};
+ ESXWrapper.MessageSize = 1024;
+ ESXWrapper.messageId = 0;
+
+ window.SendMessage = function (namespace, type, msg) {
+
+ ESXWrapper.messageId = (ESXWrapper.messageId < 65535) ? ESXWrapper.messageId + 1 : 0;
+ const str = JSON.stringify(msg);
+
+ for (let i = 0; i < str.length; i++) {
+
+ let count = 0;
+ let chunk = '';
+
+ while (count < ESXWrapper.MessageSize && i < str.length) {
+
+ chunk += str[i];
+
+ count++;
+ i++;
+ }
+
+ i--;
+
+ const data = {
+ __type: type,
+ id: ESXWrapper.messageId,
+ chunk: chunk
+ }
+
+ if (i == str.length - 1)
+ data.end = true;
+
+ $.post('http://' + namespace + '/__chunk', JSON.stringify(data));
+
+ }
+
+ }
+
+})()
diff --git a/[esx]/es_extended/html/ui.html b/[esx]/es_extended/html/ui.html
new file mode 100644
index 00000000..653f41d8
--- /dev/null
+++ b/[esx]/es_extended/html/ui.html
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/[esx]/es_extended/imports.lua b/[esx]/es_extended/imports.lua
new file mode 100644
index 00000000..71dd9f47
--- /dev/null
+++ b/[esx]/es_extended/imports.lua
@@ -0,0 +1,10 @@
+ESX = exports['es_extended']:getSharedObject()
+
+if not IsDuplicityVersion() then -- Only register this event for the client
+ AddEventHandler('esx:setPlayerData', function(key, val, last)
+ if GetInvokingResource() == 'es_extended' then
+ ESX.PlayerData[key] = val
+ if OnPlayerData ~= nil then OnPlayerData(key, val, last) end
+ end
+ end)
+end
\ No newline at end of file
diff --git a/[esx]/es_extended/locale.js b/[esx]/es_extended/locale.js
new file mode 100644
index 00000000..4b5390f8
--- /dev/null
+++ b/[esx]/es_extended/locale.js
@@ -0,0 +1,65 @@
+var locale = [];
+
+/**
+ * Similar to the concept of gettext, this function returns the
+ * localized string for the parsed string. The function supports
+ * wrapping.
+ *
+ * @param {string} args The string we want localized
+ * @return {string} Returns the localized string
+ *
+ */
+function _U() {
+ var args = arguments;
+ var string = args[0];
+
+ // Was a string specified?
+ if (!string) {
+ console.log('locale.js: no string was parsed');
+ return 'locale.js: no string was parsed';
+ }
+
+ // Has the locale file been set?
+ if (locale.length == 0) {
+ console.log('locale.js: no locale has been set');
+ return 'locale.js: no locale has been set';
+ }
+
+ // Does the translation exist?
+ if (!locale[string]) {
+ console.log('locale.js: translation [{0}] does not exist'.format(string));
+ return 'locale.js: translation [{0}] does not exist'.format(string);
+ }
+
+ // Do we need to format the string?
+ if (args.length == 1) {
+ return capitalize(locale[string]);
+ } else {
+ return formatString(args);
+ }
+}
+
+function formatString(args) {
+ var string = capitalize(locale[args[0]]);
+
+ for (var i = 1; i < args.length; i++) {
+ string = string.replace(/%s/, args[i]);
+ }
+
+ return string;
+}
+
+function capitalize(string) {
+ return string[0].toUpperCase() + string.slice(1);
+}
+
+// https://stackoverflow.com/a/35359503
+String.prototype.format = function () {
+ var args = arguments;
+ return this.replace(/{(\d+)}/g, function (match, number) {
+ return typeof args[number] != 'undefined'
+ ? args[number]
+ : match
+ ;
+ });
+};
diff --git a/[esx]/es_extended/locale.lua b/[esx]/es_extended/locale.lua
new file mode 100644
index 00000000..68de6651
--- /dev/null
+++ b/[esx]/es_extended/locale.lua
@@ -0,0 +1,21 @@
+Locales = {}
+
+function _(str, ...) -- Translate string
+
+ if Locales[Config.Locale] ~= nil then
+
+ if Locales[Config.Locale][str] ~= nil then
+ return string.format(Locales[Config.Locale][str], ...)
+ else
+ return 'Translation [' .. Config.Locale .. '][' .. str .. '] does not exist'
+ end
+
+ else
+ return 'Locale [' .. Config.Locale .. '] does not exist'
+ end
+
+end
+
+function _U(str, ...) -- Translate string first char uppercase
+ return tostring(_(str, ...):gsub("^%l", string.upper))
+end
diff --git a/[esx]/es_extended/locales/br.lua b/[esx]/es_extended/locales/br.lua
new file mode 100644
index 00000000..d63f2867
--- /dev/null
+++ b/[esx]/es_extended/locales/br.lua
@@ -0,0 +1,225 @@
+Locales['br'] = {
+ -- Inventory
+ ['inventory'] = 'inventário %s / %s',
+ ['use'] = 'usar',
+ ['give'] = 'dar',
+ ['remove'] = 'remover',
+ ['return'] = 'voltar',
+ ['give_to'] = 'dar para',
+ ['amount'] = 'quantidade',
+ ['giveammo'] = 'dar munição',
+ ['amountammo'] = 'quantidade de munição',
+ ['noammo'] = 'voce não tem todas essas munições!',
+ ['gave_item'] = 'voce deu ~y~%sx~s~ ~b~%s~s~ para ~y~%s~s~',
+ ['received_item'] = 'voce recebeu ~y~%sx~s~ ~b~%s~s~ de ~b~%s~s~',
+ ['gave_weapon'] = 'você deu ~b~%s~s~ para ~y~%s~s~',
+ ['gave_weapon_ammo'] = 'você deu ~o~%sx %s~s~ para ~b~%s~s~ de ~y~%s~s~',
+ ['gave_weapon_withammo'] = 'você deu ~b~%s~s~ com ~o~%sx %s~s~ para ~y~%s~s~',
+ ['gave_weapon_hasalready'] = '~y~%s~s~ já tem um(a) ~y~%s~s~',
+ ['gave_weapon_noweapon'] = 'não tem essa arma ~y~%s~s~',
+ ['received_weapon'] = 'você recebeu ~b~%s~s~ de ~b~%s~s~',
+ ['received_weapon_ammo'] = 'você recebeu ~o~%sx %s~s~ para a sua(o seu) ~b~%s~s~ de ~b~%s~s~',
+ ['received_weapon_withammo'] = 'você recebeu ~b~%s~s~ com ~o~%sx %s~s~ de ~b~%s~s~',
+ ['received_weapon_hasalready'] = '~b~%s~s~ tentou lhe dar uma ~y~%s~s~, mas você já tem um(a)',
+ ['received_weapon_noweapon'] = '~b~%s~s~ tentou lhe dar munição para ~y~%s~s~, mas você não tem um(a)',
+ ['gave_account_money'] = 'voce deu ~g~$%s~s~ (%s) para ~y~%s~s~',
+ ['received_account_money'] = 'voce recebeu ~g~$%s~s~ (%s) de ~b~%s~s~',
+ ['amount_invalid'] = 'quantidade inválida',
+ ['players_nearby'] = 'nenhum cidadão por perto',
+ ['ex_inv_lim'] = 'ação não e possivel, excedendo o limite de estoque para ~y~%s~s~',
+ ['imp_invalid_quantity'] = 'ação impossível, quantidade inválida',
+ ['imp_invalid_amount'] = 'ação impossível, valor invalido',
+ ['threw_standard'] = 'você jogou ~y~%sx~s~ ~b~%s~s~',
+ ['threw_account'] = 'você jogou ~g~$%s~s~ ~b~%s~s~',
+ ['threw_weapon'] = 'você jogou ~b~%s~s~',
+ ['threw_weapon_ammo'] = 'você jogou ~b~%s~s~ com ~o~%sx %s~s~',
+ ['threw_weapon_already'] = 'você já esta com essa arma',
+ ['threw_cannot_pickup'] = 'você não pode pegar porque seu inventário está cheio!',
+ ['threw_pickup_prompt'] = 'pressione ~y~E~s~ para pegar',
+
+ -- Key mapping
+ ['keymap_showinventory'] = 'exibir inventario',
+
+ -- Salary related
+ ['received_salary'] = 'voce recebeu seu salário: ~g~$%s~s~ ',
+ ['received_help'] = 'voce recebeu seu cheque de bem-estar: ~g~$%s~s~ ',
+ ['company_nomoney'] = 'a empresa em que voce esta empregado esta muito pobre para pagar seu salário',
+ ['received_paycheck'] = 'recebeu dinheiro',
+ ['bank'] = 'banco',
+ ['account_bank'] = 'banco',
+ ['account_black_money'] = 'dinheiro sujo',
+ ['account_money'] = 'dinheiro',
+
+ ['act_imp'] = 'ação impossível',
+ ['in_vehicle'] = 'voce não pode dar nada para alguem no veículo',
+
+ -- Commands
+ ['command_car'] = 'spawn um carro',
+ ['command_car_car'] = 'nome do carro',
+ ['command_cardel'] = 'excluir veículo',
+ ['command_cardel_radius'] = 'optional, delete every vehicle within the specified radius',
+ ['command_clear'] = 'limpar o chat',
+ ['command_clearall'] = 'limpar o chat para todos',
+ ['command_clearinventory'] = 'remover todos os itens do inventário',
+ ['command_clearloadout'] = 'remova todas as armas do carregamento',
+ ['command_giveaccountmoney'] = 'dar dinheiro da conta',
+ ['command_giveaccountmoney_account'] = 'conta',
+ ['command_giveaccountmoney_amount'] = 'amount',
+ ['command_giveaccountmoney_invalid'] = 'conta inválida',
+ ['command_giveitem'] = 'dar item',
+ ['command_giveitem_item'] = 'item',
+ ['command_giveitem_count'] = 'count',
+ ['command_giveweapon'] = 'dar arma',
+ ['command_giveweapon_weapon'] = 'arma',
+ ['command_giveweapon_ammo'] = 'ammo count',
+ ['command_giveweapon_hasalready'] = 'player already has that weapon',
+ ['command_giveweaponcomponent'] = 'give weapon component',
+ ['command_giveweaponcomponent_component'] = 'component name',
+ ['command_giveweaponcomponent_invalid'] = 'invalid weapon component',
+ ['command_giveweaponcomponent_hasalready'] = 'player already has that weapon component',
+ ['command_giveweaponcomponent_missingweapon'] = 'player does not have that weapon',
+ ['command_save'] = 'save a player to database',
+ ['command_saveall'] = 'save all players to database',
+ ['command_setaccountmoney'] = 'set account money for a player',
+ ['command_setaccountmoney_amount'] = 'amount of money to set',
+ ['command_setcoords'] = 'teleport to coordinates',
+ ['command_setcoords_x'] = 'x axis',
+ ['command_setcoords_y'] = 'y axis',
+ ['command_setcoords_z'] = 'z axis',
+ ['command_setjob'] = 'atribuir um trabalho a um usuario',
+ ['command_setjob_job'] = 'o trabalho que voce deseja atribuir',
+ ['command_setjob_grade'] = 'o nivel de emprego',
+ ['command_setjob_invalid'] = 'the job, grade or both are invalid',
+ ['command_setgroup'] = 'set player group',
+ ['command_setgroup_group'] = 'group name',
+ ['commanderror_argumentmismatch'] = 'argument count mismatch (passed %s, wanted %s)',
+ ['commanderror_argumentmismatch_number'] = 'argument #%s type mismatch (passed string, wanted number)',
+ ['commanderror_invaliditem'] = 'item invalido',
+ ['commanderror_invalidweapon'] = 'invalid weapon',
+ ['commanderror_console'] = 'that command can not be run from console',
+ ['commanderror_invalidcommand'] = '^3%s^0 is not an valid command!',
+ ['commanderror_invalidplayerid'] = 'there is no player online matching that server id',
+ ['commandgeneric_playerid'] = 'o ID do jogador',
+
+ -- Locale settings
+ ['locale_digit_grouping_symbol'] = ' ',
+ ['locale_currency'] = 'R$%s',
+
+ -- Weapons
+ ['weapon_knife'] = 'faca',
+ ['weapon_nightstick'] = 'cacetete',
+ ['weapon_hammer'] = 'martelo',
+ ['weapon_bat'] = 'bastao',
+ ['weapon_golfclub'] = 'golf club',
+ ['weapon_crowbar'] = 'pe de cabra',
+ ['weapon_pistol'] = 'pistola',
+ ['weapon_combatpistol'] = 'pistola de combate',
+ ['weapon_appistol'] = 'ap pistola',
+ ['weapon_pistol50'] = 'pistola .50',
+ ['weapon_microsmg'] = 'micro smg',
+ ['weapon_smg'] = 'smg',
+ ['weapon_assaultsmg'] = 'smg de assalto',
+ ['weapon_assaultrifle'] = 'rifle de assalto',
+ ['weapon_carbinerifle'] = 'carabina rifle',
+ ['weapon_advancedrifle'] = 'rifle avançado',
+ ['weapon_mg'] = 'mg',
+ ['weapon_combatmg'] = 'combate mg',
+ ['weapon_pumpshotgun'] = 'espingarda',
+ ['weapon_sawnoffshotgun'] = 'espingarda serrada',
+ ['weapon_assaultshotgun'] = 'espingarda de assalto',
+ ['weapon_bullpupshotgun'] = 'espingarda de bullpup',
+ ['weapon_stungun'] = 'arma de choque',
+ ['weapon_sniperrifle'] = 'sniper rifle',
+ ['weapon_heavysniper'] = 'heavy sniper',
+ ['weapon_grenadelauncher'] = 'lançador de granada',
+ ['weapon_rpg'] = 'lançador de foguetes',
+ ['weapon_minigun'] = 'minigun',
+ ['weapon_grenade'] = 'granada',
+ ['weapon_stickybomb'] = 'bomba pegajosa',
+ ['weapon_smokegrenade'] = 'granada de fumaça',
+ ['weapon_bzgas'] = 'bz gas',
+ ['weapon_molotov'] = 'molotov',
+ ['weapon_fireextinguisher'] = 'extintor',
+ ['weapon_petrolcan'] = 'galao de combustivel',
+ ['weapon_ball'] = 'bola',
+ ['weapon_snspistol'] = 'sns pistol',
+ ['weapon_bottle'] = 'garrafa',
+ ['weapon_gusenberg'] = 'gusenberg sweeper',
+ ['weapon_specialcarbine'] = 'carabina especial',
+ ['weapon_heavypistol'] = 'heavy pistol',
+ ['weapon_bullpuprifle'] = 'bullpup rifle',
+ ['weapon_dagger'] = 'punhal',
+ ['weapon_vintagepistol'] = 'vintage pistol',
+ ['weapon_firework'] = 'fogos de artificio',
+ ['weapon_musket'] = 'mosquete',
+ ['weapon_heavyshotgun'] = 'heavy shotgun',
+ ['weapon_marksmanrifle'] = 'marksman rifle',
+ ['weapon_hominglauncher'] = 'homing launcher',
+ ['weapon_proxmine'] = 'mina de proximidade',
+ ['weapon_snowball'] = 'bola de neve',
+ ['weapon_flaregun'] = 'sinalizador',
+ ['weapon_combatpdw'] = 'combat pdw',
+ ['weapon_marksmanpistol'] = 'marksman pistol',
+ ['weapon_knuckle'] = 'soco ingles',
+ ['weapon_hatchet'] = 'machado',
+ ['weapon_railgun'] = 'railgun',
+ ['weapon_machete'] = 'facão',
+ ['weapon_machinepistol'] = 'machine pistol',
+ ['weapon_switchblade'] = 'canivete',
+ ['weapon_revolver'] = 'heavy revolver',
+ ['weapon_dbshotgun'] = 'espingarda de cano duplo',
+ ['weapon_compactrifle'] = 'compact rifle',
+ ['weapon_autoshotgun'] = 'auto shotgun',
+ ['weapon_battleaxe'] = 'battle axe',
+ ['weapon_compactlauncher'] = 'compact launcher',
+ ['weapon_minismg'] = 'mini smg',
+ ['weapon_pipebomb'] = 'bomba caseira',
+ ['weapon_poolcue'] = 'taco de sinuca',
+ ['weapon_wrench'] = 'chave de cano',
+ ['weapon_flashlight'] = 'laterna',
+ ['gadget_parachute'] = 'paraquedas',
+ ['weapon_flare'] = 'flare',
+ ['weapon_doubleaction'] = 'double-Action Revolver',
+
+ -- Weapon Components
+ ['component_clip_default'] = 'aderência padrão',
+ ['component_clip_extended'] = 'aderência prolongada',
+ ['component_clip_drum'] = 'drum Magazine',
+ ['component_clip_box'] = 'box Magazine',
+ ['component_flashlight'] = 'lanterna',
+ ['component_scope'] = 'mira',
+ ['component_scope_advanced'] = 'mira avançada',
+ ['component_suppressor'] = 'supressor',
+ ['component_grip'] = 'grip',
+ ['component_luxary_finish'] = 'acabamento de arma de luxo',
+
+ -- Weapon Ammo
+ ['ammo_rounds'] = 'round(s)',
+ ['ammo_shells'] = 'shell(s)',
+ ['ammo_charge'] = 'charge',
+ ['ammo_petrol'] = 'gallons of fuel',
+ ['ammo_firework'] = 'firework(s)',
+ ['ammo_rockets'] = 'rocket(s)',
+ ['ammo_grenadelauncher'] = 'grenade(s)',
+ ['ammo_grenade'] = 'grenade(s)',
+ ['ammo_stickybomb'] = 'bomb(s)',
+ ['ammo_pipebomb'] = 'bomb(s)',
+ ['ammo_smokebomb'] = 'bomb(s)',
+ ['ammo_molotov'] = 'cocktail(s)',
+ ['ammo_proxmine'] = 'mine(s)',
+ ['ammo_bzgas'] = 'can(s)',
+ ['ammo_ball'] = 'ball(s)',
+ ['ammo_snowball'] = 'snowball(s)',
+ ['ammo_flare'] = 'flare(s)',
+ ['ammo_flaregun'] = 'flare(s)',
+
+ -- Weapon Tints
+ ['tint_default'] = 'default skin',
+ ['tint_green'] = 'green skin',
+ ['tint_gold'] = 'gold skin',
+ ['tint_pink'] = 'pink skin',
+ ['tint_army'] = 'army skin',
+ ['tint_lspd'] = 'blue skin',
+ ['tint_orange'] = 'orange skin',
+ ['tint_platinum'] = 'platinum skin',
+}
diff --git a/[esx]/es_extended/locales/cs.lua b/[esx]/es_extended/locales/cs.lua
new file mode 100644
index 00000000..27963467
--- /dev/null
+++ b/[esx]/es_extended/locales/cs.lua
@@ -0,0 +1,225 @@
+Locales['cs'] = {
+ -- Inventory
+ ['inventory'] = 'inventář %s / %s',
+ ['use'] = 'použít',
+ ['give'] = 'dát',
+ ['remove'] = 'zahodit',
+ ['return'] = 'zpět',
+ ['give_to'] = 'dát',
+ ['amount'] = 'množství',
+ ['giveammo'] = 'dát munici',
+ ['amountammo'] = 'množství munice',
+ ['noammo'] = 'nemáte dostatek munice!',
+ ['gave_item'] = 'dali jste ~y~%sx~s~ ~b~%s~s~ ~y~%s~s~',
+ ['received_item'] = 'obdrželi jste ~y~%sx~s~ ~b~%s~s~ od ~b~%s~s~',
+ ['gave_weapon'] = 'dal jsi ~b~%s~s~ hráči ~y~%s~s~',
+ ['gave_weapon_ammo'] = 'dal jsi ~o~%sx %s~s~ za ~b~%s~s~ to ~y~%s~s~',
+ ['gave_weapon_withammo'] = 'dal jwi ~b~%s~s~ s ~o~%sx %s~s~ to ~y~%s~s~',
+ ['gave_weapon_hasalready'] = '~y~%s~s~ již má ~y~%s~s~',
+ ['gave_weapon_noweapon'] = '~y~%s~s~ nemá tuhle zbraň',
+ ['received_weapon'] = 'obdrzel jsi ~b~%s~s~ od ~b~%s~s~',
+ ['received_weapon_ammo'] = 'obdrzel jsi ~o~%sx %s~s~ za tvůj ~b~%s~s~ od ~b~%s~s~',
+ ['received_weapon_withammo'] = 'obdzel jsi ~b~%s~s~ s ~o~%sx %s~s~ od ~b~%s~s~',
+ ['received_weapon_hasalready'] = '~b~%s~s~ se pokusil ti dat ~y~%s~s~, ale jiz tento predmet jednou mas',
+ ['received_weapon_noweapon'] = '~b~%s~s~ se pokusil ti dat naboje pro ~y~%s~s~, ale tuhle zbran nemas',
+ ['gave_account_money'] = 'dali jste ~g~$%s~s~ (%s) ~y~%s~s~',
+ ['received_account_money'] = 'obdrželi jste ~g~$%s~s~ (%s) od ~b~%s~s~',
+ ['amount_invalid'] = 'neplatné množství',
+ ['players_nearby'] = 'žádní hráči poblíž',
+ ['ex_inv_lim'] = 'akce není možná, překročen limit inventáře pro ~y~%s~s~',
+ ['imp_invalid_quantity'] = 'akce není možná, neplatný počet',
+ ['imp_invalid_amount'] = 'akce není možná, neplatné množství',
+ ['threw_standard'] = 'vyhodil jsi ~y~%sx~s~ ~b~%s~s~',
+ ['threw_account'] = 'vyhodil jsi ~g~$%s~s~ ~b~%s~s~',
+ ['threw_weapon'] = 'vzhodil jsi ~b~%s~s~',
+ ['threw_weapon_ammo'] = 'vyhodil jsi ~b~%s~s~ s ~o~%sx %s~s~',
+ ['threw_weapon_already'] = 'jiz stejnou zbraan mas',
+ ['threw_cannot_pickup'] = 'tohle nemuzes sebrat, protoze tvuj inventar je plny',
+ ['threw_pickup_prompt'] = 'stiskni ~y~E~s~ po zvednuti',
+
+ -- Key mapping
+ ['keymap_showinventory'] = 'zobrazit inventar',
+
+ -- Salary related
+ ['received_salary'] = 'obdrželi jste výplatu: ~g~$%s~s~',
+ ['received_help'] = 'obdrželi jste sociální dávku: ~g~$%s~s~',
+ ['company_nomoney'] = 'společnost u které jste zaměstananí nemá peníze na váš plat',
+ ['received_paycheck'] = 'obdržena výplata',
+ ['bank'] = 'bankovní účet',
+ ['account_bank'] = 'banka',
+ ['account_black_money'] = 'spinave penize',
+ ['account_money'] = 'kapesne',
+
+ ['act_imp'] = 'akce není možná',
+ ['in_vehicle'] = 'nemůže nic dát osobě ve vozidle',
+
+ -- Commands
+ ['command_car'] = 'spawn an vehicle',
+ ['command_car_car'] = 'vehicle spawn name or hash',
+ ['command_cardel'] = 'delete vehicle in proximity',
+ ['command_cardel_radius'] = 'optional, delete every vehicle within the specified radius',
+ ['command_clear'] = 'clear chat',
+ ['command_clearall'] = 'clear chat for all players',
+ ['command_clearinventory'] = 'clear player inventory',
+ ['command_clearloadout'] = 'clear a player loadout',
+ ['command_giveaccountmoney'] = 'give account money',
+ ['command_giveaccountmoney_account'] = 'valid account name',
+ ['command_giveaccountmoney_amount'] = 'amount to add',
+ ['command_giveaccountmoney_invalid'] = 'invalid account name',
+ ['command_giveitem'] = 'give an item to a player',
+ ['command_giveitem_item'] = 'item name',
+ ['command_giveitem_count'] = 'item count',
+ ['command_giveweapon'] = 'give a weapon to a player',
+ ['command_giveweapon_weapon'] = 'weapon name',
+ ['command_giveweapon_ammo'] = 'ammo count',
+ ['command_giveweapon_hasalready'] = 'player already has that weapon',
+ ['command_giveweaponcomponent'] = 'give weapon component',
+ ['command_giveweaponcomponent_component'] = 'component name',
+ ['command_giveweaponcomponent_invalid'] = 'invalid weapon component',
+ ['command_giveweaponcomponent_hasalready'] = 'player already has that weapon component',
+ ['command_giveweaponcomponent_missingweapon'] = 'player does not have that weapon',
+ ['command_save'] = 'save a player to database',
+ ['command_saveall'] = 'save all players to database',
+ ['command_setaccountmoney'] = 'set account money for a player',
+ ['command_setaccountmoney_amount'] = 'amount of money to set',
+ ['command_setcoords'] = 'teleport to coordinates',
+ ['command_setcoords_x'] = 'x axis',
+ ['command_setcoords_y'] = 'y axis',
+ ['command_setcoords_z'] = 'z axis',
+ ['command_setjob'] = 'set job for a player',
+ ['command_setjob_job'] = 'job name',
+ ['command_setjob_grade'] = 'job grade',
+ ['command_setjob_invalid'] = 'the job, grade or both are invalid',
+ ['command_setgroup'] = 'set player group',
+ ['command_setgroup_group'] = 'group name',
+ ['commanderror_argumentmismatch'] = 'argument count mismatch (passed %s, wanted %s)',
+ ['commanderror_argumentmismatch_number'] = 'argument #%s type mismatch (passed string, wanted number)',
+ ['commanderror_invaliditem'] = 'invalid item name',
+ ['commanderror_invalidweapon'] = 'invalid weapon',
+ ['commanderror_console'] = 'that command can not be run from console',
+ ['commanderror_invalidcommand'] = '^3%s^0 is not an valid command!',
+ ['commanderror_invalidplayerid'] = 'there is no player online matching that server id',
+ ['commandgeneric_playerid'] = 'player id',
+
+ -- Locale settings
+ ['locale_digit_grouping_symbol'] = ' ',
+ ['locale_currency'] = '$%s',
+
+ -- Weapons
+ ['weapon_knife'] = 'nuz',
+ ['weapon_nightstick'] = 'policejni obusek',
+ ['weapon_hammer'] = 'kladivo',
+ ['weapon_bat'] = 'basseballka',
+ ['weapon_golfclub'] = 'gollfova hul',
+ ['weapon_crowbar'] = 'pacidlo',
+ ['weapon_pistol'] = 'pistole',
+ ['weapon_combatpistol'] = 'utocna pistole',
+ ['weapon_appistol'] = 'ap pistole',
+ ['weapon_pistol50'] = 'pistole .50',
+ ['weapon_microsmg'] = 'micro smg',
+ ['weapon_smg'] = 'smg',
+ ['weapon_assaultsmg'] = 'utocne smg',
+ ['weapon_assaultrifle'] = 'utocna puska',
+ ['weapon_carbinerifle'] = 'carbine puska',
+ ['weapon_advancedrifle'] = 'pokrocily puska',
+ ['weapon_mg'] = 'mg',
+ ['weapon_combatmg'] = 'utocne mg',
+ ['weapon_pumpshotgun'] = 'pumpovana brokovnice',
+ ['weapon_sawnoffshotgun'] = 'upilovana brokovnice',
+ ['weapon_assaultshotgun'] = 'utocna brokovnice',
+ ['weapon_bullpupshotgun'] = 'bullpup brokovnice',
+ ['weapon_stungun'] = 'tazer',
+ ['weapon_sniperrifle'] = 'sniperka',
+ ['weapon_heavysniper'] = 'tezka sniperka',
+ ['weapon_grenadelauncher'] = 'launcher granatu',
+ ['weapon_rpg'] = 'raketomet',
+ ['weapon_minigun'] = 'minigun',
+ ['weapon_grenade'] = 'granat',
+ ['weapon_stickybomb'] = 'lepkava bomba',
+ ['weapon_smokegrenade'] = 'kourovy granat',
+ ['weapon_bzgas'] = 'bz gas',
+ ['weapon_molotov'] = 'molotov koktejl',
+ ['weapon_fireextinguisher'] = 'hasicak',
+ ['weapon_petrolcan'] = 'kanystr',
+ ['weapon_ball'] = 'koule',
+ ['weapon_snspistol'] = 'sns pistole',
+ ['weapon_bottle'] = 'lahev',
+ ['weapon_gusenberg'] = 'gusenberguv zametac',
+ ['weapon_specialcarbine'] = 'specialni karabina',
+ ['weapon_heavypistol'] = 'tezka pistole',
+ ['weapon_bullpuprifle'] = 'bullpup puska',
+ ['weapon_dagger'] = 'dyka',
+ ['weapon_vintagepistol'] = 'velmi stara pistole',
+ ['weapon_firework'] = 'ohnostroj',
+ ['weapon_musket'] = 'musketa',
+ ['weapon_heavyshotgun'] = 'tezka brokovnice',
+ ['weapon_marksmanrifle'] = 'puska strelce',
+ ['weapon_hominglauncher'] = 'navadeci launcher',
+ ['weapon_proxmine'] = 'mina na blizko',
+ ['weapon_snowball'] = 'snehova koule',
+ ['weapon_flaregun'] = 'svetlice',
+ ['weapon_combatpdw'] = 'utocne pdw',
+ ['weapon_marksmanpistol'] = 'pistole strelce',
+ ['weapon_knuckle'] = 'knuckledusters',
+ ['weapon_hatchet'] = 'sekerka',
+ ['weapon_railgun'] = 'vlakovy launcher',
+ ['weapon_machete'] = 'maceta',
+ ['weapon_machinepistol'] = 'kulomet',
+ ['weapon_switchblade'] = 'vystrelovaci nuz',
+ ['weapon_revolver'] = 'tezky revolver',
+ ['weapon_dbshotgun'] = 'dvouhlavnova brokovnice',
+ ['weapon_compactrifle'] = 'kompaktni puska',
+ ['weapon_autoshotgun'] = 'automaticka brokovnice',
+ ['weapon_battleaxe'] = 'bojova sekera',
+ ['weapon_compactlauncher'] = 'kompaktni launcher',
+ ['weapon_minismg'] = 'mini smg',
+ ['weapon_pipebomb'] = 'dymkova bomba',
+ ['weapon_poolcue'] = 'kulecnikove tago',
+ ['weapon_wrench'] = 'klic na trubky',
+ ['weapon_flashlight'] = 'baterka',
+ ['gadget_parachute'] = 'padak',
+ ['weapon_flare'] = 'svetlice',
+ ['weapon_doubleaction'] = 'dvojhlavnovy revolver',
+
+ -- Weapon Components
+ ['component_clip_default'] = 'zakladni rukojet',
+ ['component_clip_extended'] = 'prodloucena rukojet',
+ ['component_clip_drum'] = 'drum Magazine',
+ ['component_clip_box'] = 'krabice s naboji',
+ ['component_flashlight'] = 'baterka',
+ ['component_scope'] = 'zamerovac',
+ ['component_scope_advanced'] = 'pokrocily zamerovac',
+ ['component_suppressor'] = 'tlumic',
+ ['component_grip'] = 'rukojet',
+ ['component_luxary_finish'] = 'luxusni vzhled zbrane',
+
+ -- Weapon Ammo
+ ['ammo_rounds'] = 'naboj(e)',
+ ['ammo_shells'] = 'patrona(y)',
+ ['ammo_charge'] = 'naboj(e)',
+ ['ammo_petrol'] = 'galonu paliva',
+ ['ammo_firework'] = 'ohnostroj(e)',
+ ['ammo_rockets'] = 'raketa(y)',
+ ['ammo_grenadelauncher'] = 'granat(y)',
+ ['ammo_grenade'] = 'granat(y)',
+ ['ammo_stickybomb'] = 'bomba(y)',
+ ['ammo_pipebomb'] = 'bomba(y)',
+ ['ammo_smokebomb'] = 'bomba(y)',
+ ['ammo_molotov'] = 'koktejl(y)',
+ ['ammo_proxmine'] = 'mina(y)',
+ ['ammo_bzgas'] = 'kanystr(y)',
+ ['ammo_ball'] = 'koule',
+ ['ammo_snowball'] = 'snehova(e) koule',
+ ['ammo_flare'] = 'svetlice',
+ ['ammo_flaregun'] = 'svetlice',
+
+ -- Weapon Tints
+ ['tint_default'] = 'zakladni skin',
+ ['tint_green'] = 'zeleny skin',
+ ['tint_gold'] = 'zlaty skin',
+ ['tint_pink'] = 'ruzovy skin',
+ ['tint_army'] = 'armadni skin',
+ ['tint_lspd'] = 'modry skin',
+ ['tint_orange'] = 'oranzovy skin',
+ ['tint_platinum'] = 'platinovy skin',
+}
diff --git a/[esx]/es_extended/locales/de.lua b/[esx]/es_extended/locales/de.lua
new file mode 100644
index 00000000..30ae1a18
--- /dev/null
+++ b/[esx]/es_extended/locales/de.lua
@@ -0,0 +1,225 @@
+Locales['de'] = {
+ -- Inventory
+ ['inventory'] = 'inventar %s / %s',
+ ['use'] = 'benutzen',
+ ['give'] = 'geben',
+ ['remove'] = 'entfernen',
+ ['return'] = 'zurück',
+ ['give_to'] = 'geben an',
+ ['amount'] = 'betrag',
+ ['giveammo'] = 'munition geben',
+ ['amountammo'] = 'anzahl der munition',
+ ['noammo'] = 'du hast keine munition!',
+ ['gave_item'] = 'du gibst ~y~%sx~s~ ~b~%s~s~ an ~y~%s~s~',
+ ['received_item'] = 'du empfängst ~y~%sx~s~ ~b~%s~s~ von ~b~%s~s~',
+ ['gave_weapon'] = 'du gibst ~b~%s~s~ an ~y~%s~s~',
+ ['gave_weapon_ammo'] = 'du gibst ~o~%sx %s~s~ von ~b~%s~s~ an ~y~%s~s~',
+ ['gave_weapon_withammo'] = 'du gibst ~b~%s~s~ mit ~o~%sx %s~s~ an ~y~%s~s~',
+ ['gave_weapon_hasalready'] = '~y~%s~s~ hat bereits eine(n) ~y~%s~s~',
+ ['gave_weapon_noweapon'] = '~y~%s~s~ hat diese Waffe nicht',
+ ['received_weapon'] = 'du erhälst ~b~%s~s~ von ~b~%s~s~',
+ ['received_weapon_ammo'] = 'du erhälst ~o~%sx %s~s~ für dein ~b~%s~s~ von ~b~%s~s~',
+ ['received_weapon_withammo'] = 'du erhälst ~b~%s~s~ mit ~o~%sx %s~s~ von ~b~%s~s~',
+ ['received_weapon_hasalready'] = '~b~%s~s~ hat versucht dir eine(n) ~y~%s~s~ zu geben, aber du hast bereits eine(n)',
+ ['received_weapon_noweapon'] = '~b~%s~s~ ahat versucht dir Munition für eine(n) ~y~%s~s~, aber du besitzt diese Waffe nicht',
+ ['gave_account_money'] = 'du gibst ~g~$%s~s~ (%s) an ~y~%s~s~',
+ ['received_account_money'] = 'du empfängst ~g~$%s~s~ (%s) von ~b~%s~s~',
+ ['amount_invalid'] = 'ungültiger Betrag',
+ ['players_nearby'] = 'keine Spieler in der Nähe',
+ ['ex_inv_lim'] = 'aktion nicht möglich, Inventarlimit überschritten für ~y~%s~s~',
+ ['imp_invalid_quantity'] = 'aktion nicht möglich, ungültige Anzahl',
+ ['imp_invalid_amount'] = 'aktion nicht möglich, ungültiger Betrag',
+ ['threw_standard'] = 'you threw ~y~%sx~s~ ~b~%s~s~',
+ ['threw_account'] = 'du wirfst ~g~$%s~s~ ~b~%s~s~ weg',
+ ['threw_weapon'] = 'du wirfst ~b~%s~s~ weg',
+ ['threw_weapon_ammo'] = 'du wirfst ~b~%s~s~ mit ~o~%sx %s~s~ weg',
+ ['threw_weapon_already'] = 'Du hast bereits diese Waffe',
+ ['threw_cannot_pickup'] = 'Du kannst das nicht aufheben, da dein Inventar voll ist',
+ ['threw_pickup_prompt'] = 'drücke ~y~E~s~ um aufzuheben',
+
+ -- Key mapping
+ ['keymap_showinventory'] = 'inventar anzeigen',
+
+ -- Salary related
+ ['received_salary'] = 'du hast dein Gehalt erhalten: ~g~$%s~s~',
+ ['received_help'] = 'du hast deine Sozialhilfe erhalten: ~g~$%s~s~',
+ ['company_nomoney'] = 'die Firma in der du angestellt bist, ist zu arm um dein Gehalt zu zahlen',
+ ['received_paycheck'] = 'erhaltener Gehaltsscheck',
+ ['bank'] = 'bank',
+ ['account_bank'] = 'bank',
+ ['account_black_money'] = 'dirty Money',
+ ['account_money'] = 'cash',
+
+ ['act_imp'] = 'Aktion nicht möglich',
+ ['in_vehicle'] = 'du kannst keine Items in einem Fahrzeug weitergeben',
+
+ -- Commands
+ ['command_car'] = 'spawn an vehicle',
+ ['command_car_car'] = 'vehicle spawn name or hash',
+ ['command_cardel'] = 'delete vehicle in proximity',
+ ['command_cardel_radius'] = 'optional, delete every vehicle within the specified radius',
+ ['command_clear'] = 'clear chat',
+ ['command_clearall'] = 'clear chat for all players',
+ ['command_clearinventory'] = 'clear player inventory',
+ ['command_clearloadout'] = 'clear a player loadout',
+ ['command_giveaccountmoney'] = 'give account money',
+ ['command_giveaccountmoney_account'] = 'valid account name',
+ ['command_giveaccountmoney_amount'] = 'amount to add',
+ ['command_giveaccountmoney_invalid'] = 'invalid account name',
+ ['command_giveitem'] = 'give an item to a player',
+ ['command_giveitem_item'] = 'item name',
+ ['command_giveitem_count'] = 'item count',
+ ['command_giveweapon'] = 'give a weapon to a player',
+ ['command_giveweapon_weapon'] = 'weapon name',
+ ['command_giveweapon_ammo'] = 'ammo count',
+ ['command_giveweapon_hasalready'] = 'player already has that weapon',
+ ['command_giveweaponcomponent'] = 'give weapon component',
+ ['command_giveweaponcomponent_component'] = 'component name',
+ ['command_giveweaponcomponent_invalid'] = 'invalid weapon component',
+ ['command_giveweaponcomponent_hasalready'] = 'player already has that weapon component',
+ ['command_giveweaponcomponent_missingweapon'] = 'player does not have that weapon',
+ ['command_save'] = 'save a player to database',
+ ['command_saveall'] = 'save all players to database',
+ ['command_setaccountmoney'] = 'set account money for a player',
+ ['command_setaccountmoney_amount'] = 'amount of money to set',
+ ['command_setcoords'] = 'teleport to coordinates',
+ ['command_setcoords_x'] = 'x axis',
+ ['command_setcoords_y'] = 'y axis',
+ ['command_setcoords_z'] = 'z axis',
+ ['command_setjob'] = 'set job for a player',
+ ['command_setjob_job'] = 'job name',
+ ['command_setjob_grade'] = 'job grade',
+ ['command_setjob_invalid'] = 'the job, grade or both are invalid',
+ ['command_setgroup'] = 'set player group',
+ ['command_setgroup_group'] = 'group name',
+ ['commanderror_argumentmismatch'] = 'argument count mismatch (passed %s, wanted %s)',
+ ['commanderror_argumentmismatch_number'] = 'argument #%s type mismatch (passed string, wanted number)',
+ ['commanderror_invaliditem'] = 'invalid item name',
+ ['commanderror_invalidweapon'] = 'invalid weapon',
+ ['commanderror_console'] = 'that command can not be run from console',
+ ['commanderror_invalidcommand'] = '^3%s^0 is not an valid command!',
+ ['commanderror_invalidplayerid'] = 'there is no player online matching that server id',
+ ['commandgeneric_playerid'] = 'player id',
+
+ -- Locale settings
+ ['locale_digit_grouping_symbol'] = ' ',
+ ['locale_currency'] = '$%s',
+
+ -- Weapons
+ ['weapon_knife'] = 'Messer',
+ ['weapon_nightstick'] = 'Schlagstock',
+ ['weapon_hammer'] = 'Hammer',
+ ['weapon_bat'] = 'Schläger',
+ ['weapon_golfclub'] = 'Golfschläger',
+ ['weapon_crowbar'] = 'Brecheisen',
+ ['weapon_pistol'] = 'Pistole',
+ ['weapon_combatpistol'] = 'Kampfpistole',
+ ['weapon_appistol'] = 'AP Pistole',
+ ['weapon_pistol50'] = 'Pistole .50',
+ ['weapon_microsmg'] = 'Mikro SMG',
+ ['weapon_smg'] = 'SMG',
+ ['weapon_assaultsmg'] = 'Kampf SMG',
+ ['weapon_assaultrifle'] = 'Kampfgewehr',
+ ['weapon_carbinerifle'] = 'Karabinergewehr',
+ ['weapon_advancedrifle'] = 'Advancedgewehr',
+ ['weapon_mg'] = 'MG',
+ ['weapon_combatmg'] = 'Kampf MG',
+ ['weapon_pumpshotgun'] = 'Pumpgun',
+ ['weapon_sawnoffshotgun'] = 'Abgesägte Schrotflinte',
+ ['weapon_assaultshotgun'] = 'Kampf Schrotflinte',
+ ['weapon_bullpupshotgun'] = 'Bullpup Schrotflinte',
+ ['weapon_stungun'] = 'Tazer',
+ ['weapon_sniperrifle'] = 'Scharfschützengewehr',
+ ['weapon_heavysniper'] = 'Schweres Sniper',
+ ['weapon_grenadelauncher'] = 'Granatwerfer',
+ ['weapon_rpg'] = 'RPG',
+ ['weapon_minigun'] = 'Minigun',
+ ['weapon_grenade'] = 'Granate',
+ ['weapon_stickybomb'] = 'Haftbombe',
+ ['weapon_smokegrenade'] = 'Rauchgranate',
+ ['weapon_bzgas'] = 'BZ Gas',
+ ['weapon_molotov'] = 'Molotov Cocktail',
+ ['weapon_fireextinguisher'] = 'Feuerlöscher',
+ ['weapon_petrolcan'] = 'Benzinkanister',
+ ['weapon_ball'] = 'Ball',
+ ['weapon_snspistol'] = 'SNS Pistole',
+ ['weapon_bottle'] = 'Flasche',
+ ['weapon_gusenberg'] = 'Gusenberg',
+ ['weapon_specialcarbine'] = 'Spezialkarabiner',
+ ['weapon_heavypistol'] = 'Schwere Pistole',
+ ['weapon_bullpuprifle'] = 'Bullpupgewehr',
+ ['weapon_dagger'] = 'Dolch',
+ ['weapon_vintagepistol'] = 'Vintage Pistole',
+ ['weapon_firework'] = 'Feuerwerk',
+ ['weapon_musket'] = 'Muskete',
+ ['weapon_heavyshotgun'] = 'Schwere Schrotflinte',
+ ['weapon_marksmanrifle'] = 'Marksmangewehr',
+ ['weapon_hominglauncher'] = 'Homing Launcher',
+ ['weapon_proxmine'] = 'Annäherungsmine',
+ ['weapon_snowball'] = 'Schneeball',
+ ['weapon_flaregun'] = 'Leuchtpistole',
+ ['weapon_combatpdw'] = 'Kampf PDW',
+ ['weapon_marksmanpistol'] = 'Marksman Pistole',
+ ['weapon_knuckle'] = 'Schlagring',
+ ['weapon_hatchet'] = 'Axt',
+ ['weapon_railgun'] = 'Railgun',
+ ['weapon_machete'] = 'Machete',
+ ['weapon_machinepistol'] = 'Maschinenpistole',
+ ['weapon_switchblade'] = 'Klappmesser',
+ ['weapon_revolver'] = 'Schwerer Revolver',
+ ['weapon_dbshotgun'] = 'Doppelläufige Schrotflinte',
+ ['weapon_compactrifle'] = 'Kampfgewehr',
+ ['weapon_autoshotgun'] = 'Auto Schrotflinte',
+ ['weapon_battleaxe'] = 'Kampfaxt',
+ ['weapon_compactlauncher'] = 'Kompakt Granatwerfer',
+ ['weapon_minismg'] = 'Mini SMG',
+ ['weapon_pipebomb'] = 'Rohrbombe',
+ ['weapon_poolcue'] = 'Billiard-Kö',
+ ['weapon_wrench'] = 'Rohrzange',
+ ['weapon_flashlight'] = 'Taschenlampe',
+ ['gadget_parachute'] = 'Fallschirm',
+ ['weapon_flare'] = 'Leuchtpistole',
+ ['weapon_doubleaction'] = 'double-Action Revolver',
+
+ -- Weapon Components
+ ['component_clip_default'] = 'standart Griff',
+ ['component_clip_extended'] = 'erweiterter Griff',
+ ['component_clip_drum'] = 'trommelmagazin',
+ ['component_clip_box'] = 'kastenmagazin',
+ ['component_flashlight'] = 'taschenlampe',
+ ['component_scope'] = 'zielfernrohr',
+ ['component_scope_advanced'] = 'erweitertes Zielfernrohr',
+ ['component_suppressor'] = 'schalldämpfer',
+ ['component_grip'] = 'griff',
+ ['component_luxary_finish'] = 'luxus Waffen Design',
+
+ -- Weapon Ammo
+ ['ammo_rounds'] = 'kugel(n)',
+ ['ammo_shells'] = 'schrotpatrone(n)',
+ ['ammo_charge'] = 'ladung',
+ ['ammo_petrol'] = 'liter Benzin',
+ ['ammo_firework'] = 'feuerwerksrakete(n)',
+ ['ammo_rockets'] = 'rakete(n)',
+ ['ammo_grenadelauncher'] = 'granate(n)',
+ ['ammo_grenade'] = 'granate(n)',
+ ['ammo_stickybomb'] = 'bombe(n)',
+ ['ammo_pipebomb'] = 'bombe(n)',
+ ['ammo_smokebomb'] = 'bombe(n)',
+ ['ammo_molotov'] = 'cocktail(s)',
+ ['ammo_proxmine'] = 'mine(n)',
+ ['ammo_bzgas'] = 'can(n)',
+ ['ammo_ball'] = 'ball',
+ ['ammo_snowball'] = 'schneebälle',
+ ['ammo_flare'] = 'signalfackel(n)',
+ ['ammo_flaregun'] = 'signalfackeln(munition)',
+
+ -- Weapon Tints
+ ['tint_default'] = 'standard',
+ ['tint_green'] = 'grün',
+ ['tint_gold'] = 'gold',
+ ['tint_pink'] = 'pink',
+ ['tint_army'] = 'camouflage',
+ ['tint_lspd'] = 'blau',
+ ['tint_orange'] = 'orange',
+ ['tint_platinum'] = 'platin',
+}
diff --git a/[esx]/es_extended/locales/en.lua b/[esx]/es_extended/locales/en.lua
new file mode 100644
index 00000000..dd086601
--- /dev/null
+++ b/[esx]/es_extended/locales/en.lua
@@ -0,0 +1,346 @@
+Locales['en'] = {
+ -- Inventory
+ ['inventory'] = 'inventory %s / %s',
+ ['use'] = 'use',
+ ['give'] = 'give',
+ ['remove'] = 'throw',
+ ['return'] = 'return',
+ ['give_to'] = 'give to',
+ ['amount'] = 'amount',
+ ['giveammo'] = 'give ammo',
+ ['amountammo'] = 'amount of ammo',
+ ['noammo'] = 'you do not have enough ammo!',
+ ['gave_item'] = 'you gave ~y~%sx~s~ ~b~%s~s~ to ~y~%s~s~',
+ ['received_item'] = 'you received ~y~%sx~s~ ~b~%s~s~ from ~b~%s~s~',
+ ['gave_weapon'] = 'you gave ~b~%s~s~ to ~y~%s~s~',
+ ['gave_weapon_ammo'] = 'you gave ~o~%sx %s~s~ for ~b~%s~s~ to ~y~%s~s~',
+ ['gave_weapon_withammo'] = 'you gave ~b~%s~s~ with ~o~%sx %s~s~ to ~y~%s~s~',
+ ['gave_weapon_hasalready'] = '~y~%s~s~ already has a ~y~%s~s~',
+ ['gave_weapon_noweapon'] = '~y~%s~s~ does not have that weapon',
+ ['received_weapon'] = 'you received ~b~%s~s~ from ~b~%s~s~',
+ ['received_weapon_ammo'] = 'you received ~o~%sx %s~s~ for your ~b~%s~s~ from ~b~%s~s~',
+ ['received_weapon_withammo'] = 'you received ~b~%s~s~ with ~o~%sx %s~s~ from ~b~%s~s~',
+ ['received_weapon_hasalready'] = '~b~%s~s~ attempted to give you a ~y~%s~s~, but you already have one',
+ ['received_weapon_noweapon'] = '~b~%s~s~ attempted to give you ammo for a ~y~%s~s~, but you dont have one',
+ ['gave_account_money'] = 'you gave ~g~$%s~s~ (%s) to ~y~%s~s~',
+ ['received_account_money'] = 'you received ~g~$%s~s~ (%s) from ~b~%s~s~',
+ ['amount_invalid'] = 'invalid amount',
+ ['players_nearby'] = 'no players nearby',
+ ['ex_inv_lim'] = 'action not possible, exceeding inventory limit for ~y~%s~s~',
+ ['imp_invalid_quantity'] = 'action impossible, invalid quantity',
+ ['imp_invalid_amount'] = 'action impossible, invalid amount',
+ ['threw_standard'] = 'you threw ~y~%sx~s~ ~b~%s~s~',
+ ['threw_account'] = 'you threw ~g~$%s~s~ ~b~%s~s~',
+ ['threw_weapon'] = 'you threw ~b~%s~s~',
+ ['threw_weapon_ammo'] = 'you threw ~b~%s~s~ with ~o~%sx %s~s~',
+ ['threw_weapon_already'] = 'you already carry the same weapon',
+ ['threw_cannot_pickup'] = 'you cannot pickup that because your inventory is full!',
+ ['threw_pickup_prompt'] = 'press ~y~E~s~ to pickup',
+
+ -- Key mapping
+ ['keymap_showinventory'] = 'show Inventory',
+
+ -- Salary related
+ ['received_salary'] = 'you received your salary: ~g~$%s~s~',
+ ['received_help'] = 'you received your welfare check: ~g~$%s~s~',
+ ['company_nomoney'] = 'the company you\'re employeed at is too poor to pay out your salary',
+ ['received_paycheck'] = 'received paycheck',
+ ['bank'] = 'maze Bank',
+ ['account_bank'] = 'bank',
+ ['account_black_money'] = 'dirty Money',
+ ['account_money'] = 'cash',
+
+ ['act_imp'] = 'action impossible',
+ ['in_vehicle'] = 'you cannot give anything to someone in a vehicle',
+
+ -- Commands
+ ['command_car'] = 'spawn a vehicle',
+ ['command_car_car'] = 'vehicle spawn name or hash',
+ ['command_cardel'] = 'delete vehicle in proximity',
+ ['command_cardel_radius'] = 'optional, delete every vehicle within the specified radius',
+ ['command_clear'] = 'clear chat',
+ ['command_clearall'] = 'clear chat for all players',
+ ['command_clearinventory'] = 'clear player inventory',
+ ['command_clearloadout'] = 'clear a player loadout',
+ ['command_giveaccountmoney'] = 'give account money',
+ ['command_giveaccountmoney_account'] = 'valid account name',
+ ['command_giveaccountmoney_amount'] = 'amount to add',
+ ['command_giveaccountmoney_invalid'] = 'invalid account name',
+ ['command_giveitem'] = 'give an item to a player',
+ ['command_giveitem_item'] = 'item name',
+ ['command_giveitem_count'] = 'item count',
+ ['command_giveweapon'] = 'give a weapon to a player',
+ ['command_giveweapon_weapon'] = 'weapon name',
+ ['command_giveweapon_ammo'] = 'ammo count',
+ ['command_giveweapon_hasalready'] = 'player already has that weapon',
+ ['command_giveweaponcomponent'] = 'give weapon component',
+ ['command_giveweaponcomponent_component'] = 'component name',
+ ['command_giveweaponcomponent_invalid'] = 'invalid weapon component',
+ ['command_giveweaponcomponent_hasalready'] = 'player already has that weapon component',
+ ['command_giveweaponcomponent_missingweapon'] = 'player does not have that weapon',
+ ['command_save'] = 'save a player to database',
+ ['command_saveall'] = 'save all players to database',
+ ['command_setaccountmoney'] = 'set account money for a player',
+ ['command_setaccountmoney_amount'] = 'amount of money to set',
+ ['command_setcoords'] = 'teleport to coordinates',
+ ['command_setcoords_x'] = 'x axis',
+ ['command_setcoords_y'] = 'y axis',
+ ['command_setcoords_z'] = 'z axis',
+ ['command_setjob'] = 'set job for a player',
+ ['command_setjob_job'] = 'job name',
+ ['command_setjob_grade'] = 'job grade',
+ ['command_setjob_invalid'] = 'the job, grade or both are invalid',
+ ['command_setgroup'] = 'set player group',
+ ['command_setgroup_group'] = 'group name',
+ ['commanderror_argumentmismatch'] = 'argument count mismatch (passed %s, wanted %s)',
+ ['commanderror_argumentmismatch_number'] = 'argument #%s type mismatch (passed string, wanted number)',
+ ['commanderror_invaliditem'] = 'invalid item name',
+ ['commanderror_invalidweapon'] = 'invalid weapon',
+ ['commanderror_console'] = 'that command cannot be run from console',
+ ['commanderror_invalidcommand'] = '^3%s^0 is not a valid command!',
+ ['commanderror_invalidplayerid'] = 'there is no player online matching that server id',
+ ['commandgeneric_playerid'] = 'player id',
+
+ -- Locale settings
+ ['locale_digit_grouping_symbol'] = ',',
+ ['locale_currency'] = '$%s',
+
+ -- Weapons
+
+ -- Melee
+ ['weapon_dagger'] = 'Dagger',
+ ['weapon_bat'] = 'Bat',
+ ['weapon_battleaxe'] = 'Battle Axe',
+ ['weapon_bottle'] = 'Bottle',
+ ['weapon_crowbar'] = 'Crowbar',
+ ['weapon_flashlight'] = 'Flashlight',
+ ['weapon_golfclub'] = 'Golf Club',
+ ['weapon_hammer'] = 'Hammer',
+ ['weapon_hatchet'] = 'Hatchet',
+ ['weapon_knife'] = 'Knife',
+ ['weapon_knuckle'] = 'Knuckledusters',
+ ['weapon_machete'] = 'Machete',
+ ['weapon_nightstick'] = 'Nightstick',
+ ['weapon_wrench'] = 'Pipe Wrench',
+ ['weapon_poolcue'] = 'Pool Cue',
+ ['weapon_stone_hatchet'] = 'Stone Hatchet',
+ ['weapon_switchblade'] = 'Switchblade',
+
+ -- Handguns
+ ['weapon_appistol'] = 'AP Pistol',
+ ['weapon_ceramicpistol'] = 'Ceramic Pistol',
+ ['weapon_combatpistol'] = 'Combat Pistol',
+ ['weapon_doubleaction'] = 'Double-Action Revolver',
+ ['weapon_navyrevolver'] = 'Navy Revolver',
+ ['weapon_flaregun'] = 'Flaregun',
+ ['weapon_gadgetpistol'] = 'Gadget Pistol',
+ ['weapon_heavypistol'] = 'Heavy Pistol',
+ ['weapon_revolver'] = 'Heavy Revolver',
+ ['weapon_revolver_mk2'] = 'Heavy Revolver MK2',
+ ['weapon_marksmanpistol'] = 'Marksman Pistol',
+ ['weapon_pistol'] = 'Pistol',
+ ['weapon_pistol_mk2'] = 'Pistol MK2',
+ ['weapon_pistol50'] = 'Pistol .50',
+ ['weapon_snspistol'] = 'SNS Pistol',
+ ['weapon_snspistol_mk2'] = 'SNS Pistol MK2',
+ ['weapon_stungun'] = 'Taser',
+ ['weapon_raypistol'] = 'Up-N-Atomizer',
+ ['weapon_vintagepistol'] = 'Vintage Pistol',
+
+ -- Shotguns
+ ['weapon_assaultshotgun'] = 'Assault Shotgun',
+ ['weapon_autoshotgun'] = 'Auto Shotgun',
+ ['weapon_bullpupshotgun'] = 'Bullpup Shotgun',
+ ['weapon_combatshotgun'] = 'Combat Shotgun',
+ ['weapon_dbshotgun'] = 'Double Barrel Shotgun',
+ ['weapon_heavyshotgun'] = 'Heavy Shotgun',
+ ['weapon_musket'] = 'Musket',
+ ['weapon_pumpshotgun'] = 'Pump Shotgun',
+ ['weapon_pumpshotgun_mk2'] = 'Pump Shotgun MK2',
+ ['weapon_sawnoffshotgun'] = 'Sawed Off Shotgun',
+
+ -- SMG & LMG
+ ['weapon_assaultsmg'] = 'Assault SMG',
+ ['weapon_combatmg'] = 'Combat MG',
+ ['weapon_combatmg'] = 'Combat MG MK2',
+ ['weapon_combatpdw'] = 'Combat PDW',
+ ['weapon_gusenberg'] = 'Gusenberg Sweeper',
+ ['weapon_machinepistol'] = 'Machine Pistol',
+ ['weapon_mg'] = 'MG',
+ ['weapon_microsmg'] = 'Micro SMG',
+ ['weapon_minismg'] = 'Mini SMG',
+ ['weapon_smg'] = 'SMG',
+ ['weapon_smg_mk2'] = 'SMG MK2',
+ ['weapon_raycarbine'] = 'Unholy Hellbringer',
+
+ -- Rifles
+ ['weapon_advancedrifle'] = 'Advanced Rifle',
+ ['weapon_assaultrifle'] = 'Assault Rifle',
+ ['weapon_assaultrifle_mk2'] = 'Assault Rifle MK2',
+ ['weapon_bullpuprifle'] = 'Bullpup Rifle',
+ ['weapon_bullpuprifle_mk2'] = 'Bullpup Rifle MK2',
+ ['weapon_carbinerifle'] = 'Carbine Rifle',
+ ['weapon_carbinerifle_mk2'] = 'Carbine Rifle MK2',
+ ['weapon_compactrifle'] = 'Compact Rifle',
+ ['weapon_militaryrifle'] = 'Military Rifle',
+ ['weapon_specialcarbine'] = 'Special Carbine',
+ ['weapon_specialcarbine_mk2'] = 'Special Carbine MK2',
+
+ -- Sniper
+ ['weapon_heavysniper'] = 'Heavy Sniper',
+ ['weapon_heavysniper_mk2'] = 'Heavy Sniper MK2',
+ ['weapon_marksmanrifle'] = 'Marksman Rifle',
+ ['weapon_marksmanrifle_mk2'] = 'Marksman Rifle MK2',
+ ['weapon_sniperrifle'] = 'Sniper Rifle',
+
+ -- Heavy / Launchers
+ ['weapon_compactlauncher'] = 'Compact Launcher',
+ ['weapon_firework'] = 'Firework Launcher',
+ ['weapon_grenadelauncher'] = 'Grenade Launcher',
+ ['weapon_hominglauncher'] = 'Homing Launcher',
+ ['weapon_minigun'] = 'Minigun',
+ ['weapon_railgun'] = 'Railgun',
+ ['weapon_rpg'] = 'Rocket Launcher',
+ ['weapon_rayminigun'] = 'Widowmaker',
+
+ -- Thrown
+ ['weapon_ball'] = 'Baseball',
+ ['weapon_bzgas'] = 'BZ Gas',
+ ['weapon_flare'] = 'Flare',
+ ['weapon_grenade'] = 'Grenade',
+ ['weapon_petrolcan'] = 'Jerrycan',
+ ['weapon_hazardcan'] = 'Hazardous Jerrycan',
+ ['weapon_molotov'] = 'Molotov Cocktail',
+ ['weapon_proxmine'] = 'Proximity Mine',
+ ['weapon_pipebomb'] = 'Pipe Bomb',
+ ['weapon_snowball'] = 'Snowball',
+ ['weapon_stickybomb'] = 'Sticky Bomb',
+ ['weapon_smokegrenade'] = 'Tear Gas',
+
+ -- Special
+ ['weapon_fireextinguisher'] = 'Fire Extinguisher',
+ ['weapon_digiscanner'] = 'Digital Scanner',
+ ['weapon_garbagebag'] = 'Garbage Bag',
+ ['weapon_handcuffs'] = 'Handcuffs',
+ ['gadget_nightvision'] = 'Night Vision',
+ ['gadget_parachute'] = 'parachute',
+
+ -- Weapon Components
+ ['component_knuckle_base'] = 'base Model',
+ ['component_knuckle_pimp'] = 'the Pimp',
+ ['component_knuckle_ballas'] = 'the Ballas',
+ ['component_knuckle_dollar'] = 'the Hustler',
+ ['component_knuckle_diamond'] = 'the Rock',
+ ['component_knuckle_hate'] = 'the Hater',
+ ['component_knuckle_love'] = 'the Lover',
+ ['component_knuckle_player'] = 'the Player',
+ ['component_knuckle_king'] = 'the King',
+ ['component_knuckle_vagos'] = 'the Vagos',
+
+ ['component_luxary_finish'] = 'luxary Weapon Finish',
+
+ ['component_handle_default'] = 'default Handle',
+ ['component_handle_vip'] = 'vIP Handle',
+ ['component_handle_bodyguard'] = 'bodyguard Handle',
+
+ ['component_vip_finish'] = 'vIP Finish',
+ ['component_bodyguard_finish'] = 'bodyguard Finish',
+
+ ['component_camo_finish'] = 'digital Camo',
+ ['component_camo_finish2'] = 'brushstroke Camo',
+ ['component_camo_finish3'] = 'woodland Camo',
+ ['component_camo_finish4'] = 'skull Camo',
+ ['component_camo_finish5'] = 'sessanta Nove Camo',
+ ['component_camo_finish6'] = 'perseus Camo',
+ ['component_camo_finish7'] = 'leopard Camo',
+ ['component_camo_finish8'] = 'zebra Camo',
+ ['component_camo_finish9'] = 'geometric Camo',
+ ['component_camo_finish10'] = 'boom Camo',
+ ['component_camo_finish11'] = 'patriotic Camo',
+
+ ['component_camo_slide_finish'] = 'digital Slide Camo',
+ ['component_camo_slide_finish2'] = 'brushstroke Slide Camo',
+ ['component_camo_slide_finish3'] = 'woodland Slide Camo',
+ ['component_camo_slide_finish4'] = 'skull Slide Camo',
+ ['component_camo_slide_finish5'] = 'sessanta Nove Slide Camo',
+ ['component_camo_slide_finish6'] = 'perseus Slide Camo',
+ ['component_camo_slide_finish7'] = 'leopard Slide Camo',
+ ['component_camo_slide_finish8'] = 'zebra Slide Camo',
+ ['component_camo_slide_finish9'] = 'geometric Slide Camo',
+ ['component_camo_slide_finish10'] = 'boom Slide Camo',
+ ['component_camo_slide_finish11'] = 'patriotic Slide Camo',
+
+ ['component_clip_default'] = 'default Magazine',
+ ['component_clip_extended'] = 'extended Magazine',
+ ['component_clip_drum'] = 'drum Magazine',
+ ['component_clip_box'] = 'box Magazine',
+
+ ['component_scope_holo'] = 'holographic Scope',
+ ['component_scope_small'] = 'small Scope',
+ ['component_scope_medium'] = 'medium Scope',
+ ['component_scope_large'] = 'large Scope',
+ ['component_scope'] = 'mounted Scope',
+ ['component_scope_advanced'] = 'advanced Scope',
+ ['component_ironsights'] = 'ironsights',
+
+ ['component_suppressor'] = 'suppressor',
+ ['component_compensator'] = 'compensator',
+
+ ['component_muzzle_flat'] = 'flat Muzzle Brake',
+ ['component_muzzle_tactical'] = 'tactical Muzzle Brake',
+ ['component_muzzle_fat'] = 'fat-End Muzzle Brake',
+ ['component_muzzle_precision'] = 'precision Muzzle Brake',
+ ['component_muzzle_heavy'] = 'heavy Duty Muzzle Brake',
+ ['component_muzzle_slanted'] = 'slanted Muzzle Brake',
+ ['component_muzzle_split'] = 'split-End Muzzle Brake',
+ ['component_muzzle_squared'] = 'squared Muzzle Brake',
+
+ ['component_flashlight'] = 'flashlight',
+ ['component_grip'] = 'grip',
+
+ ['component_barrel_default'] = 'default Barrel',
+ ['component_barrel_heavy'] = 'heavy Barrel',
+
+ ['component_ammo_tracer'] = 'tracer Ammo',
+ ['component_ammo_incendiary'] = 'incendiary Ammo',
+ ['component_ammo_hollowpoint'] = 'hollowpoint Ammo',
+ ['component_ammo_fmj'] = 'fMJ Ammo',
+ ['component_ammo_armor'] = 'armor Piercing Ammo',
+ ['component_ammo_explosive'] = 'armor Piercing Incendiary Ammo',
+
+ ['component_shells_default'] = 'default Shells',
+ ['component_shells_incendiary'] = 'dragons Breath Shells',
+ ['component_shells_armor'] = 'steel Buckshot Shells',
+ ['component_shells_hollowpoint'] = 'flechette Shells',
+ ['component_shells_explosive'] = 'explosive Slug Shells',
+
+ -- Weapon Ammo
+ ['ammo_rounds'] = 'round(s)',
+ ['ammo_shells'] = 'shell(s)',
+ ['ammo_charge'] = 'charge',
+ ['ammo_petrol'] = 'gallons of fuel',
+ ['ammo_firework'] = 'firework(s)',
+ ['ammo_rockets'] = 'rocket(s)',
+ ['ammo_grenadelauncher'] = 'grenade(s)',
+ ['ammo_grenade'] = 'grenade(s)',
+ ['ammo_stickybomb'] = 'bomb(s)',
+ ['ammo_pipebomb'] = 'bomb(s)',
+ ['ammo_smokebomb'] = 'bomb(s)',
+ ['ammo_molotov'] = 'cocktail(s)',
+ ['ammo_proxmine'] = 'mine(s)',
+ ['ammo_bzgas'] = 'can(s)',
+ ['ammo_ball'] = 'ball(s)',
+ ['ammo_snowball'] = 'snowball(s)',
+ ['ammo_flare'] = 'flare(s)',
+ ['ammo_flaregun'] = 'flare(s)',
+
+ -- Weapon Tints
+ ['tint_default'] = 'default skin',
+ ['tint_green'] = 'green skin',
+ ['tint_gold'] = 'gold skin',
+ ['tint_pink'] = 'pink skin',
+ ['tint_army'] = 'army skin',
+ ['tint_lspd'] = 'blue skin',
+ ['tint_orange'] = 'orange skin',
+ ['tint_platinum'] = 'platinum skin',
+}
diff --git a/[esx]/es_extended/locales/fi.lua b/[esx]/es_extended/locales/fi.lua
new file mode 100644
index 00000000..e69271b8
--- /dev/null
+++ b/[esx]/es_extended/locales/fi.lua
@@ -0,0 +1,225 @@
+Locales['fi'] = {
+ -- Inventory
+ ['inventory'] = 'reppu %s / %s',
+ ['use'] = 'käytä',
+ ['give'] = 'anna',
+ ['remove'] = 'poista',
+ ['return'] = 'takaisin',
+ ['give_to'] = 'give to',
+ ['amount'] = 'määrä',
+ ['giveammo'] = 'anna ammuksia',
+ ['amountammo'] = 'ammusten määrä',
+ ['noammo'] = 'sinulla ei ole ammuksia!',
+ ['gave_item'] = 'sinä annoit ~y~%sx~s~ ~b~%s~s~ henkilölle ~y~%s~s~',
+ ['received_item'] = 'sinä sait ~y~%sx~s~ ~b~%s~s~ henkilöltä ~b~%s~s~',
+ ['gave_weapon'] = 'you gave ~y~1x~s~ ~b~%s~s~ to ~y~%s~s~',
+ ['gave_weapon_ammo'] = 'you gave ~o~%sx %s~s~ for ~b~%s~s~ to ~y~%s~s~',
+ ['gave_weapon_withammo'] = 'you gave ~y~1x~s~ ~b~%s~s~ with ~o~%sx %s~s~ to ~y~%s~s~',
+ ['gave_weapon_hasalready'] = '~y~%s~s~ already have an ~y~%s~s~',
+ ['gave_weapon_noweapon'] = '~y~%s~s~ does not have that weapon',
+ ['received_weapon'] = 'you received ~y~1x~s~ ~b~%s~s~ from ~b~%s~s~',
+ ['received_weapon_ammo'] = 'you received ~o~%sx %s~s~ for your ~b~%s~s~ from ~b~%s~s~',
+ ['received_weapon_withammo'] = 'you received ~y~1x~s~ ~b~%s~s~ with ~o~%sx %s~s~ from ~b~%s~s~',
+ ['received_weapon_hasalready'] = '~b~%s~s~ attempted to give you an ~y~%s~s~, but you already have one',
+ ['received_weapon_noweapon'] = '~b~%s~s~ attempted to give you ammo for an ~y~%s~s~, but you dont have one',
+ ['gave_account_money'] = 'sinä annoit ~g~$%s~s~ (%s) henkilölle ~y~%s~s~',
+ ['received_account_money'] = 'sinä sait ~g~$%s~s~ (%s) henkilöltä ~b~%s~s~',
+ ['amount_invalid'] = 'virheellinen määrä',
+ ['players_nearby'] = 'ei pelaajia lähettyvillä',
+ ['ex_inv_lim'] = 'toiminto mahdoton, reppu alkaa olla täysi ~y~%s~s~',
+ ['imp_invalid_quantity'] = 'toiminto mahdoton, virheellinen määrä',
+ ['imp_invalid_amount'] = 'toiminto mahdoton, virhellinen summa',
+ ['threw_standard'] = 'you threw ~y~%sx~s~ ~b~%s~s~',
+ ['threw_account'] = 'you threw ~g~$%s~s~ ~b~%s~s~',
+ ['threw_weapon'] = 'you threw ~y~1x~s~ ~b~%s~s~',
+ ['threw_weapon_ammo'] = 'you threw ~y~1x~s~ ~b~%s~s~ with ~o~%sx %s~s~',
+ ['threw_weapon_already'] = 'you already carry the same weapon',
+ ['threw_cannot_pickup'] = 'you cannot pickup that because your inventory is full!',
+ ['threw_pickup_prompt'] = 'press ~y~E~s~ to pickup',
+
+ -- Key mapping
+ ['keymap_showinventory'] = 'show Inventory',
+
+ -- Salary related
+ ['received_salary'] = 'sinä vastaanotit palkkaa: ~g~$%s~s~',
+ ['received_help'] = 'sinä vastaanotit valtion tukea: ~g~$%s~s~',
+ ['company_nomoney'] = 'yritys jolle teet töitä on köyhä eikä voi maksaa palkkaasi',
+ ['received_paycheck'] = 'sait palkan',
+ ['bank'] = 'pankki',
+ ['account_bank'] = 'bank',
+ ['account_black_money'] = 'dirty Money',
+ ['account_money'] = 'cash',
+
+ ['act_imp'] = 'toiminto mahdoton',
+ ['in_vehicle'] = 'et voi antaa ajoneuvossa olevalle mitään',
+
+ -- Commands
+ ['command_car'] = 'spawn an vehicle',
+ ['command_car_car'] = 'vehicle spawn name or hash',
+ ['command_cardel'] = 'delete vehicle in proximity',
+ ['command_cardel_radius'] = 'optional, delete every vehicle within the specified radius',
+ ['command_clear'] = 'clear chat',
+ ['command_clearall'] = 'clear chat for all players',
+ ['command_clearinventory'] = 'clear player inventory',
+ ['command_clearloadout'] = 'clear a player loadout',
+ ['command_giveaccountmoney'] = 'give account money',
+ ['command_giveaccountmoney_account'] = 'valid account name',
+ ['command_giveaccountmoney_amount'] = 'amount to add',
+ ['command_giveaccountmoney_invalid'] = 'invalid account name',
+ ['command_giveitem'] = 'give an item to a player',
+ ['command_giveitem_item'] = 'item name',
+ ['command_giveitem_count'] = 'item count',
+ ['command_giveweapon'] = 'give a weapon to a player',
+ ['command_giveweapon_weapon'] = 'weapon name',
+ ['command_giveweapon_ammo'] = 'ammo count',
+ ['command_giveweapon_hasalready'] = 'player already has that weapon',
+ ['command_giveweaponcomponent'] = 'give weapon component',
+ ['command_giveweaponcomponent_component'] = 'component name',
+ ['command_giveweaponcomponent_invalid'] = 'invalid weapon component',
+ ['command_giveweaponcomponent_hasalready'] = 'player already has that weapon component',
+ ['command_giveweaponcomponent_missingweapon'] = 'player does not have that weapon',
+ ['command_save'] = 'save a player to database',
+ ['command_saveall'] = 'save all players to database',
+ ['command_setaccountmoney'] = 'set account money for a player',
+ ['command_setaccountmoney_amount'] = 'amount of money to set',
+ ['command_setcoords'] = 'teleport to coordinates',
+ ['command_setcoords_x'] = 'x axis',
+ ['command_setcoords_y'] = 'y axis',
+ ['command_setcoords_z'] = 'z axis',
+ ['command_setjob'] = 'set job for a player',
+ ['command_setjob_job'] = 'job name',
+ ['command_setjob_grade'] = 'job grade',
+ ['command_setjob_invalid'] = 'the job, grade or both are invalid',
+ ['command_setgroup'] = 'set player group',
+ ['command_setgroup_group'] = 'group name',
+ ['commanderror_argumentmismatch'] = 'argument count mismatch (passed %s, wanted %s)',
+ ['commanderror_argumentmismatch_number'] = 'argument #%s type mismatch (passed string, wanted number)',
+ ['commanderror_invaliditem'] = 'invalid item name',
+ ['commanderror_invalidweapon'] = 'invalid weapon',
+ ['commanderror_console'] = 'that command can not be run from console',
+ ['commanderror_invalidcommand'] = '^3%s^0 is not an valid command!',
+ ['commanderror_invalidplayerid'] = 'there is no player online matching that server id',
+ ['commandgeneric_playerid'] = 'player id',
+
+ -- Locale settings
+ ['locale_digit_grouping_symbol'] = ' ',
+ ['locale_currency'] = '$%s',
+
+ -- Weapons
+ ['weapon_knife'] = 'veitsi',
+ ['weapon_nightstick'] = 'pamppu',
+ ['weapon_hammer'] = 'vasara',
+ ['weapon_bat'] = 'pesäpallomaila',
+ ['weapon_golfclub'] = 'golf maila',
+ ['weapon_crowbar'] = 'sorkkarauta',
+ ['weapon_pistol'] = 'pistooli',
+ ['weapon_combatpistol'] = 'taistelu pistooli',
+ ['weapon_appistol'] = 'automaatti pistooli',
+ ['weapon_pistol50'] = '50 kaliiperinen pistooli',
+ ['weapon_microsmg'] = 'mikro konepistooli',
+ ['weapon_smg'] = 'konepistooli',
+ ['weapon_assaultsmg'] = 'rynnäkkö konepistooli',
+ ['weapon_assaultrifle'] = 'rynnäkkökivääri',
+ ['weapon_carbinerifle'] = 'karbiini kivääri',
+ ['weapon_advancedrifle'] = 'edistynyt kivääri',
+ ['weapon_mg'] = 'konekivääri',
+ ['weapon_combatmg'] = 'rynnäkkö konekivääri',
+ ['weapon_pumpshotgun'] = 'pumppu haulikko',
+ ['weapon_sawnoffshotgun'] = 'katkaistuhaulikko',
+ ['weapon_assaultshotgun'] = 'hyökkäyshaulikko',
+ ['weapon_bullpupshotgun'] = 'bullpup haulikko',
+ ['weapon_stungun'] = 'tainutusase',
+ ['weapon_sniperrifle'] = 'tarkkuuskivääri',
+ ['weapon_heavysniper'] = 'raskas tarkkuuskivääri',
+ ['weapon_grenadelauncher'] = 'kranaatinheitin',
+ ['weapon_rpg'] = 'raketinheitin',
+ ['weapon_minigun'] = 'minigun',
+ ['weapon_grenade'] = 'kranaatti',
+ ['weapon_stickybomb'] = 'tahma pommi',
+ ['weapon_smokegrenade'] = 'savu kranaatti',
+ ['weapon_bzgas'] = 'bz-kaasu',
+ ['weapon_molotov'] = 'polttopullo',
+ ['weapon_fireextinguisher'] = 'palosammutin',
+ ['weapon_petrolcan'] = 'jerrykannu',
+ ['weapon_ball'] = 'pallo',
+ ['weapon_snspistol'] = 'pienpistooli',
+ ['weapon_bottle'] = 'pullo',
+ ['weapon_gusenberg'] = 'tommy gun',
+ ['weapon_specialcarbine'] = 'G86C',
+ ['weapon_heavypistol'] = 'raskas pistooli',
+ ['weapon_bullpuprifle'] = 'bullpup kivääri',
+ ['weapon_dagger'] = 'tikari',
+ ['weapon_vintagepistol'] = 'vanha pistooli',
+ ['weapon_firework'] = 'ilotulitus',
+ ['weapon_musket'] = 'musketti',
+ ['weapon_heavyshotgun'] = 'raskas haulikko',
+ ['weapon_marksmanrifle'] = 'marksman kivääri',
+ ['weapon_hominglauncher'] = 'ohjautuva raketinheitin',
+ ['weapon_proxmine'] = 'lähellä räjähtävä miina',
+ ['weapon_snowball'] = 'lumipallo',
+ ['weapon_flaregun'] = 'valopyssy',
+ ['weapon_combatpdw'] = 'rynnäkkö pdw',
+ ['weapon_marksmanpistol'] = 'marksman pistooli',
+ ['weapon_knuckle'] = 'nyrkkirauta',
+ ['weapon_hatchet'] = 'kirves',
+ ['weapon_railgun'] = 'raidetykki',
+ ['weapon_machete'] = 'viidakkoveitsi',
+ ['weapon_machinepistol'] = 'konepistooli',
+ ['weapon_switchblade'] = 'stiletti',
+ ['weapon_revolver'] = 'raskas revolveri',
+ ['weapon_dbshotgun'] = 'kakspiippunen haulikko',
+ ['weapon_compactrifle'] = 'pikku AK',
+ ['weapon_autoshotgun'] = 'automaattinen haulikko',
+ ['weapon_battleaxe'] = 'Taistelukirves',
+ ['weapon_compactlauncher'] = 'pien kranaatinheitin',
+ ['weapon_minismg'] = 'mini konepistooli',
+ ['weapon_pipebomb'] = 'putkipommi',
+ ['weapon_poolcue'] = 'biljardimaila',
+ ['weapon_wrench'] = 'putkipihdit',
+ ['weapon_flashlight'] = 'taskulamppu',
+ ['gadget_parachute'] = 'laskuvarjo',
+ ['weapon_flare'] = 'hätäraketti',
+ ['weapon_doubleaction'] = 'double-Action Revolver',
+
+ -- Weapon Components
+ ['component_clip_default'] = 'default Clip',
+ ['component_clip_extended'] = 'extended Clip',
+ ['component_clip_drum'] = 'drum Magazine',
+ ['component_clip_box'] = 'box Magazine',
+ ['component_flashlight'] = 'flashlight',
+ ['component_scope'] = 'scope',
+ ['component_scope_advanced'] = 'advanced Scope',
+ ['component_suppressor'] = 'suppressor',
+ ['component_grip'] = 'grip',
+ ['component_luxary_finish'] = 'luxary Weapon Finish',
+
+ -- Weapon Ammo
+ ['ammo_rounds'] = 'round(s)',
+ ['ammo_shells'] = 'shell(s)',
+ ['ammo_charge'] = 'charge',
+ ['ammo_petrol'] = 'gallons of fuel',
+ ['ammo_firework'] = 'firework(s)',
+ ['ammo_rockets'] = 'rocket(s)',
+ ['ammo_grenadelauncher'] = 'grenade(s)',
+ ['ammo_grenade'] = 'grenade(s)',
+ ['ammo_stickybomb'] = 'bomb(s)',
+ ['ammo_pipebomb'] = 'bomb(s)',
+ ['ammo_smokebomb'] = 'bomb(s)',
+ ['ammo_molotov'] = 'cocktail(s)',
+ ['ammo_proxmine'] = 'mine(s)',
+ ['ammo_bzgas'] = 'can(s)',
+ ['ammo_ball'] = 'ball(s)',
+ ['ammo_snowball'] = 'snowball(s)',
+ ['ammo_flare'] = 'flare(s)',
+ ['ammo_flaregun'] = 'flare(s)',
+
+ -- Weapon Tints
+ ['tint_default'] = 'default skin',
+ ['tint_green'] = 'green skin',
+ ['tint_gold'] = 'gold skin',
+ ['tint_pink'] = 'pink skin',
+ ['tint_army'] = 'army skin',
+ ['tint_lspd'] = 'blue skin',
+ ['tint_orange'] = 'orange skin',
+ ['tint_platinum'] = 'platinum skin',
+}
diff --git a/[esx]/es_extended/locales/fr.lua b/[esx]/es_extended/locales/fr.lua
new file mode 100644
index 00000000..7512e33b
--- /dev/null
+++ b/[esx]/es_extended/locales/fr.lua
@@ -0,0 +1,225 @@
+Locales['fr'] = {
+ -- Inventory
+ ['inventory'] = 'inventaire %s / %s',
+ ['use'] = 'utiliser',
+ ['give'] = 'donner',
+ ['remove'] = 'jeter',
+ ['return'] = 'retour',
+ ['give_to'] = 'donner à',
+ ['amount'] = 'quantité',
+ ['giveammo'] = 'donner munitions',
+ ['amountammo'] = 'nombre de munitions',
+ ['noammo'] = 'tu n\'as pas toutes ces munitions!',
+ ['gave_item'] = 'vous avez donné ~y~%sx~s~ ~b~%s~s~ à ~y~%s~s~',
+ ['received_item'] = 'vous avez reçu ~y~%sx~s~ ~b~%s~s~ par ~b~%s~s~',
+ ['gave_weapon'] = 'vous avez donné ~y~1x~s~ ~b~%s~s~ à ~y~%s~s~',
+ ['gave_weapon_ammo'] = 'vous avez donné ~o~%sx %s~s~ pour ~b~%s~s~ à ~y~%s~s~',
+ ['gave_weapon_withammo'] = 'vous avez donné ~y~1x~s~ ~b~%s~s~ avec ~o~%sx %s~s~ à ~y~%s~s~',
+ ['gave_weapon_hasalready'] = '~y~%s~s~ a déjà ~y~%s~s~',
+ ['gave_weapon_noweapon'] = '~y~%s~s~ n\'a pas cette arme',
+ ['received_weapon'] = 'vous recevez ~y~1x~s~ ~b~%s~s~ de ~b~%s~s~',
+ ['received_weapon_ammo'] = 'vous avez reçu ~o~%sx %s~s~ pour votre ~b~%s~s~ de ~b~%s~s~',
+ ['received_weapon_withammo'] = 'vous avez reçu ~y~1x~s~ ~b~%s~s~ avec ~o~%sx %s~s~ de ~b~%s~s~',
+ ['received_weapon_hasalready'] = '~b~%s~s~ a tenté de vous donner ~y~%s~s~, mais vous en aviez déjà un exemplaire',
+ ['received_weapon_noweapon'] = '~b~%s~s~ tente de vous donner des munitions pour ~y~%s~s~, mais vous n\'en avez pas',
+ ['gave_account_money'] = 'vous avez donné ~g~$%s~s~ (%s) à ~y~%s~s~',
+ ['received_account_money'] = 'vous avez reçu ~g~$%s~s~ (%s) par ~b~%s~s~',
+ ['amount_invalid'] = 'montant invalide',
+ ['players_nearby'] = 'aucun joueur à proximité',
+ ['ex_inv_lim'] = 'action impossible, depassement de la limite d\'inventaire pour ~y~%s~s~',
+ ['imp_invalid_quantity'] = 'action impossible, ~r~quantité invalide',
+ ['imp_invalid_amount'] = 'action impossible, ~r~montant invalide',
+ ['threw_standard'] = 'vous avez jeté ~y~%sx~s~ ~b~%s~s~',
+ ['threw_account'] = 'vous avez jeté ~g~$%s~s~ ~b~%s~s~',
+ ['threw_weapon'] = 'vous avez jeté ~y~1x~s~ ~b~%s~s~',
+ ['threw_weapon_ammo'] = 'vous avez jeté ~y~1x~s~ ~b~%s~s~ avec ~o~%sx %s~s~',
+ ['threw_weapon_already'] = 'vous portez déjà cette arme',
+ ['threw_cannot_pickup'] = 'vous ne pouvez pas ramasser ça votre inventaire est plein !',
+ ['threw_pickup_prompt'] = 'appuyez sur ~y~E~s~ pour ramasser',
+
+ -- Key mapping
+ ['keymap_showinventory'] = 'montrer l\'inventaire',
+
+ -- Salary related
+ ['received_salary'] = 'vous avez reçu votre salaire: ~g~$%s~s~',
+ ['received_help'] = 'vous avez reçu une aide de l\'état: ~g~$%s~s~',
+ ['company_nomoney'] = 'votre entreprise n\'a plus d\'argent pour vous payer!',
+ ['received_paycheck'] = 'paiement reçu',
+ ['bank'] = 'banque',
+ ['account_bank'] = 'banque',
+ ['account_black_money'] = 'argent sale',
+ ['account_money'] = 'espèces',
+
+ ['act_imp'] = 'action impossible',
+ ['in_vehicle'] = 'Vous ne pouvez rien donner à quelqu\'un dans un véhicule',
+
+ -- Commands
+ ['command_car'] = 'faire appaitre un véhicule',
+ ['command_car_car'] = 'nom ou hash du véhicule',
+ ['command_cardel'] = 'supprimer le véhicule à proximité',
+ ['command_cardel_radius'] = 'optionnel, supprime les véhicules dans un rayon spécifié',
+ ['command_clear'] = 'vider le chat',
+ ['command_clearall'] = 'vider le chat pour tous',
+ ['command_clearinventory'] = 'vider l\'inventaire d\'un joueur',
+ ['command_clearloadout'] = 'vider le loadout d\'un joueur',
+ ['command_giveaccountmoney'] = 'donner de l\'argent sur un compte',
+ ['command_giveaccountmoney_account'] = 'nom de compte valide',
+ ['command_giveaccountmoney_amount'] = 'quantité à ajouter',
+ ['command_giveaccountmoney_invalid'] = 'nom de compte invalide',
+ ['command_giveitem'] = 'donner un objet à un joueur',
+ ['command_giveitem_item'] = 'nom de l\'objet',
+ ['command_giveitem_count'] = 'quantité de l\'objet',
+ ['command_giveweapon'] = 'donner une arme à un joueur',
+ ['command_giveweapon_weapon'] = 'nom de l\'arme',
+ ['command_giveweapon_ammo'] = 'quantité de munitions',
+ ['command_giveweapon_hasalready'] = 'le joueur a déjà cette arme',
+ ['command_giveweaponcomponent'] = 'donner un accessoire d\'arme',
+ ['command_giveweaponcomponent_component'] = 'nom de l\'accessoire',
+ ['command_giveweaponcomponent_invalid'] = 'accessoire invalide',
+ ['command_giveweaponcomponent_hasalready'] = 'le joueur a déjà cet accessoire',
+ ['command_giveweaponcomponent_missingweapon'] = 'le joueur n\'a pas cette arme',
+ ['command_save'] = 'sauvegarder un joueur dans la base de données',
+ ['command_saveall'] = 'sauvegarder tous les joueurs dans la base de données',
+ ['command_setaccountmoney'] = 'définir la somme d\'argent pour un joueur',
+ ['command_setaccountmoney_amount'] = 'quantité d\'argent à définir',
+ ['command_setcoords'] = 'se téléporter aux coordonnées',
+ ['command_setcoords_x'] = 'axe X',
+ ['command_setcoords_y'] = 'axe Y',
+ ['command_setcoords_z'] = 'axe Z',
+ ['command_setjob'] = 'assigner job à un joueur',
+ ['command_setjob_job'] = 'nom du job',
+ ['command_setjob_grade'] = 'grade du job',
+ ['command_setjob_invalid'] = 'le job, le grade ou les deux sont invalides',
+ ['command_setgroup'] = 'assigner un groupe à un joueur',
+ ['command_setgroup_group'] = 'nom du groupe',
+ ['commanderror_argumentmismatch'] = 'argument count mismatch (passed %s, wanted %s)',
+ ['commanderror_argumentmismatch_number'] = 'argument #%s type mismatch (passed string, wanted number)',
+ ['commanderror_invaliditem'] = 'nom de l\'objet invalide',
+ ['commanderror_invalidweapon'] = 'arme invalide',
+ ['commanderror_console'] = 'cette commande ne peut pas être utilisée dans la console',
+ ['commanderror_invalidcommand'] = '^3%s^0 n\'est pas une commande valide!',
+ ['commanderror_invalidplayerid'] = 'il n\'ya aucun joueur avec cet ID en jeu',
+ ['commandgeneric_playerid'] = 'id joueur',
+
+ -- Locale settings
+ ['locale_digit_grouping_symbol'] = ' ',
+ ['locale_currency'] = '$%s',
+
+ -- Weapons
+ ['weapon_knife'] = 'couteau',
+ ['weapon_nightstick'] = 'matraque',
+ ['weapon_hammer'] = 'marteau',
+ ['weapon_bat'] = 'batte',
+ ['weapon_golfclub'] = 'club de golf',
+ ['weapon_crowbar'] = 'pied de biche',
+ ['weapon_pistol'] = 'pistolet',
+ ['weapon_combatpistol'] = 'pistolet de combat',
+ ['weapon_appistol'] = 'pistolet automatique',
+ ['weapon_pistol50'] = 'pistolet calibre 50',
+ ['weapon_microsmg'] = 'micro smg',
+ ['weapon_smg'] = 'smg',
+ ['weapon_assaultsmg'] = 'smg d\'assaut',
+ ['weapon_assaultrifle'] = 'fusil d\'assaut',
+ ['weapon_carbinerifle'] = 'carabine d\'assaut',
+ ['weapon_advancedrifle'] = 'fusil avancé',
+ ['weapon_mg'] = 'mitrailleuse',
+ ['weapon_combatmg'] = 'mitrailleuse de combat',
+ ['weapon_pumpshotgun'] = 'fusil à pompe',
+ ['weapon_sawnoffshotgun'] = 'carabine à canon scié',
+ ['weapon_assaultshotgun'] = 'carabine d\'assaut',
+ ['weapon_bullpupshotgun'] = 'carabine bullpup',
+ ['weapon_stungun'] = 'tazer',
+ ['weapon_sniperrifle'] = 'fusil de sniper',
+ ['weapon_heavysniper'] = 'fusil de sniper lourd',
+ ['weapon_grenadelauncher'] = 'lance-grenade',
+ ['weapon_rpg'] = 'lance-rocket',
+ ['weapon_minigun'] = 'minigun',
+ ['weapon_grenade'] = 'grenade',
+ ['weapon_stickybomb'] = 'bombe collante',
+ ['weapon_smokegrenade'] = 'grenade fumigène',
+ ['weapon_bzgas'] = 'grenade à gaz bz',
+ ['weapon_molotov'] = 'cocktail molotov',
+ ['weapon_fireextinguisher'] = 'extincteur',
+ ['weapon_petrolcan'] = 'jerrican d\'essence',
+ ['weapon_ball'] = 'balle',
+ ['weapon_snspistol'] = 'pistolet sns',
+ ['weapon_bottle'] = 'bouteille',
+ ['weapon_gusenberg'] = 'balayeuse gusenberg',
+ ['weapon_specialcarbine'] = 'carabine spéciale',
+ ['weapon_heavypistol'] = 'pistolet lourd',
+ ['weapon_bullpuprifle'] = 'fusil bullpup',
+ ['weapon_dagger'] = 'poignard',
+ ['weapon_vintagepistol'] = 'pistolet vintage',
+ ['weapon_firework'] = 'feu d\'artifice',
+ ['weapon_musket'] = 'mousquet',
+ ['weapon_heavyshotgun'] = 'fusil à pompe lourd',
+ ['weapon_marksmanrifle'] = 'fusil marksman',
+ ['weapon_hominglauncher'] = 'lance tête-chercheuse',
+ ['weapon_proxmine'] = 'mine de proximité',
+ ['weapon_snowball'] = 'boule de neige',
+ ['weapon_flaregun'] = 'lance fusée de détresse',
+ ['weapon_combatpdw'] = 'arme de défense personnelle',
+ ['weapon_marksmanpistol'] = 'pistolet marksman',
+ ['weapon_knuckle'] = 'poing américain',
+ ['weapon_hatchet'] = 'hachette',
+ ['weapon_railgun'] = 'canon éléctrique',
+ ['weapon_machete'] = 'machette',
+ ['weapon_machinepistol'] = 'pistolet mitrailleur',
+ ['weapon_switchblade'] = 'couteau à cran d\'arrêt',
+ ['weapon_revolver'] = 'revolver',
+ ['weapon_dbshotgun'] = 'fusil à pompe double canon',
+ ['weapon_compactrifle'] = 'fusil compact',
+ ['weapon_autoshotgun'] = 'fusil à pompe automatique',
+ ['weapon_battleaxe'] = 'hache de combat',
+ ['weapon_compactlauncher'] = 'lanceur compact',
+ ['weapon_minismg'] = 'mini smg',
+ ['weapon_pipebomb'] = 'bombe tuyau',
+ ['weapon_poolcue'] = 'queue de billard',
+ ['weapon_wrench'] = 'clé',
+ ['weapon_flashlight'] = 'lampe torche',
+ ['gadget_parachute'] = 'parachute',
+ ['weapon_flare'] = 'fusée de détresse',
+ ['weapon_doubleaction'] = 'revolver double action',
+
+ -- Weapon Components
+ ['component_clip_default'] = 'chargeur par défaut',
+ ['component_clip_extended'] = 'chargeur grande capacité',
+ ['component_clip_drum'] = 'chargeur tambour',
+ ['component_clip_box'] = 'chargeur très grande capacité',
+ ['component_flashlight'] = 'torche',
+ ['component_scope'] = 'viseur',
+ ['component_scope_advanced'] = 'lunette',
+ ['component_suppressor'] = 'réducteur de son',
+ ['component_grip'] = 'poignée',
+ ['component_luxary_finish'] = 'finition de luxe',
+
+ -- Weapon Ammo
+ ['ammo_rounds'] = 'cartouche(s)',
+ ['ammo_shells'] = 'obus',
+ ['ammo_charge'] = 'charge(s)',
+ ['ammo_petrol'] = 'jerrican d\'essence',
+ ['ammo_firework'] = 'feu(x) d\'artifice',
+ ['ammo_rockets'] = 'roquette(s)',
+ ['ammo_grenadelauncher'] = 'grenade(s)',
+ ['ammo_grenade'] = 'grenade(s)',
+ ['ammo_stickybomb'] = 'bombe(s)',
+ ['ammo_pipebomb'] = 'bombe(s)',
+ ['ammo_smokebomb'] = 'bombe(s)',
+ ['ammo_molotov'] = 'cocktail(s)',
+ ['ammo_proxmine'] = 'mine(s)',
+ ['ammo_bzgas'] = 'grenade(s)',
+ ['ammo_ball'] = 'balle(s)',
+ ['ammo_snowball'] = 'boule(s) de neige',
+ ['ammo_flare'] = 'fusée(s) éclairante(s)',
+ ['ammo_flaregun'] = 'fusée(s)',
+
+ -- Weapon Tints
+ ['tint_default'] = 'skin par défaut',
+ ['tint_green'] = 'skin vert',
+ ['tint_gold'] = 'skin doré',
+ ['tint_pink'] = 'skin rose',
+ ['tint_army'] = 'skin militaire',
+ ['tint_lspd'] = 'skin bleu',
+ ['tint_orange'] = 'skin orange',
+ ['tint_platinum'] = 'skin platine',
+}
diff --git a/[esx]/es_extended/locales/pl.lua b/[esx]/es_extended/locales/pl.lua
new file mode 100644
index 00000000..35012487
--- /dev/null
+++ b/[esx]/es_extended/locales/pl.lua
@@ -0,0 +1,224 @@
+Locales['pl'] = {
+ -- Inventory
+ ['inventory'] = 'ekwipunek %s / %s',
+ ['use'] = 'użyj',
+ ['give'] = 'daj',
+ ['remove'] = 'usuń',
+ ['return'] = 'wróć',
+ ['give_to'] = 'daj dla',
+ ['amount'] = 'ilość',
+ ['giveammo'] = 'daj amunicje',
+ ['amountammo'] = 'ilość amunicji',
+ ['noammo'] = 'nie posiadasz wystarczającej ilości amunicji!',
+ ['gave_item'] = 'dałeś/aś ~y~%sx~s~ ~b~%s~s~ dla ~y~%s~s~',
+ ['received_item'] = 'otrzymałeś/aś ~y~%sx~s~ ~b~%s~s~ od ~b~%s~s~',
+ ['gave_weapon'] = 'dałeś/aś ~b~%s~s~ dla ~y~%s~s~',
+ ['gave_weapon_ammo'] = 'dałeś/aś ~o~%sx %s~s~ do ~b~%s~s~ dla ~y~%s~s~',
+ ['gave_weapon_withammo'] = 'dałeś/aś ~b~%s~s~ z ~o~%sx %s~s~ dla ~y~%s~s~',
+ ['gave_weapon_hasalready'] = '~y~%s~s~ już posiada ~y~%s~s~',
+ ['gave_weapon_noweapon'] = '~y~%s~s~ nie posiada tej broni',
+ ['received_weapon'] = 'otrzymałeś/aś ~b~%s~s~ od ~b~%s~s~',
+ ['received_weapon_ammo'] = 'otrzymałeś/aś ~o~%sx %s~s~ do twojego ~b~%s~s~ od ~b~%s~s~',
+ ['received_weapon_withammo'] = 'otrzymałeś/aś ~b~%s~s~ z ~o~%sx %s~s~ od ~b~%s~s~',
+ ['received_weapon_hasalready'] = '~b~%s~s~ próbował/a przekazać ci ~y~%s~s~, lecz już posiadasz jedno',
+ ['received_weapon_noweapon'] = '~b~%s~s~ próbował/a przekazać ci amunicje do ~y~%s~s~, lecz nie posiadasz tej broni',
+ ['gave_account_money'] = 'dałeś/aś ~g~%s$~s~ (%s) dla ~y~%s~s~',
+ ['received_account_money'] = 'otrzymałeś/aś ~g~%s$~s~ (%s) od ~b~%s~s~',
+ ['amount_invalid'] = 'nieprawidłowa ilość',
+ ['players_nearby'] = 'brak graczy w pobliżu',
+ ['ex_inv_lim'] = 'akcja nie jest możliwa, nie możesz mieć więcej ~y~%s~s~',
+ ['imp_invalid_quantity'] = 'akcja jest niemożliwa, nieprawidłowa ilość',
+ ['imp_invalid_amount'] = 'akcja jest niemożliwa, nieprawidłowa kwota',
+ ['threw_standard'] = 'wyrzuciłeś/aś ~y~%sx~s~ ~b~%s~s~',
+ ['threw_account'] = 'wyrzuciłeś/aś ~g~$%s~s~ ~b~%s~s~',
+ ['threw_weapon'] = 'wyrzuciłeś/aś ~b~%s~s~',
+ ['threw_weapon_ammo'] = 'wyrzuciłeś/aś ~b~%s~s~ z ~o~%sx %s~s~',
+ ['threw_weapon_already'] = 'już posiadasz taką samą broń',
+ ['threw_cannot_pickup'] = 'nie możesz tego podnieść, gdyż masz pełny ekwipunek!',
+ ['threw_pickup_prompt'] = 'naciśnij ~y~E~s~ aby podnieść',
+
+ -- Key mapping
+ ['keymap_showinventory'] = 'pokaż ekwipunek',
+
+ -- Salary related
+ ['received_salary'] = 'otrzymałeś/aś wynagrodzenie: ~g~%s$~s~',
+ ['received_help'] = 'otrzymałeś/aś zapomogę: ~g~$%s~s~',
+ ['company_nomoney'] = 'firma, w której pracujesz, jest zbyt biedna, by wypłacić twoją pensję',
+ ['received_paycheck'] = 'otrzymano wypłate',
+ ['bank'] = 'bank',
+ ['account_bank'] = 'bank',
+ ['account_black_money'] = 'brudne pieniądze',
+ ['account_money'] = 'pieniądze',
+ ['act_imp'] = 'działanie niemożliwe',
+ ['in_vehicle'] = 'nie możesz przekazywać przedmiotów w pojeździe',
+
+ -- Commands
+ ['command_car'] = 'przywołaj pojazd',
+ ['command_car_car'] = 'nazwa lub hash przywołanego pojazdu',
+ ['command_cardel'] = 'usuń pojazd w pobliżu',
+ ['command_cardel_radius'] = 'opcjonalnie usuń każdy pojazd w obszarze',
+ ['command_clear'] = 'wyczyść czat',
+ ['command_clearall'] = 'wyczyść czat dla wszystkich graczy',
+ ['command_clearinventory'] = 'wyczyść ekwipunek gracza',
+ ['command_clearloadout'] = 'wyczyść wyposarzenie gracza',
+ ['command_giveaccountmoney'] = 'daj pieniądze na podany typ konta',
+ ['command_giveaccountmoney_account'] = 'prawidłowy typ konta',
+ ['command_giveaccountmoney_amount'] = 'ilość do dodania',
+ ['command_giveaccountmoney_invalid'] = 'nieprawidłowy typ konta',
+ ['command_giveitem'] = 'daj przedmiot graczowi',
+ ['command_giveitem_item'] = 'nazwa przedmiotu',
+ ['command_giveitem_count'] = 'ilość przedimotu',
+ ['command_giveweapon'] = 'daj broń graczowi',
+ ['command_giveweapon_weapon'] = 'nazwa broni',
+ ['command_giveweapon_ammo'] = 'ilość amunicji',
+ ['command_giveweapon_hasalready'] = 'gracz już posiada tą broń',
+ ['command_giveweaponcomponent'] = 'daj komponent do broni graczowi',
+ ['command_giveweaponcomponent_component'] = 'nazwa komponentu',
+ ['command_giveweaponcomponent_invalid'] = 'nieprawidłowy komponent do broni',
+ ['command_giveweaponcomponent_hasalready'] = 'gracz już posiada ten komponent do tej broni',
+ ['command_giveweaponcomponent_missingweapon'] = 'gracz nie posiada tej broni',
+ ['command_save'] = 'zapisz gracza w bazie danych',
+ ['command_saveall'] = 'zapisz wszystkich graczy w bazie danych',
+ ['command_setaccountmoney'] = 'ustaw ilość pieniędzy danego konta dla gracza',
+ ['command_setaccountmoney_amount'] = 'ilość pieniędzy do ustawienia',
+ ['command_setcoords'] = 'teleportuj na koordynaty',
+ ['command_setcoords_x'] = 'x axis',
+ ['command_setcoords_y'] = 'y axis',
+ ['command_setcoords_z'] = 'z axis',
+ ['command_setjob'] = 'ustaw prace dla gracza',
+ ['command_setjob_job'] = 'nazwa pracy',
+ ['command_setjob_grade'] = 'stanowisko w pracy',
+ ['command_setjob_invalid'] = 'praca, stanowisko lub obydwa są nieprawidłowe',
+ ['command_setgroup'] = 'ustaw grupe gracza',
+ ['command_setgroup_group'] = 'nazwa grupy',
+ ['commanderror_argumentmismatch'] = 'nieprawiłowa ilość argumentów (przeszło %s, wymagane %s)',
+ ['commanderror_argumentmismatch_number'] = 'nieprawidłowy typ argumentu #%s (przeszedł tekst, wymagany numer)',
+ ['commanderror_invaliditem'] = 'nieprawidłowa nazwa przedmiotu',
+ ['commanderror_invalidweapon'] = 'nieprawidłowa broń',
+ ['commanderror_console'] = 'podana komenda nie może zostać uruchomiona przez konsole',
+ ['commanderror_invalidcommand'] = '^3%s^0 nie jest poprawną komendą!',
+ ['commanderror_invalidplayerid'] = 'brak dostepnego gracza pasującego do podanego id serwerowego',
+ ['commandgeneric_playerid'] = 'id gracza',
+
+ -- Locale settings
+ ['locale_digit_grouping_symbol'] = ',',
+ ['locale_currency'] = '$%s',
+
+ -- Weapons
+ ['weapon_knife'] = 'nóż',
+ ['weapon_nightstick'] = 'pałka',
+ ['weapon_hammer'] = 'młotek',
+ ['weapon_bat'] = 'kij',
+ ['weapon_golfclub'] = 'kij golfowy',
+ ['weapon_crowbar'] = 'łom',
+ ['weapon_pistol'] = 'pistolet',
+ ['weapon_combatpistol'] = 'pistolet bojowy',
+ ['weapon_appistol'] = 'ap pistol',
+ ['weapon_pistol50'] = 'pistol .50',
+ ['weapon_microsmg'] = 'micro smg',
+ ['weapon_smg'] = 'smg',
+ ['weapon_assaultsmg'] = 'assault smg',
+ ['weapon_assaultrifle'] = 'assault rifle',
+ ['weapon_carbinerifle'] = 'carbine rifle',
+ ['weapon_advancedrifle'] = 'advanced rifle',
+ ['weapon_mg'] = 'mg',
+ ['weapon_combatmg'] = 'combat mg',
+ ['weapon_pumpshotgun'] = 'pump shotgun',
+ ['weapon_sawnoffshotgun'] = 'sawed off shotgun',
+ ['weapon_assaultshotgun'] = 'assault shotgun',
+ ['weapon_bullpupshotgun'] = 'bullpup shotgun',
+ ['weapon_stungun'] = 'tazer',
+ ['weapon_sniperrifle'] = 'karabin snajperski',
+ ['weapon_heavysniper'] = 'ciężki karabin snajperski',
+ ['weapon_grenadelauncher'] = 'granatnik',
+ ['weapon_rpg'] = 'wyrzutnia rakiet',
+ ['weapon_minigun'] = 'minigun',
+ ['weapon_grenade'] = 'granat',
+ ['weapon_stickybomb'] = 'ładunek przylepny',
+ ['weapon_smokegrenade'] = 'granat dymny',
+ ['weapon_bzgas'] = 'bz gas',
+ ['weapon_molotov'] = 'koktajl Mołotowa',
+ ['weapon_fireextinguisher'] = 'gaśnica',
+ ['weapon_petrolcan'] = 'kanister',
+ ['weapon_ball'] = 'piłka',
+ ['weapon_snspistol'] = 'sns pistolet',
+ ['weapon_bottle'] = 'butelka',
+ ['weapon_gusenberg'] = 'gusenberg sweeper',
+ ['weapon_specialcarbine'] = 'special carbine',
+ ['weapon_heavypistol'] = 'heavy pistol',
+ ['weapon_bullpuprifle'] = 'karabin wyborowy',
+ ['weapon_dagger'] = 'sztylet',
+ ['weapon_vintagepistol'] = 'vintage pistol',
+ ['weapon_firework'] = 'fajerwerki',
+ ['weapon_musket'] = 'muszkiet',
+ ['weapon_heavyshotgun'] = 'ciężki shotgun',
+ ['weapon_marksmanrifle'] = 'marksman rifle',
+ ['weapon_hominglauncher'] = 'program uruchamiający',
+ ['weapon_proxmine'] = 'mina zbliżeniowa',
+ ['weapon_snowball'] = 'śnieżka',
+ ['weapon_flaregun'] = 'flara',
+ ['weapon_combatpdw'] = 'combat pdw',
+ ['weapon_marksmanpistol'] = 'marksman pistol',
+ ['weapon_knuckle'] = 'kastety',
+ ['weapon_hatchet'] = 'toporek',
+ ['weapon_railgun'] = 'karabin',
+ ['weapon_machete'] = 'meczeta',
+ ['weapon_machinepistol'] = 'pistolet maszynowy',
+ ['weapon_switchblade'] = 'scyzoryk',
+ ['weapon_revolver'] = 'ciężki rewolwer',
+ ['weapon_dbshotgun'] = 'dwururka',
+ ['weapon_compactrifle'] = 'compact rifle',
+ ['weapon_autoshotgun'] = 'auto shotgun',
+ ['weapon_battleaxe'] = 'topór bitewny',
+ ['weapon_compactlauncher'] = 'compact launcher',
+ ['weapon_minismg'] = 'mini smg',
+ ['weapon_pipebomb'] = 'bomba rurowa',
+ ['weapon_poolcue'] = 'kij bilardowy',
+ ['weapon_wrench'] = 'klucz do rur',
+ ['weapon_flashlight'] = 'latarka',
+ ['gadget_parachute'] = 'spadochron',
+ ['weapon_flare'] = 'pistolet sygnałowy',
+ ['weapon_doubleaction'] = 'double-Action Revolver',
+
+ -- Weapon Components
+ ['component_clip_default'] = 'domyślny tłumik',
+ ['component_clip_extended'] = 'rozszerzony tłumik',
+ ['component_clip_drum'] = 'magazynek bębnowy',
+ ['component_clip_box'] = 'magazynek',
+ ['component_flashlight'] = 'latarka',
+ ['component_scope'] = 'luneta',
+ ['component_scope_advanced'] = 'zaawansowana luneta',
+ ['component_suppressor'] = 'tłumik',
+ ['component_grip'] = 'uchwyt',
+ ['component_luxary_finish'] = 'luksusowe wykończenie broni',
+
+ -- Weapon Ammo
+ ['ammo_rounds'] = 'nabój/oi',
+ ['ammo_shells'] = 'pocisk(ów)',
+ ['ammo_charge'] = 'naładowania',
+ ['ammo_petrol'] = 'galon(y) paliwa',
+ ['ammo_firework'] = 'fajerwerka/i',
+ ['ammo_rockets'] = 'rakieta/y',
+ ['ammo_grenadelauncher'] = 'granat(y)',
+ ['ammo_grenade'] = 'granat(y)',
+ ['ammo_stickybomb'] = 'bomba/y',
+ ['ammo_pipebomb'] = 'bomba/y',
+ ['ammo_smokebomb'] = 'bomba/y',
+ ['ammo_molotov'] = 'kontail(e)',
+ ['ammo_proxmine'] = 'mina/y',
+ ['ammo_bzgas'] = 'puszka/ek',
+ ['ammo_ball'] = 'kula/e',
+ ['ammo_snowball'] = 'snieżka/i',
+ ['ammo_flare'] = 'flara/y',
+ ['ammo_flaregun'] = 'flara/y',
+
+ -- Weapon Tints
+ ['tint_default'] = 'domyślny skin',
+ ['tint_green'] = 'zielony skin',
+ ['tint_gold'] = 'złoty skin',
+ ['tint_pink'] = 'różowy skin',
+ ['tint_army'] = 'wojskowy skin',
+ ['tint_lspd'] = 'niebieski skin',
+ ['tint_orange'] = 'pomarańczowy skin',
+ ['tint_platinum'] = 'platynowy skin',
+}
diff --git a/[esx]/es_extended/locales/sc.lua b/[esx]/es_extended/locales/sc.lua
new file mode 100644
index 00000000..229403de
--- /dev/null
+++ b/[esx]/es_extended/locales/sc.lua
@@ -0,0 +1,225 @@
+Locales['sc'] = {
+ -- Inventory
+ ['inventory'] = '库存 %s / %s',
+ ['use'] = '使用',
+ ['give'] = '赠送',
+ ['remove'] = '丢弃',
+ ['return'] = '返回',
+ ['give_to'] = '赠给',
+ ['amount'] = '数量',
+ ['giveammo'] = '赠送弹药',
+ ['amountammo'] = '弹药量',
+ ['noammo'] = '你没有足够的弹药!',
+ ['gave_item'] = '你把~y~%sx~s~~b~%s~s~赠给了~y~%s~s~',
+ ['received_item'] = '你收到~y~%sx~s~~b~%s~s~,来自~b~%s~s~',
+ ['gave_weapon'] = '你把~b~%s~s~赠给了~y~%s~s~',
+ ['gave_weapon_ammo'] = '你把~o~%sx~s~~b~%s~s~ %s~s~赠给了~y~%s~s~',
+ ['gave_weapon_withammo'] = '你把~b~%s~s~和~o~%sx~s~ %s~s~赠给了~y~%s~s~',
+ ['gave_weapon_hasalready'] = '~y~%s~s~已经拥有~y~%s~s~',
+ ['gave_weapon_noweapon'] = '~y~%s~s~没有那个武器',
+ ['received_weapon'] = '你收到了~b~%s~s~,来自~b~%s~s~',
+ ['received_weapon_ammo'] = '你收到了~o~%sx~s~ %s~s~(~b~%s~s~),来自~b~%s~s~',
+ ['received_weapon_withammo'] = '你收到了~b~%s~s~和~o~%sx~s~ %s~s~,来自~b~%s~s~',
+ ['received_weapon_hasalready'] = '~b~%s~s~试图给你~y~%s~s~,但你已经拥有了',
+ ['received_weapon_noweapon'] = '~b~%s~s~试图给你~y~%s~s~弹药,但你没有那个武器',
+ ['gave_account_money'] = '你将 ~g~$%s~s~ (%s) 给予 ~y~%s~s~',
+ ['received_account_money'] = '你收到了~g~$%s~s~ (%s) 来自 ~b~%s~s~',
+ ['amount_invalid'] = '无效数量',
+ ['players_nearby'] = '附近没有玩家',
+ ['ex_inv_lim'] = '操作失败, 超过~y~%s~s~的物品栏限制',
+ ['imp_invalid_quantity'] = '操作失败,无效数量',
+ ['imp_invalid_amount'] = '操作失败,无效金额',
+ ['threw_standard'] = '你丢弃了~y~%sx~s~~b~%s~s~',
+ ['threw_account'] = '你丢弃了~g~$%s~s~~b~%s~s~',
+ ['threw_weapon'] = '你丢弃了~b~%s~s~',
+ ['threw_weapon_ammo'] = '你丢弃了~b~%s~s~和~o~%sx%s~s~',
+ ['threw_weapon_already'] = '你已经有同样的武器了',
+ ['threw_cannot_pickup'] = '你不能再拿起那个了,因为你的库存已经满了',
+ ['threw_pickup_prompt'] = '按 ~y~E~s~ 拿起',
+
+ -- Key mapping
+ ['keymap_showinventory'] = '显示库存',
+
+ -- Salary related
+ ['received_salary'] = '你收到了你的工资: ~g~$%s~s~',
+ ['received_help'] = '你领取到了你的失业救济金: ~g~$%s~s~',
+ ['company_nomoney'] = '你受雇的公司太穷了,无法支付你的工资。',
+ ['received_paycheck'] = '收到转账',
+ ['bank'] = '花园银行',
+ ['account_bank'] = '银行',
+ ['account_black_money'] = '黑钱',
+ ['account_money'] = '现金',
+
+ ['act_imp'] = '操作失败',
+ ['in_vehicle'] = '请离开载具',
+
+ -- Commands
+ ['command_car'] = '生成载具',
+ ['command_car_car'] = '生成载具的模型名称或哈希值',
+ ['command_cardel'] = '删除附近的载具',
+ ['command_cardel_radius'] = '可选,删除指定半径内的所有车辆',
+ ['command_clear'] = '清除聊天记录',
+ ['command_clearall'] = '清除所有玩家的聊天记录',
+ ['command_clearinventory'] = '清除玩家库存',
+ ['command_clearloadout'] = '清除玩家皮肤',
+ ['command_giveaccountmoney'] = '给帐户钱',
+ ['command_giveaccountmoney_account'] = '有效的帐户名',
+ ['command_giveaccountmoney_amount'] = '添加的数量',
+ ['command_giveaccountmoney_invalid'] = '无效的帐户名',
+ ['command_giveitem'] = '给玩家一件物品',
+ ['command_giveitem_item'] = '物品名称',
+ ['command_giveitem_count'] = '物品数目',
+ ['command_giveweapon'] = '给玩家一件武器',
+ ['command_giveweapon_weapon'] = '武器名称',
+ ['command_giveweapon_ammo'] = '弹药数目',
+ ['command_giveweapon_hasalready'] = '该玩家已经拥有该武器',
+ ['command_giveweaponcomponent'] = '给武器配件',
+ ['command_giveweaponcomponent_component'] = '配件名称',
+ ['command_giveweaponcomponent_invalid'] = '无效的武器配件',
+ ['command_giveweaponcomponent_hasalready'] = '玩家已经拥有该武器配件',
+ ['command_giveweaponcomponent_missingweapon'] = '该玩家没有那个武器',
+ ['command_save'] = '保存玩家数据至数据库',
+ ['command_saveall'] = '保存所有玩家数据至数据库',
+ ['command_setaccountmoney'] = '为玩家设置帐户资金',
+ ['command_setaccountmoney_amount'] = '要设定的金额',
+ ['command_setcoords'] = '传送到坐标',
+ ['command_setcoords_x'] = 'x 轴',
+ ['command_setcoords_y'] = 'y 轴',
+ ['command_setcoords_z'] = 'z 轴',
+ ['command_setjob'] = '为玩家设定工作',
+ ['command_setjob_job'] = '工作名称',
+ ['command_setjob_grade'] = '工作等级',
+ ['command_setjob_invalid'] = '工作、等级或两者都无效',
+ ['command_setgroup'] = '设置玩家用户组',
+ ['command_setgroup_group'] = '用户组名称',
+ ['commanderror_argumentmismatch'] = '参数计数不匹配(该类型为%s, 需要传递 %s)',
+ ['commanderror_argumentmismatch_number'] = '参数 #%s 类型不匹配(该类型为字符串,需要传递数字类型)',
+ ['commanderror_invaliditem'] = '无效的物品名称',
+ ['commanderror_invalidweapon'] = '无效武器',
+ ['commanderror_console'] = '该命令不能从控制台运行',
+ ['commanderror_invalidcommand'] = '^3%s^0 不是有效的命令!',
+ ['commanderror_invalidplayerid'] = '没有在线玩家匹配到该服务id',
+ ['commandgeneric_playerid'] = '玩家id',
+
+ -- Locale settings
+ ['locale_digit_grouping_symbol'] = ',',
+ ['locale_currency'] = '$%s',
+
+ -- Weapons
+ ['weapon_knife'] = '小刀',
+ ['weapon_nightstick'] = '警棍',
+ ['weapon_hammer'] = '铁锤',
+ ['weapon_bat'] = '棒球棍',
+ ['weapon_golfclub'] = '高尔夫球杆',
+ ['weapon_crowbar'] = '撬棍',
+ ['weapon_pistol'] = '手枪',
+ ['weapon_combatpistol'] = '战斗手枪',
+ ['weapon_appistol'] = '穿甲手枪',
+ ['weapon_pistol50'] = '0.5 口径手枪',
+ ['weapon_microsmg'] = '微型冲锋枪',
+ ['weapon_smg'] = '冲锋枪',
+ ['weapon_assaultsmg'] = '突击冲锋枪',
+ ['weapon_assaultrifle'] = '突击步枪',
+ ['weapon_carbinerifle'] = '卡宾步枪',
+ ['weapon_advancedrifle'] = '高级步枪',
+ ['weapon_mg'] = '机枪',
+ ['weapon_combatmg'] = '战斗机枪',
+ ['weapon_pumpshotgun'] = '泵动式霰弹枪',
+ ['weapon_sawnoffshotgun'] = '短管霰弹枪',
+ ['weapon_assaultshotgun'] = '突击霰弹枪',
+ ['weapon_bullpupshotgun'] = '无托式霰弹枪',
+ ['weapon_stungun'] = '电击枪',
+ ['weapon_sniperrifle'] = '狙击步枪',
+ ['weapon_heavysniper'] = '重型狙击步枪',
+ ['weapon_grenadelauncher'] = '榴弹发射器',
+ ['weapon_rpg'] = '火箭炮',
+ ['weapon_minigun'] = '火神机枪',
+ ['weapon_grenade'] = '手榴弹',
+ ['weapon_stickybomb'] = '黏弹',
+ ['weapon_smokegrenade'] = '烟雾弹',
+ ['weapon_bzgas'] = '催泪瓦斯',
+ ['weapon_molotov'] = '汽油弹',
+ ['weapon_fireextinguisher'] = '灭火器',
+ ['weapon_petrolcan'] = '汽油桶',
+ ['weapon_ball'] = '棒球',
+ ['weapon_snspistol'] = '劣质手枪',
+ ['weapon_bottle'] = '酒瓶',
+ ['weapon_gusenberg'] = '古森柏冲锋枪',
+ ['weapon_specialcarbine'] = '特制卡宾枪',
+ ['weapon_heavypistol'] = '重型手枪',
+ ['weapon_bullpuprifle'] = '无托式步枪',
+ ['weapon_dagger'] = '匕首',
+ ['weapon_vintagepistol'] = '老式手枪',
+ ['weapon_firework'] = '烟花发射器',
+ ['weapon_musket'] = '老式火枪',
+ ['weapon_heavyshotgun'] = '重型霰弹枪',
+ ['weapon_marksmanrifle'] = '射手步枪',
+ ['weapon_hominglauncher'] = '制导火箭发射器',
+ ['weapon_proxmine'] = '感应地雷',
+ ['weapon_snowball'] = '雪球',
+ ['weapon_flaregun'] = '信号枪',
+ ['weapon_combatpdw'] = '作战自卫冲锋枪',
+ ['weapon_marksmanpistol'] = '射手手枪',
+ ['weapon_knuckle'] = '手指虎',
+ ['weapon_hatchet'] = '手斧',
+ ['weapon_railgun'] = '电磁轨道炮',
+ ['weapon_machete'] = '开山刀',
+ ['weapon_machinepistol'] = '冲锋手枪',
+ ['weapon_switchblade'] = '弹簧刀',
+ ['weapon_revolver'] = '重型左轮手枪',
+ ['weapon_dbshotgun'] = '双管霰弹枪',
+ ['weapon_compactrifle'] = '紧凑型步枪',
+ ['weapon_autoshotgun'] = '半自动霰弹枪',
+ ['weapon_battleaxe'] = '战斧',
+ ['weapon_compactlauncher'] = '紧凑型榴弹发射器',
+ ['weapon_minismg'] = '迷你冲锋枪',
+ ['weapon_pipebomb'] = '土制炸弹',
+ ['weapon_poolcue'] = '台球杆',
+ ['weapon_wrench'] = '管钳扳手',
+ ['weapon_flashlight'] = '手电筒',
+ ['gadget_parachute'] = '降落伞',
+ ['weapon_flare'] = '信号棒',
+ ['weapon_doubleaction'] = '双动式左轮手枪',
+
+ -- Weapon Components
+ ['component_clip_default'] = '默认弹夹',
+ ['component_clip_extended'] = '扩容弹夹',
+ ['component_clip_drum'] = '鼓式弹夹',
+ ['component_clip_box'] = '盒型弹匣',
+ ['component_flashlight'] = '手电筒',
+ ['component_scope'] = '瞄准镜',
+ ['component_scope_advanced'] = '高级瞄准镜',
+ ['component_suppressor'] = '消音器',
+ ['component_grip'] = '握把',
+ ['component_luxary_finish'] = '奢华涂饰',
+
+ -- Weapon Ammo
+ ['ammo_rounds'] = '发(子弹)',
+ ['ammo_shells'] = '发(子弹)',
+ ['ammo_charge'] = '喷',
+ ['ammo_petrol'] = '加仑(燃料)',
+ ['ammo_firework'] = '发(烟花弹)',
+ ['ammo_rockets'] = '枚(火箭弹)',
+ ['ammo_grenadelauncher'] = '发(榴弹)',
+ ['ammo_grenade'] = '枚(手榴弹)',
+ ['ammo_stickybomb'] = '枚(炸弹)',
+ ['ammo_pipebomb'] = '枚(炸弹)',
+ ['ammo_smokebomb'] = '枚(炸弹)',
+ ['ammo_molotov'] = '瓶(汽油瓶)',
+ ['ammo_proxmine'] = '个(地雷)',
+ ['ammo_bzgas'] = '罐',
+ ['ammo_ball'] = '个(球)',
+ ['ammo_snowball'] = '个(雪球)',
+ ['ammo_flare'] = '根(信号棒)',
+ ['ammo_flaregun'] = '发(信号弹)',
+
+ -- Weapon Tints
+ ['tint_default'] = '默认色调',
+ ['tint_green'] = '绿色调',
+ ['tint_gold'] = '金色调',
+ ['tint_pink'] = '粉色调',
+ ['tint_army'] = '军用色调',
+ ['tint_lspd'] = '洛圣都警局色调',
+ ['tint_orange'] = '橙色调',
+ ['tint_platinum'] = '铂金色调',
+}
diff --git a/[esx]/es_extended/locales/sv.lua b/[esx]/es_extended/locales/sv.lua
new file mode 100644
index 00000000..25c682f0
--- /dev/null
+++ b/[esx]/es_extended/locales/sv.lua
@@ -0,0 +1,225 @@
+Locales['sv'] = {
+ -- Inventory
+ ['inventory'] = 'mitt förråd %s / %s',
+ ['use'] = 'använd',
+ ['give'] = 'ge',
+ ['remove'] = 'kasta',
+ ['return'] = 'gå tillbaka',
+ ['give_to'] = 'ge till',
+ ['amount'] = 'antal',
+ ['giveammo'] = 'ge ammunition',
+ ['amountammo'] = 'mängd ammunition',
+ ['noammo'] = 'du har inte tillräckligt med ammunition!',
+ ['gave_item'] = 'du gav ~y~%sx~s~ ~b~%s~s~ till ~y~%s~s~',
+ ['received_item'] = 'du tog emot ~y~%sx~s~ ~b~%s~s~ från ~b~%s~s~',
+ ['gave_weapon'] = 'du gav ~b~%s~s~ till ~y~%s~s~',
+ ['gave_weapon_ammo'] = 'du gav ~o~%sx %s~s~ för ~b~%s~s~ till ~y~%s~s~',
+ ['gave_weapon_withammo'] = 'du gav ~b~%s~s~ med ~o~%sx %s~s~ till ~y~%s~s~',
+ ['gave_weapon_hasalready'] = '~y~%s~s~ har redan en ~y~%s~s~',
+ ['gave_weapon_noweapon'] = '~y~%s~s~ har inte det vapnet',
+ ['received_weapon'] = 'du tog emot ~b~%s~s~ från ~b~%s~s~',
+ ['received_weapon_ammo'] = 'du tog emot ~o~%sx %s~s~ för ~b~%s~s~ från ~b~%s~s~',
+ ['received_weapon_withammo'] = 'du tog emot ~b~%s~s~ med ~o~%sx %s~s~ från ~b~%s~s~',
+ ['received_weapon_hasalready'] = '~b~%s~s~ försökte ge dig en ~y~%s~s~, men det vapnet har du redan',
+ ['received_weapon_noweapon'] = '~b~%s~s~ försökte ge dig ammunition för ett ~y~%s~s~, men du har inget sådant vapen',
+ ['gave_account_money'] = 'du gav ~g~%s SEK~s~ (%s) till ~y~%s~s~',
+ ['received_account_money'] = 'du tog emot ~g~%s SEK~s~ (%s) från ~b~%s~s~',
+ ['amount_invalid'] = 'ogiltig mängd',
+ ['players_nearby'] = 'det finns inga spelare nära',
+ ['ex_inv_lim'] = 'åtgärd inte möjligt, översteg förråd gräns för ~y~%s~s~',
+ ['imp_invalid_quantity'] = 'åtgärd omöjlig, ogiltig mängd',
+ ['imp_invalid_amount'] = 'åtgärd omöjlig, ogiltig belopp',
+ ['threw_standard'] = 'du kastade ~y~%sx~s~ ~b~%s~s~',
+ ['threw_account'] = 'du kastade ~g~%s SEK~s~ ~b~%s~s~',
+ ['threw_weapon'] = 'du kastade ~b~%s~s~',
+ ['threw_weapon_ammo'] = 'du kastade ~b~%s~s~ med ~o~%sx %s~s~',
+ ['threw_weapon_already'] = 'du har redan ett sådant vapen på dig',
+ ['threw_cannot_pickup'] = 'du kan inte plocka upp det på grund av att det kommer ej få plats i ditt förråd!',
+ ['threw_pickup_prompt'] = 'tryck ~y~E~s~ för att plocka upp',
+
+ -- Key mapping
+ ['keymap_showinventory'] = 'öppna inventory',
+
+ -- Salary related
+ ['received_salary'] = 'du har mottagit din lön på ~g~%s SEK~s~',
+ ['received_help'] = 'du har mottagit bidrag på ~g~%s SEK~s~',
+ ['company_nomoney'] = 'företaget du är anställt hos har inte råd att betala ut din lön',
+ ['received_paycheck'] = 'mottagit lön',
+ ['bank'] = 'bank',
+ ['account_bank'] = 'bank',
+ ['account_black_money'] = 'svarta pengar',
+ ['account_money'] = 'kontakter',
+
+ ['act_imp'] = 'åtgärd omöjlig',
+ ['in_vehicle'] = 'du kan inte ge saker till en som sitter i ett fordon!',
+
+ -- Commands
+ ['command_car'] = 'spawna ett fordon',
+ ['command_car_car'] = 'namn på fordon eller hash',
+ ['command_cardel'] = 'radera fordon i närheten',
+ ['command_cardel_radius'] = 'valfri, radera alla fordon inom den angivna radien',
+ ['command_clear'] = 'töm chatten',
+ ['command_clearall'] = 'töm chatten för alla spelare',
+ ['command_clearinventory'] = 'töm en spelares inventory',
+ ['command_clearloadout'] = 'töm en spelares loadout',
+ ['command_giveaccountmoney'] = 'ge pengar för ett konto',
+ ['command_giveaccountmoney_account'] = 'giltigt kontonamn',
+ ['command_giveaccountmoney_amount'] = 'mängd att ge',
+ ['command_giveaccountmoney_invalid'] = 'kontonamnet är ej giltigt',
+ ['command_giveitem'] = 'ge ett item till en spelare',
+ ['command_giveitem_item'] = 'itemnamn',
+ ['command_giveitem_count'] = 'mängd av itemet',
+ ['command_giveweapon'] = 'ge ett vapen till en spelare',
+ ['command_giveweapon_weapon'] = 'vapennamn',
+ ['command_giveweapon_ammo'] = 'hur mycket ammo att ge',
+ ['command_giveweapon_hasalready'] = 'spelaren har redan ett sådant vapen',
+ ['command_giveweaponcomponent'] = 'ge vapen komponent',
+ ['command_giveweaponcomponent_component'] = 'vapenkomponent',
+ ['command_giveweaponcomponent_invalid'] = 'det vapenkomponentet är ej giltigt',
+ ['command_giveweaponcomponent_hasalready'] = 'spelaren har redan det vapenkomponent',
+ ['command_giveweaponcomponent_missingweapon'] = 'spelaren har ej det vapnet',
+ ['command_save'] = 'spara en spelare i databas',
+ ['command_saveall'] = 'spara alla spelare i databas',
+ ['command_setaccountmoney'] = 'bestäm ny balans på ett spelarkonto',
+ ['command_setaccountmoney_amount'] = 'ny balans',
+ ['command_setcoords'] = 'teleportera till koordinater',
+ ['command_setcoords_x'] = 'x axel',
+ ['command_setcoords_y'] = 'y axel',
+ ['command_setcoords_z'] = 'z axel',
+ ['command_setjob'] = 'välj jobb för en spelare',
+ ['command_setjob_job'] = 'jobbnamn',
+ ['command_setjob_grade'] = 'jobbnivå',
+ ['command_setjob_invalid'] = 'jobbet, nivån eller båda är ej giltiga',
+ ['command_setgroup'] = 'välj grupp åt en spelare',
+ ['command_setgroup_group'] = 'gruppnamn',
+ ['commanderror_argumentmismatch'] = 'argumentstorlek mismatch (gav %s, ville ha %s)',
+ ['commanderror_argumentmismatch_number'] = 'argument #%s typ mismatch (gav string, ville ha number)',
+ ['commanderror_invaliditem'] = 'ej giltigt item',
+ ['commanderror_invalidweapon'] = 'ej giltigt vapen',
+ ['commanderror_console'] = 'detta kommando kan ej executas i konsol',
+ ['commanderror_invalidcommand'] = '^3%s^0 är inte ett giltigt kommando!',
+ ['commanderror_invalidplayerid'] = 'det finns ingen spelare som matchar det angivna server id',
+ ['commandgeneric_playerid'] = 'spelarid',
+
+ -- Locale settings
+ ['locale_digit_grouping_symbol'] = ' ',
+ ['locale_currency'] = '%s SEK',
+
+ -- Weapons
+ ['weapon_knife'] = 'kniv',
+ ['weapon_nightstick'] = 'batong',
+ ['weapon_hammer'] = 'hammare',
+ ['weapon_bat'] = 'slagträ',
+ ['weapon_golfclub'] = 'golf club',
+ ['weapon_crowbar'] = 'kofot',
+ ['weapon_pistol'] = 'pistol',
+ ['weapon_combatpistol'] = 'combat pistol',
+ ['weapon_appistol'] = 'ap pistol',
+ ['weapon_pistol50'] = 'pistol .50',
+ ['weapon_microsmg'] = 'micro smg',
+ ['weapon_smg'] = 'smg',
+ ['weapon_assaultsmg'] = 'assault smg',
+ ['weapon_assaultrifle'] = 'assault rifle',
+ ['weapon_carbinerifle'] = 'carbine rifle',
+ ['weapon_advancedrifle'] = 'advanced rifle',
+ ['weapon_mg'] = 'mg',
+ ['weapon_combatmg'] = 'combat mg',
+ ['weapon_pumpshotgun'] = 'pump shotgun',
+ ['weapon_sawnoffshotgun'] = 'sawed off shotgun',
+ ['weapon_assaultshotgun'] = 'assault shotgun',
+ ['weapon_bullpupshotgun'] = 'bullpup shotgun',
+ ['weapon_stungun'] = 'elchockpistol',
+ ['weapon_sniperrifle'] = 'prickskyttegevär',
+ ['weapon_heavysniper'] = 'tung prickskytt',
+ ['weapon_grenadelauncher'] = 'granatkastare',
+ ['weapon_rpg'] = 'raketgevär',
+ ['weapon_minigun'] = 'minigun',
+ ['weapon_grenade'] = 'granat',
+ ['weapon_stickybomb'] = 'klibbig bomb',
+ ['weapon_smokegrenade'] = 'rökgranat',
+ ['weapon_bzgas'] = 'bz gas',
+ ['weapon_molotov'] = 'molotov cocktail',
+ ['weapon_fireextinguisher'] = 'brandsläckare',
+ ['weapon_petrolcan'] = 'bensindunk',
+ ['weapon_ball'] = 'boll',
+ ['weapon_snspistol'] = 'sns pistol',
+ ['weapon_bottle'] = 'flaska',
+ ['weapon_gusenberg'] = 'gusenberg sweeper',
+ ['weapon_specialcarbine'] = 'special carbine',
+ ['weapon_heavypistol'] = 'heavy pistol',
+ ['weapon_bullpuprifle'] = 'bullpup rifle',
+ ['weapon_dagger'] = 'dolk',
+ ['weapon_vintagepistol'] = 'vintage pistol',
+ ['weapon_firework'] = 'fyrverkeriraket',
+ ['weapon_musket'] = 'musköt',
+ ['weapon_heavyshotgun'] = 'heavy shotgun',
+ ['weapon_marksmanrifle'] = 'marksman rifle',
+ ['weapon_hominglauncher'] = 'homing launcher',
+ ['weapon_proxmine'] = 'proximity mine',
+ ['weapon_snowball'] = 'snöboll',
+ ['weapon_flaregun'] = 'signalpistol',
+ ['weapon_combatpdw'] = 'combat pdw',
+ ['weapon_marksmanpistol'] = 'marksman pistol',
+ ['weapon_knuckle'] = 'knogjärn',
+ ['weapon_hatchet'] = 'yxa',
+ ['weapon_railgun'] = 'railgun',
+ ['weapon_machete'] = 'machete',
+ ['weapon_machinepistol'] = 'machine pistol',
+ ['weapon_switchblade'] = 'switchblade',
+ ['weapon_revolver'] = 'heavy revolver',
+ ['weapon_dbshotgun'] = 'double barrel shotgun',
+ ['weapon_compactrifle'] = 'compact rifle',
+ ['weapon_autoshotgun'] = 'auto shotgun',
+ ['weapon_battleaxe'] = 'stridsyxa',
+ ['weapon_compactlauncher'] = 'compact launcher',
+ ['weapon_minismg'] = 'mini smg',
+ ['weapon_pipebomb'] = 'pipe bomb',
+ ['weapon_poolcue'] = 'biljardkö',
+ ['weapon_wrench'] = 'skiftnyckel',
+ ['weapon_flashlight'] = 'ficklampa',
+ ['gadget_parachute'] = 'fallskärm',
+ ['weapon_flare'] = 'blossa',
+ ['weapon_doubleaction'] = 'double-Action Revolver',
+
+ -- Weapon Components
+ ['component_clip_default'] = 'standard magg',
+ ['component_clip_extended'] = 'förlängd magg',
+ ['component_clip_drum'] = 'trummagasin',
+ ['component_clip_box'] = 'lådmagasin',
+ ['component_flashlight'] = 'ficklampa',
+ ['component_scope'] = 'sikte',
+ ['component_scope_advanced'] = 'advancerat sikte',
+ ['component_suppressor'] = 'ljuddämpare',
+ ['component_grip'] = 'handtag',
+ ['component_luxary_finish'] = 'lyxvapen behandling',
+
+ -- Weapon Ammo
+ ['ammo_rounds'] = 'ammunition',
+ ['ammo_shells'] = 'hagel',
+ ['ammo_charge'] = 'laddning',
+ ['ammo_petrol'] = 'liter bensin',
+ ['ammo_firework'] = 'fyrverkeri',
+ ['ammo_rockets'] = 'raket',
+ ['ammo_grenadelauncher'] = 'granat(er)',
+ ['ammo_grenade'] = 'granat(er)',
+ ['ammo_stickybomb'] = 'bomb(er)',
+ ['ammo_pipebomb'] = 'bomb(er)',
+ ['ammo_smokebomb'] = 'bomb(er)',
+ ['ammo_molotov'] = 'cocktail(s)',
+ ['ammo_proxmine'] = 'bomb(er)',
+ ['ammo_bzgas'] = 'burk(ar)',
+ ['ammo_ball'] = 'boll(ar)',
+ ['ammo_snowball'] = 'snöboll(ar)',
+ ['ammo_flare'] = 'lysraket(er)',
+ ['ammo_flaregun'] = 'lysraket(er)',
+
+ -- Weapon Tints
+ ['tint_default'] = 'standardutseende',
+ ['tint_green'] = 'grönskinn',
+ ['tint_gold'] = 'guldskinn',
+ ['tint_pink'] = 'råsaskinn',
+ ['tint_army'] = 'arméskinn',
+ ['tint_lspd'] = 'blåskinn',
+ ['tint_orange'] = 'orangeskinn',
+ ['tint_platinum'] = 'platinaskinn',
+}
diff --git a/[esx]/es_extended/locales/tc.lua b/[esx]/es_extended/locales/tc.lua
new file mode 100644
index 00000000..663259fb
--- /dev/null
+++ b/[esx]/es_extended/locales/tc.lua
@@ -0,0 +1,225 @@
+Locales['tc'] = {
+ -- Inventory
+ ['inventory'] = '背包 %s / %s',
+ ['use'] = '使用',
+ ['give'] = '給',
+ ['remove'] = '丟棄',
+ ['return'] = '返回',
+ ['give_to'] = '給予',
+ ['amount'] = '數量',
+ ['giveammo'] = '給予子彈',
+ ['amountammo'] = '子彈量',
+ ['noammo'] = '您沒有足夠的子彈!',
+ ['gave_item'] = '您把~y~%sx~s~~b~%s~s~給予了~y~%s~s~',
+ ['received_item'] = '您收到~y~%sx~s~~b~%s~s~,來自~b~%s~s~',
+ ['gave_weapon'] = '您把~b~%s~s~給予了~y~%s~s~',
+ ['gave_weapon_ammo'] = '您把~o~%sx~s~~b~%s~s~ %s~s~給予了~y~%s~s~',
+ ['gave_weapon_withammo'] = '您把~b~%s~s~和~o~%sx~s~ %s~s~給予了~y~%s~s~',
+ ['gave_weapon_hasalready'] = '~y~%s~s~已經有~y~%s~s~',
+ ['gave_weapon_noweapon'] = '~y~%s~s~沒有那把武器',
+ ['received_weapon'] = '您收到了~b~%s~s~,來自~b~%s~s~',
+ ['received_weapon_ammo'] = '您收到了~o~%sx~s~ %s~s~(~b~%s~s~),來自~b~%s~s~',
+ ['received_weapon_withammo'] = '您收到了~b~%s~s~和~o~%sx~s~ %s~s~,來自~b~%s~s~',
+ ['received_weapon_hasalready'] = '~b~%s~s~嘗試给您~y~%s~s~,但您已经有了',
+ ['received_weapon_noweapon'] = '~b~%s~s~嘗試给您~y~%s~s~子彈,但是您沒有那把武器',
+ ['gave_account_money'] = '您將 ~g~$%s~s~ (%s) 给予 ~y~%s~s~',
+ ['received_account_money'] = '您收到了~g~$%s~s~ (%s) 来自 ~b~%s~s~',
+ ['amount_invalid'] = '無效的數量',
+ ['players_nearby'] = '附近沒有玩家',
+ ['ex_inv_lim'] = '操作失敗, 超過~y~%s~s~物品欄位的限制',
+ ['imp_invalid_quantity'] = '操作失敗,無效的數量',
+ ['imp_invalid_amount'] = '操作失敗,無效的金額',
+ ['threw_standard'] = '您丟棄了~y~%sx~s~~b~%s~s~',
+ ['threw_account'] = '您丟棄了~g~$%s~s~~b~%s~s~',
+ ['threw_weapon'] = '您丟棄了~b~%s~s~',
+ ['threw_weapon_ammo'] = '您丟棄了~b~%s~s~和~o~%sx%s~s~',
+ ['threw_weapon_already'] = '您已經有相同的武器了',
+ ['threw_cannot_pickup'] = '您不能再撿起該物品,因為您的背包已經滿了',
+ ['threw_pickup_prompt'] = '按下 ~y~E~s~ 撿起',
+
+ -- Key mapping
+ ['keymap_showinventory'] = '顯示背包',
+
+ -- Salary related
+ ['received_salary'] = '您收到您的薪水: ~g~$%s~s~',
+ ['received_help'] = '你領取到了你的失業救濟金: ~g~$%s~s~',
+ ['company_nomoney'] = '您的公司太窮了,無法給予您薪水。',
+ ['received_paycheck'] = '收到轉帳',
+ ['bank'] = '花園銀行',
+ ['account_bank'] = '銀行',
+ ['account_black_money'] = '黑錢',
+ ['account_money'] = '現金',
+
+ ['act_imp'] = '操作失敗',
+ ['in_vehicle'] = '請離開載具',
+
+ -- Commands
+ ['command_car'] = '生成載具',
+ ['command_car_car'] = '生成載具的模型名稱或希哈值',
+ ['command_cardel'] = '刪除附近的載具',
+ ['command_cardel_radius'] = '可選擇,刪除指定半徑內的所有車輛',
+ ['command_clear'] = '清除聊天紀錄',
+ ['command_clearall'] = '清除所有玩家的聊天紀錄',
+ ['command_clearinventory'] = '清除玩家背包',
+ ['command_clearloadout'] = '清除玩家人物造型',
+ ['command_giveaccountmoney'] = '給予帳戶錢',
+ ['command_giveaccountmoney_account'] = '有效的帳戶名稱',
+ ['command_giveaccountmoney_amount'] = '添加的數量',
+ ['command_giveaccountmoney_invalid'] = '無效的帳戶名稱',
+ ['command_giveitem'] = '給玩家一個物品',
+ ['command_giveitem_item'] = '物品名稱',
+ ['command_giveitem_count'] = '物品數量',
+ ['command_giveweapon'] = '给玩家一把武器',
+ ['command_giveweapon_weapon'] = '武器名稱',
+ ['command_giveweapon_ammo'] = '子彈數量',
+ ['command_giveweapon_hasalready'] = '該玩家已經擁有了該武器',
+ ['command_giveweaponcomponent'] = '給予武器配件',
+ ['command_giveweaponcomponent_component'] = '配件名稱',
+ ['command_giveweaponcomponent_invalid'] = '無效的武器配件',
+ ['command_giveweaponcomponent_hasalready'] = '該玩家已經擁有了武器配件',
+ ['command_giveweaponcomponent_missingweapon'] = '該玩家沒有那把武器',
+ ['command_save'] = '保存玩家數據至資料庫',
+ ['command_saveall'] = '保存所有玩家數據至資料庫',
+ ['command_setaccountmoney'] = '為玩家設置賬戶資金',
+ ['command_setaccountmoney_amount'] = '要設置的金額',
+ ['command_setcoords'] = '傳送到座標上',
+ ['command_setcoords_x'] = 'x 軸',
+ ['command_setcoords_y'] = 'y 軸',
+ ['command_setcoords_z'] = 'z 軸',
+ ['command_setjob'] = '設定該玩家職業',
+ ['command_setjob_job'] = '職業名稱',
+ ['command_setjob_grade'] = '職業階級',
+ ['command_setjob_invalid'] = '職業、階級或者兩者都無效',
+ ['command_setgroup'] = '設定玩家群組階級',
+ ['command_setgroup_group'] = '玩家群組階級名稱',
+ ['commanderror_argumentmismatch'] = '參數數量不正確(該類型為%s, 需要給予 %s)',
+ ['commanderror_argumentmismatch_number'] = '參數 #%s 類型不匹配(該類型為字串,需要給予的數字類型)',
+ ['commanderror_invaliditem'] = '無效的物品名稱',
+ ['commanderror_invalidweapon'] = '無效武器',
+ ['commanderror_console'] = '該指令不能從控制台執行',
+ ['commanderror_invalidcommand'] = '^3%s^0 不是有效的指令!',
+ ['commanderror_invalidplayerid'] = '無效的玩家ID',
+ ['commandgeneric_playerid'] = '玩家id',
+
+ -- Locale settings
+ ['locale_digit_grouping_symbol'] = ',',
+ ['locale_currency'] = '$%s',
+
+ -- Weapons
+ ['weapon_knife'] = '刀',
+ ['weapon_nightstick'] = '警棍',
+ ['weapon_hammer'] = '錘子',
+ ['weapon_bat'] = '棒球棍',
+ ['weapon_golfclub'] = '高爾夫球棍',
+ ['weapon_crowbar'] = '撬棍',
+ ['weapon_pistol'] = '手槍',
+ ['weapon_combatpistol'] = '戰鬥手槍',
+ ['weapon_appistol'] = '穿甲手槍',
+ ['weapon_pistol50'] = '.50口徑手槍',
+ ['weapon_microsmg'] = '迷你衝鋒槍',
+ ['weapon_smg'] = '衝鋒槍',
+ ['weapon_assaultsmg'] = '突擊衝鋒槍',
+ ['weapon_assaultrifle'] = '突擊步槍',
+ ['weapon_carbinerifle'] = '卡賓槍步槍',
+ ['weapon_advancedrifle'] = '精準步槍',
+ ['weapon_mg'] = '機槍',
+ ['weapon_combatmg'] = '戰鬥機槍',
+ ['weapon_pumpshotgun'] = '霰彈槍',
+ ['weapon_sawnoffshotgun'] = '削短型霰彈槍',
+ ['weapon_assaultshotgun'] = '突擊霰彈槍',
+ ['weapon_bullpupshotgun'] = '泵動式霰彈槍',
+ ['weapon_stungun'] = '電擊槍',
+ ['weapon_sniperrifle'] = '狙擊步槍',
+ ['weapon_heavysniper'] = '重型狙擊槍',
+ ['weapon_grenadelauncher'] = '榴彈砲',
+ ['weapon_rpg'] = '火箭炮',
+ ['weapon_minigun'] = '火神機槍',
+ ['weapon_grenade'] = '手榴彈',
+ ['weapon_stickybomb'] = '黏彈',
+ ['weapon_smokegrenade'] = '煙霧彈',
+ ['weapon_bzgas'] = '催淚瓦斯',
+ ['weapon_molotov'] = '汽油彈',
+ ['weapon_fireextinguisher'] = '滅火器',
+ ['weapon_petrolcan'] = '汽油桶',
+ ['weapon_ball'] = '棒球',
+ ['weapon_snspistol'] = '劣質手槍',
+ ['weapon_bottle'] = '酒瓶',
+ ['weapon_gusenberg'] = '古森柏衝鋒槍',
+ ['weapon_specialcarbine'] = '特製卡賓槍',
+ ['weapon_heavypistol'] = '重型手槍',
+ ['weapon_bullpuprifle'] = 'AUG突擊步槍',
+ ['weapon_dagger'] = '匕首',
+ ['weapon_vintagepistol'] = '老式手槍',
+ ['weapon_firework'] = '煙火發射器',
+ ['weapon_musket'] = '老式火槍',
+ ['weapon_heavyshotgun'] = '重型霰彈槍',
+ ['weapon_marksmanrifle'] = '精確射手步槍',
+ ['weapon_hominglauncher'] = '火箭彈發射器',
+ ['weapon_proxmine'] = '感應地雷',
+ ['weapon_snowball'] = '雪球',
+ ['weapon_flaregun'] = '信號槍',
+ ['weapon_combatpdw'] = '戰鬥自衛衝鋒槍',
+ ['weapon_marksmanpistol'] = '神射手槍',
+ ['weapon_knuckle'] = '指虎',
+ ['weapon_hatchet'] = '斧頭',
+ ['weapon_railgun'] = '電磁軌彈炮',
+ ['weapon_machete'] = '開山刀',
+ ['weapon_machinepistol'] = '衝鋒手槍',
+ ['weapon_switchblade'] = '蝴蝶刀',
+ ['weapon_revolver'] = '重左輪手槍',
+ ['weapon_dbshotgun'] = '雙槍霰彈槍',
+ ['weapon_compactrifle'] = '半自動步槍',
+ ['weapon_autoshotgun'] = '半自動霰彈槍',
+ ['weapon_battleaxe'] = '戰斧',
+ ['weapon_compactlauncher'] = '精簡榴彈發射器',
+ ['weapon_minismg'] = '迷你衝鋒槍',
+ ['weapon_pipebomb'] = '土製炸彈',
+ ['weapon_poolcue'] = '桌球桿',
+ ['weapon_wrench'] = '扳手',
+ ['weapon_flashlight'] = '手電筒',
+ ['gadget_parachute'] = '降落傘',
+ ['weapon_flare'] = '信號棒',
+ ['weapon_doubleaction'] = '左輪手槍',
+
+ -- Weapon Components
+ ['component_clip_default'] = '默認彈夾',
+ ['component_clip_extended'] = '延伸彈夾',
+ ['component_clip_drum'] = '彈鼓式彈匣',
+ ['component_clip_box'] = '盒式彈匣',
+ ['component_flashlight'] = '手電筒',
+ ['component_scope'] = '瞄準鏡',
+ ['component_scope_advanced'] = '高級瞄準鏡',
+ ['component_suppressor'] = '消音管',
+ ['component_grip'] = '握把',
+ ['component_luxary_finish'] = '豪華塗裝',
+
+ -- Weapon Ammo
+ ['ammo_rounds'] = '發(子彈)',
+ ['ammo_shells'] = '發(子彈)',
+ ['ammo_charge'] = '噴',
+ ['ammo_petrol'] = '加崙(燃料)',
+ ['ammo_firework'] = '發(煙火子彈)',
+ ['ammo_rockets'] = '枚(火箭彈)',
+ ['ammo_grenadelauncher'] = '發(榴彈)',
+ ['ammo_grenade'] = '枚(手榴彈)',
+ ['ammo_stickybomb'] = '枚(炸彈)',
+ ['ammo_pipebomb'] = '枚(炸彈)',
+ ['ammo_smokebomb'] = '枚(炸彈)',
+ ['ammo_molotov'] = '瓶(汽油瓶)',
+ ['ammo_proxmine'] = '個(地雷)',
+ ['ammo_bzgas'] = '罐',
+ ['ammo_ball'] = '顆(球)',
+ ['ammo_snowball'] = '顆(雪球)',
+ ['ammo_flare'] = '根(信號棒)',
+ ['ammo_flaregun'] = '發(信號彈)',
+
+ -- Weapon Tints
+ ['tint_default'] = '默認色調',
+ ['tint_green'] = '綠色調',
+ ['tint_gold'] = '金色調',
+ ['tint_pink'] = '粉色調',
+ ['tint_army'] = '軍用色調',
+ ['tint_lspd'] = '洛聖都警察局色調',
+ ['tint_orange'] = '橘色調',
+ ['tint_platinum'] = '柏金色調',
+}
diff --git a/[esx]/es_extended/server/classes/player.lua b/[esx]/es_extended/server/classes/player.lua
new file mode 100644
index 00000000..148210b4
--- /dev/null
+++ b/[esx]/es_extended/server/classes/player.lua
@@ -0,0 +1,503 @@
+function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory, weight, job, loadout, name, coords)
+ local self = {}
+
+ self.accounts = accounts
+ self.coords = coords
+ self.group = group
+ self.identifier = identifier
+ self.inventory = inventory
+ self.job = job
+ self.loadout = loadout
+ self.name = name
+ self.playerId = playerId
+ self.source = playerId
+ self.variables = {}
+ self.weight = weight
+ self.maxWeight = Config.MaxWeight
+ if Config.Multichar then self.license = 'license'..string.sub(identifier, 6) else self.license = 'license:'..identifier end
+
+ ExecuteCommand(('add_principal identifier.%s group.%s'):format(self.license, self.group))
+
+ self.triggerEvent = function(eventName, ...)
+ TriggerClientEvent(eventName, self.source, ...)
+ end
+
+ self.setCoords = function(coords)
+ self.updateCoords(coords)
+ self.triggerEvent('esx:teleport', coords)
+ end
+
+ self.updateCoords = function(coords)
+ self.coords = {x = ESX.Math.Round(coords.x, 1), y = ESX.Math.Round(coords.y, 1), z = ESX.Math.Round(coords.z, 1), heading = ESX.Math.Round(coords.heading or 0.0, 1)}
+ end
+
+ self.getCoords = function(vector)
+ if vector then
+ return vector3(self.coords.x, self.coords.y, self.coords.z)
+ else
+ return self.coords
+ end
+ end
+
+ self.kick = function(reason)
+ DropPlayer(self.source, reason)
+ end
+
+ self.setMoney = function(money)
+ money = ESX.Math.Round(money)
+ self.setAccountMoney('money', money)
+ end
+
+ self.getMoney = function()
+ return self.getAccount('money').money
+ end
+
+ self.addMoney = function(money)
+ money = ESX.Math.Round(money)
+ self.addAccountMoney('money', money)
+ end
+
+ self.removeMoney = function(money)
+ money = ESX.Math.Round(money)
+ self.removeAccountMoney('money', money)
+ end
+
+ self.getIdentifier = function()
+ return self.identifier
+ end
+
+ self.setGroup = function(newGroup)
+ ExecuteCommand(('remove_principal identifier.%s group.%s'):format(self.license, self.group))
+ self.group = newGroup
+ ExecuteCommand(('add_principal identifier.%s group.%s'):format(self.license, self.group))
+ end
+
+ self.getGroup = function()
+ return self.group
+ end
+
+ self.set = function(k, v)
+ self.variables[k] = v
+ end
+
+ self.get = function(k)
+ return self.variables[k]
+ end
+
+ self.getAccounts = function(minimal)
+ if minimal then
+ local minimalAccounts = {}
+
+ for k,v in ipairs(self.accounts) do
+ minimalAccounts[v.name] = v.money
+ end
+
+ return minimalAccounts
+ else
+ return self.accounts
+ end
+ end
+
+ self.getAccount = function(account)
+ for k,v in ipairs(self.accounts) do
+ if v.name == account then
+ return v
+ end
+ end
+ end
+
+ self.getInventory = function(minimal)
+ if minimal then
+ local minimalInventory = {}
+
+ for k,v in ipairs(self.inventory) do
+ if v.count > 0 then
+ minimalInventory[v.name] = v.count
+ end
+ end
+
+ return minimalInventory
+ else
+ return self.inventory
+ end
+ end
+
+ self.getJob = function()
+ return self.job
+ end
+
+ self.getLoadout = function(minimal)
+ if minimal then
+ local minimalLoadout = {}
+
+ for k,v in ipairs(self.loadout) do
+ minimalLoadout[v.name] = {ammo = v.ammo}
+ if v.tintIndex > 0 then minimalLoadout[v.name].tintIndex = v.tintIndex end
+
+ if #v.components > 0 then
+ local components = {}
+
+ for k2,component in ipairs(v.components) do
+ if component ~= 'clip_default' then
+ table.insert(components, component)
+ end
+ end
+
+ if #components > 0 then
+ minimalLoadout[v.name].components = components
+ end
+ end
+ end
+
+ return minimalLoadout
+ else
+ return self.loadout
+ end
+ end
+
+ self.getName = function()
+ return self.name
+ end
+
+ self.setName = function(newName)
+ self.name = newName
+ end
+
+ self.setAccountMoney = function(accountName, money)
+ if money >= 0 then
+ local account = self.getAccount(accountName)
+
+ if account then
+ local prevMoney = account.money
+ local newMoney = ESX.Math.Round(money)
+ account.money = newMoney
+
+ self.triggerEvent('esx:setAccountMoney', account)
+ end
+ end
+ end
+
+ self.addAccountMoney = function(accountName, money)
+ if money > 0 then
+ local account = self.getAccount(accountName)
+
+ if account then
+ local newMoney = account.money + ESX.Math.Round(money)
+ account.money = newMoney
+
+ self.triggerEvent('esx:setAccountMoney', account)
+ end
+ end
+ end
+
+ self.removeAccountMoney = function(accountName, money)
+ if money > 0 then
+ local account = self.getAccount(accountName)
+
+ if account then
+ local newMoney = account.money - ESX.Math.Round(money)
+ account.money = newMoney
+
+ self.triggerEvent('esx:setAccountMoney', account)
+ end
+ end
+ end
+
+ self.getInventoryItem = function(name)
+ for k,v in ipairs(self.inventory) do
+ if v.name == name then
+ return v
+ end
+ end
+
+ return
+ end
+
+ self.addInventoryItem = function(name, count)
+ local item = self.getInventoryItem(name)
+
+ if item then
+ count = ESX.Math.Round(count)
+ item.count = item.count + count
+ self.weight = self.weight + (item.weight * count)
+
+ TriggerEvent('esx:onAddInventoryItem', self.source, item.name, item.count)
+ self.triggerEvent('esx:addInventoryItem', item.name, item.count)
+ end
+ end
+
+ self.removeInventoryItem = function(name, count)
+ local item = self.getInventoryItem(name)
+
+ if item then
+ count = ESX.Math.Round(count)
+ local newCount = item.count - count
+
+ if newCount >= 0 then
+ item.count = newCount
+ self.weight = self.weight - (item.weight * count)
+
+ TriggerEvent('esx:onRemoveInventoryItem', self.source, item.name, item.count)
+ self.triggerEvent('esx:removeInventoryItem', item.name, item.count)
+ end
+ end
+ end
+
+ self.setInventoryItem = function(name, count)
+ local item = self.getInventoryItem(name)
+
+ if item and count >= 0 then
+ count = ESX.Math.Round(count)
+
+ if count > item.count then
+ self.addInventoryItem(item.name, count - item.count)
+ else
+ self.removeInventoryItem(item.name, item.count - count)
+ end
+ end
+ end
+
+ self.getWeight = function()
+ return self.weight
+ end
+
+ self.getMaxWeight = function()
+ return self.maxWeight
+ end
+
+ self.canCarryItem = function(name, count)
+ local currentWeight, itemWeight = self.weight, ESX.Items[name].weight
+ local newWeight = currentWeight + (itemWeight * count)
+
+ return newWeight <= self.maxWeight
+ end
+
+ self.canSwapItem = function(firstItem, firstItemCount, testItem, testItemCount)
+ local firstItemObject = self.getInventoryItem(firstItem)
+ local testItemObject = self.getInventoryItem(testItem)
+
+ if firstItemObject.count >= firstItemCount then
+ local weightWithoutFirstItem = ESX.Math.Round(self.weight - (firstItemObject.weight * firstItemCount))
+ local weightWithTestItem = ESX.Math.Round(weightWithoutFirstItem + (testItemObject.weight * testItemCount))
+
+ return weightWithTestItem <= self.maxWeight
+ end
+
+ return false
+ end
+
+ self.setMaxWeight = function(newWeight)
+ self.maxWeight = newWeight
+ self.triggerEvent('esx:setMaxWeight', self.maxWeight)
+ end
+
+ self.setJob = function(job, grade)
+ grade = tostring(grade)
+ local lastJob = json.decode(json.encode(self.job))
+
+ if ESX.DoesJobExist(job, grade) then
+ local jobObject, gradeObject = ESX.Jobs[job], ESX.Jobs[job].grades[grade]
+
+ self.job.id = jobObject.id
+ self.job.name = jobObject.name
+ self.job.label = jobObject.label
+
+ self.job.grade = tonumber(grade)
+ self.job.grade_name = gradeObject.name
+ self.job.grade_label = gradeObject.label
+ self.job.grade_salary = gradeObject.salary
+
+ if gradeObject.skin_male then
+ self.job.skin_male = json.decode(gradeObject.skin_male)
+ else
+ self.job.skin_male = {}
+ end
+
+ if gradeObject.skin_female then
+ self.job.skin_female = json.decode(gradeObject.skin_female)
+ else
+ self.job.skin_female = {}
+ end
+
+ TriggerEvent('esx:setJob', self.source, self.job, lastJob)
+ self.triggerEvent('esx:setJob', self.job)
+ else
+ print(('[es_extended] [^3WARNING^7] Ignoring invalid .setJob() usage for "%s"'):format(self.identifier))
+ end
+ end
+
+ self.addWeapon = function(weaponName, ammo)
+ if not self.hasWeapon(weaponName) then
+ local weaponLabel = ESX.GetWeaponLabel(weaponName)
+
+ table.insert(self.loadout, {
+ name = weaponName,
+ ammo = ammo,
+ label = weaponLabel,
+ components = {},
+ tintIndex = 0
+ })
+
+ self.triggerEvent('esx:addWeapon', weaponName, ammo)
+ self.triggerEvent('esx:addInventoryItem', weaponLabel, false, true)
+ end
+ end
+
+ self.addWeaponComponent = function(weaponName, weaponComponent)
+ local loadoutNum, weapon = self.getWeapon(weaponName)
+
+ if weapon then
+ local component = ESX.GetWeaponComponent(weaponName, weaponComponent)
+
+ if component then
+ if not self.hasWeaponComponent(weaponName, weaponComponent) then
+ table.insert(self.loadout[loadoutNum].components, weaponComponent)
+ self.triggerEvent('esx:addWeaponComponent', weaponName, weaponComponent)
+ self.triggerEvent('esx:addInventoryItem', component.label, false, true)
+ end
+ end
+ end
+ end
+
+ self.addWeaponAmmo = function(weaponName, ammoCount)
+ local loadoutNum, weapon = self.getWeapon(weaponName)
+
+ if weapon then
+ weapon.ammo = weapon.ammo + ammoCount
+ self.triggerEvent('esx:setWeaponAmmo', weaponName, weapon.ammo)
+ end
+ end
+
+ self.updateWeaponAmmo = function(weaponName, ammoCount)
+ local loadoutNum, weapon = self.getWeapon(weaponName)
+
+ if weapon then
+ if ammoCount < weapon.ammo then
+ weapon.ammo = ammoCount
+ end
+ end
+ end
+
+ self.setWeaponTint = function(weaponName, weaponTintIndex)
+ local loadoutNum, weapon = self.getWeapon(weaponName)
+
+ if weapon then
+ local weaponNum, weaponObject = ESX.GetWeapon(weaponName)
+
+ if weaponObject.tints and weaponObject.tints[weaponTintIndex] then
+ self.loadout[loadoutNum].tintIndex = weaponTintIndex
+ self.triggerEvent('esx:setWeaponTint', weaponName, weaponTintIndex)
+ self.triggerEvent('esx:addInventoryItem', weaponObject.tints[weaponTintIndex], false, true)
+ end
+ end
+ end
+
+ self.getWeaponTint = function(weaponName)
+ local loadoutNum, weapon = self.getWeapon(weaponName)
+
+ if weapon then
+ return weapon.tintIndex
+ end
+
+ return 0
+ end
+
+ self.removeWeapon = function(weaponName)
+ local weaponLabel
+
+ for k,v in ipairs(self.loadout) do
+ if v.name == weaponName then
+ weaponLabel = v.label
+
+ for k2,v2 in ipairs(v.components) do
+ self.removeWeaponComponent(weaponName, v2)
+ end
+
+ table.remove(self.loadout, k)
+ break
+ end
+ end
+
+ if weaponLabel then
+ self.triggerEvent('esx:removeWeapon', weaponName)
+ self.triggerEvent('esx:removeInventoryItem', weaponLabel, false, true)
+ end
+ end
+
+ self.removeWeaponComponent = function(weaponName, weaponComponent)
+ local loadoutNum, weapon = self.getWeapon(weaponName)
+
+ if weapon then
+ local component = ESX.GetWeaponComponent(weaponName, weaponComponent)
+
+ if component then
+ if self.hasWeaponComponent(weaponName, weaponComponent) then
+ for k,v in ipairs(self.loadout[loadoutNum].components) do
+ if v == weaponComponent then
+ table.remove(self.loadout[loadoutNum].components, k)
+ break
+ end
+ end
+
+ self.triggerEvent('esx:removeWeaponComponent', weaponName, weaponComponent)
+ self.triggerEvent('esx:removeInventoryItem', component.label, false, true)
+ end
+ end
+ end
+ end
+
+ self.removeWeaponAmmo = function(weaponName, ammoCount)
+ local loadoutNum, weapon = self.getWeapon(weaponName)
+
+ if weapon then
+ weapon.ammo = weapon.ammo - ammoCount
+ self.triggerEvent('esx:setWeaponAmmo', weaponName, weapon.ammo)
+ end
+ end
+
+ self.hasWeaponComponent = function(weaponName, weaponComponent)
+ local loadoutNum, weapon = self.getWeapon(weaponName)
+
+ if weapon then
+ for k,v in ipairs(weapon.components) do
+ if v == weaponComponent then
+ return true
+ end
+ end
+
+ return false
+ else
+ return false
+ end
+ end
+
+ self.hasWeapon = function(weaponName)
+ for k,v in ipairs(self.loadout) do
+ if v.name == weaponName then
+ return true
+ end
+ end
+
+ return false
+ end
+
+ self.getWeapon = function(weaponName)
+ for k,v in ipairs(self.loadout) do
+ if v.name == weaponName then
+ return k, v
+ end
+ end
+
+ return
+ end
+
+ self.showNotification = function(msg)
+ self.triggerEvent('esx:showNotification', msg)
+ end
+
+ self.showHelpNotification = function(msg, thisFrame, beep, duration)
+ self.triggerEvent('esx:showHelpNotification', msg, thisFrame, beep, duration)
+ end
+
+ return self
+end
diff --git a/[esx]/es_extended/server/commands.lua b/[esx]/es_extended/server/commands.lua
new file mode 100644
index 00000000..cdc668aa
--- /dev/null
+++ b/[esx]/es_extended/server/commands.lua
@@ -0,0 +1,217 @@
+ESX.RegisterCommand('setcoords', 'admin', function(xPlayer, args, showError)
+ xPlayer.setCoords({x = args.x, y = args.y, z = args.z})
+end, false, {help = _U('command_setcoords'), validate = true, arguments = {
+ {name = 'x', help = _U('command_setcoords_x'), type = 'number'},
+ {name = 'y', help = _U('command_setcoords_y'), type = 'number'},
+ {name = 'z', help = _U('command_setcoords_z'), type = 'number'}
+}})
+
+ESX.RegisterCommand('setjob', 'admin', function(xPlayer, args, showError)
+ if ESX.DoesJobExist(args.job, args.grade) then
+ args.playerId.setJob(args.job, args.grade)
+ else
+ showError(_U('command_setjob_invalid'))
+ end
+end, true, {help = _U('command_setjob'), validate = true, arguments = {
+ {name = 'playerId', help = _U('commandgeneric_playerid'), type = 'player'},
+ {name = 'job', help = _U('command_setjob_job'), type = 'string'},
+ {name = 'grade', help = _U('command_setjob_grade'), type = 'number'}
+}})
+
+ESX.RegisterCommand('car', 'admin', function(xPlayer, args, showError)
+ if not args.car then args.car = "baller2" end
+ xPlayer.triggerEvent('esx:spawnVehicle', args.car)
+end, false, {help = _U('command_car'), validate = false, arguments = {
+ {name = 'car', help = _U('command_car_car'), type = 'any'}
+}})
+
+ESX.RegisterCommand({'cardel', 'dv'}, 'admin', function(xPlayer, args, showError)
+ if not args.radius then args.radius = 4 end
+ xPlayer.triggerEvent('esx:deleteVehicle', args.radius)
+end, false, {help = _U('command_cardel'), validate = false, arguments = {
+ {name = 'radius', help = _U('command_cardel_radius'), type = 'any'}
+}})
+
+ESX.RegisterCommand('setaccountmoney', 'admin', function(xPlayer, args, showError)
+ if args.playerId.getAccount(args.account) then
+ args.playerId.setAccountMoney(args.account, args.amount)
+ else
+ showError(_U('command_giveaccountmoney_invalid'))
+ end
+end, true, {help = _U('command_setaccountmoney'), validate = true, arguments = {
+ {name = 'playerId', help = _U('commandgeneric_playerid'), type = 'player'},
+ {name = 'account', help = _U('command_giveaccountmoney_account'), type = 'string'},
+ {name = 'amount', help = _U('command_setaccountmoney_amount'), type = 'number'}
+}})
+
+ESX.RegisterCommand('giveaccountmoney', 'admin', function(xPlayer, args, showError)
+ if args.playerId.getAccount(args.account) then
+ args.playerId.addAccountMoney(args.account, args.amount)
+ else
+ showError(_U('command_giveaccountmoney_invalid'))
+ end
+end, true, {help = _U('command_giveaccountmoney'), validate = true, arguments = {
+ {name = 'playerId', help = _U('commandgeneric_playerid'), type = 'player'},
+ {name = 'account', help = _U('command_giveaccountmoney_account'), type = 'string'},
+ {name = 'amount', help = _U('command_giveaccountmoney_amount'), type = 'number'}
+}})
+
+ESX.RegisterCommand('giveitem', 'admin', function(xPlayer, args, showError)
+ args.playerId.addInventoryItem(args.item, args.count)
+end, true, {help = _U('command_giveitem'), validate = true, arguments = {
+ {name = 'playerId', help = _U('commandgeneric_playerid'), type = 'player'},
+ {name = 'item', help = _U('command_giveitem_item'), type = 'item'},
+ {name = 'count', help = _U('command_giveitem_count'), type = 'number'}
+}})
+
+ESX.RegisterCommand('giveweapon', 'admin', function(xPlayer, args, showError)
+ if args.playerId.hasWeapon(args.weapon) then
+ showError(_U('command_giveweapon_hasalready'))
+ else
+ args.playerId.addWeapon(args.weapon, args.ammo)
+ end
+end, true, {help = _U('command_giveweapon'), validate = true, arguments = {
+ {name = 'playerId', help = _U('commandgeneric_playerid'), type = 'player'},
+ {name = 'weapon', help = _U('command_giveweapon_weapon'), type = 'weapon'},
+ {name = 'ammo', help = _U('command_giveweapon_ammo'), type = 'number'}
+}})
+
+ESX.RegisterCommand('giveweaponcomponent', 'admin', function(xPlayer, args, showError)
+ if args.playerId.hasWeapon(args.weaponName) then
+ local component = ESX.GetWeaponComponent(args.weaponName, args.componentName)
+
+ if component then
+ if args.playerId.hasWeaponComponent(args.weaponName, args.componentName) then
+ showError(_U('command_giveweaponcomponent_hasalready'))
+ else
+ args.playerId.addWeaponComponent(args.weaponName, args.componentName)
+ end
+ else
+ showError(_U('command_giveweaponcomponent_invalid'))
+ end
+ else
+ showError(_U('command_giveweaponcomponent_missingweapon'))
+ end
+end, true, {help = _U('command_giveweaponcomponent'), validate = true, arguments = {
+ {name = 'playerId', help = _U('commandgeneric_playerid'), type = 'player'},
+ {name = 'weaponName', help = _U('command_giveweapon_weapon'), type = 'weapon'},
+ {name = 'componentName', help = _U('command_giveweaponcomponent_component'), type = 'string'}
+}})
+
+ESX.RegisterCommand({'clear', 'cls'}, 'user', function(xPlayer, args, showError)
+ xPlayer.triggerEvent('chat:clear')
+end, false, {help = _U('command_clear')})
+
+ESX.RegisterCommand({'clearall', 'clsall'}, 'admin', function(xPlayer, args, showError)
+ TriggerClientEvent('chat:clear', -1)
+end, false, {help = _U('command_clearall')})
+
+ESX.RegisterCommand('clearinventory', 'admin', function(xPlayer, args, showError)
+ for k,v in ipairs(args.playerId.inventory) do
+ if v.count > 0 then
+ args.playerId.setInventoryItem(v.name, 0)
+ end
+ end
+end, true, {help = _U('command_clearinventory'), validate = true, arguments = {
+ {name = 'playerId', help = _U('commandgeneric_playerid'), type = 'player'}
+}})
+
+ESX.RegisterCommand('clearloadout', 'admin', function(xPlayer, args, showError)
+ for i=#args.playerId.loadout, 1, -1 do
+ args.playerId.removeWeapon(args.playerId.loadout[i].name)
+ end
+end, true, {help = _U('command_clearloadout'), validate = true, arguments = {
+ {name = 'playerId', help = _U('commandgeneric_playerid'), type = 'player'}
+}})
+
+ESX.RegisterCommand('setgroup', 'admin', function(xPlayer, args, showError)
+ if not args.playerId then args.playerId = xPlayer.source end
+ if args.group == "superadmin" then args.group = "admin" end
+ args.playerId.setGroup(args.group)
+end, true, {help = _U('command_setgroup'), validate = true, arguments = {
+ {name = 'playerId', help = _U('commandgeneric_playerid'), type = 'player'},
+ {name = 'group', help = _U('command_setgroup_group'), type = 'string'},
+}})
+
+ESX.RegisterCommand('save', 'admin', function(xPlayer, args, showError)
+ ESX.SavePlayer(args.playerId)
+end, true, {help = _U('command_save'), validate = true, arguments = {
+ {name = 'playerId', help = _U('commandgeneric_playerid'), type = 'player'}
+}})
+
+ESX.RegisterCommand('saveall', 'admin', function(xPlayer, args, showError)
+ ESX.SavePlayers()
+end, true, {help = _U('command_saveall')})
+
+ESX.RegisterCommand('group', {"user", "admin"}, function(xPlayer, args, showError)
+ print(xPlayer.getName()..", You are currently: ^5".. xPlayer.getGroup())
+end, true)
+
+ESX.RegisterCommand('job', {"user", "admin"}, function(xPlayer, args, showError)
+print(xPlayer.getName()..", You are currently: ^5".. xPlayer.getJob().name.. "^0 - ^5".. xPlayer.getJob().grade_label)
+end, true)
+
+ESX.RegisterCommand('info', {"user", "admin"}, function(xPlayer, args, showError)
+ local job = xPlayer.getJob().name
+ local jobgrade = xPlayer.getJob().grade_name
+ print("^2ID : ^5"..xPlayer.source.." ^0| ^2Name:^5"..xPlayer.getName().." ^0 | ^2Group:^5"..xPlayer.getGroup().."^0 | ^2Job:^5".. job.."")
+ end, true)
+
+ESX.RegisterCommand('coords', "admin", function(xPlayer, args, showError)
+ print("".. xPlayer.getName().. ": ^5".. xPlayer.getCoords(true))
+end, true)
+
+ESX.RegisterCommand('tpm', "admin", function(xPlayer, args, showError)
+ xPlayer.triggerEvent("esx:tpm")
+end, true)
+
+ESX.RegisterCommand('goto', "admin", function(xPlayer, args, showError)
+ local targetCoords = args.playerId.getCoords()
+ xPlayer.setCoords(targetCoords)
+end, true, {help = _U('goto'), validate = true, arguments = {
+ {name = 'playerId', help = _U('commandgeneric_playerid'), type = 'player'}
+}})
+
+ESX.RegisterCommand('bring', "admin", function(xPlayer, args, showError)
+ local playerCoords = xPlayer.getCoords()
+ args.playerId.setCoords(playerCoords)
+end, true, {help = _U('bring'), validate = true, arguments = {
+ {name = 'playerId', help = _U('commandgeneric_playerid'), type = 'player'}
+}})
+
+ESX.RegisterCommand('kill', "admin", function(xPlayer, args, showError)
+ args.playerId.triggerEvent('esx:killPlayer')
+end, true, {help = _U('kill'), validate = true, arguments = {
+{name = 'playerId', help = _U('commandgeneric_playerid'), type = 'player'}
+}})
+
+ESX.RegisterCommand('freeze', "admin", function(xPlayer, args, showError)
+ args.playerId.triggerEvent('esx:freezePlayer', "freeze")
+end, true, {help = _U('kill'), validate = true, arguments = {
+{name = 'playerId', help = _U('commandgeneric_playerid'), type = 'player'}
+}})
+
+ESX.RegisterCommand('unfreeze', "admin", function(xPlayer, args, showError)
+ args.playerId.triggerEvent('esx:freezePlayer', "unfreeze")
+end, true, {help = _U('kill'), validate = true, arguments = {
+{name = 'playerId', help = _U('commandgeneric_playerid'), type = 'player'}
+}})
+
+ESX.RegisterCommand('reviveall', "admin", function(xPlayer, args, showError)
+ for _, playerId in ipairs(GetPlayers()) do
+ TriggerClientEvent('esx_ambulancejob:revive', playerId)
+ end
+end, false)
+
+ESX.RegisterCommand("noclip", 'admin', function(xPlayer, args, showError)
+ xPlayer.triggerEvent('esx:noclip')
+end, false)
+
+ESX.RegisterCommand('players', "admin", function(xPlayer, args, showError)
+ local xAll = ESX.GetPlayers()
+ print("^5"..#xAll.." ^2online player(s)^0")
+ for i=1, #xAll, 1 do
+ local xPlayer = ESX.GetPlayerFromId(xAll[i])
+ print("^1[ ^2ID : ^5"..xPlayer.source.." ^0| ^2Name : ^5"..xPlayer.getName().." ^0 | ^2Group : ^5"..xPlayer.getGroup().." ^0 | ^2Identifier : ^5".. xPlayer.identifier .."^1]^0\n")
+ end
+end, true)
diff --git a/[esx]/es_extended/server/common.lua b/[esx]/es_extended/server/common.lua
new file mode 100644
index 00000000..1eb6aa62
--- /dev/null
+++ b/[esx]/es_extended/server/common.lua
@@ -0,0 +1,77 @@
+ESX = {}
+ESX.Players = {}
+ESX.UsableItemsCallbacks = {}
+ESX.Items = {}
+ESX.ServerCallbacks = {}
+ESX.TimeoutCount = -1
+ESX.CancelledTimeouts = {}
+ESX.Pickups = {}
+ESX.PickupId = 0
+ESX.Jobs = {}
+ESX.RegisteredCommands = {}
+
+AddEventHandler('esx:getSharedObject', function(cb)
+ cb(ESX)
+end)
+
+function getSharedObject()
+ return ESX
+end
+
+MySQL.ready(function()
+ MySQL.Async.fetchAll('SELECT * FROM items', {}, function(result)
+ for k,v in ipairs(result) do
+ ESX.Items[v.name] = {
+ label = v.label,
+ weight = v.weight,
+ rare = v.rare,
+ canRemove = v.can_remove
+ }
+ end
+ end)
+
+ local Jobs = {}
+ MySQL.Async.fetchAll('SELECT * FROM jobs', {}, function(jobs)
+ for k,v in ipairs(jobs) do
+ Jobs[v.name] = v
+ Jobs[v.name].grades = {}
+ end
+
+ MySQL.Async.fetchAll('SELECT * FROM job_grades', {}, function(jobGrades)
+ for k,v in ipairs(jobGrades) do
+ if Jobs[v.job_name] then
+ Jobs[v.job_name].grades[tostring(v.grade)] = v
+ else
+ print(('[^3WARNING^7] Ignoring job grades for ^5"%s"^0 due to missing job'):format(v.job_name))
+ end
+ end
+
+ for k2,v2 in pairs(Jobs) do
+ if ESX.Table.SizeOf(v2.grades) == 0 then
+ Jobs[v2.name] = nil
+ print(('[^3WARNING^7] Ignoring job ^5"%s"^0due to no job grades found'):format(v2.name))
+ end
+ end
+ ESX.Jobs = Jobs
+ print('[^2INFO^7] ESX ^5Legacy^0 initialized')
+ ESX.StartDBSync()
+ ESX.StartPayCheck()
+ end)
+ end)
+end)
+
+RegisterServerEvent('esx:clientLog')
+AddEventHandler('esx:clientLog', function(msg)
+ if Config.EnableDebug then
+ print(('[^2TRACE^7] %s^7'):format(msg))
+ end
+end)
+
+RegisterServerEvent('esx:triggerServerCallback')
+AddEventHandler('esx:triggerServerCallback', function(name, requestId, ...)
+ local playerId = source
+
+ ESX.TriggerServerCallback(name, requestId, playerId, function(...)
+ TriggerClientEvent('esx:serverCallback', playerId, requestId, ...)
+ end, ...)
+end)
diff --git a/[esx]/es_extended/server/functions.lua b/[esx]/es_extended/server/functions.lua
new file mode 100644
index 00000000..a1d3977c
--- /dev/null
+++ b/[esx]/es_extended/server/functions.lua
@@ -0,0 +1,314 @@
+ESX.Trace = function(msg)
+ if Config.EnableDebug then
+ print(('[^2TRACE^7] %s^7'):format(msg))
+ end
+end
+
+ESX.SetTimeout = function(msec, cb)
+ local id = ESX.TimeoutCount + 1
+
+ SetTimeout(msec, function()
+ if ESX.CancelledTimeouts[id] then
+ ESX.CancelledTimeouts[id] = nil
+ else
+ cb()
+ end
+ end)
+
+ ESX.TimeoutCount = id
+
+ return id
+end
+
+ESX.RegisterCommand = function(name, group, cb, allowConsole, suggestion)
+ if type(name) == 'table' then
+ for k,v in ipairs(name) do
+ ESX.RegisterCommand(v, group, cb, allowConsole, suggestion)
+ end
+
+ return
+ end
+
+ if ESX.RegisteredCommands[name] then
+ print(('[^3WARNING^7] Command ^5"%s" already registered, overriding command'):format(name))
+
+ if ESX.RegisteredCommands[name].suggestion then
+ TriggerClientEvent('chat:removeSuggestion', -1, ('/%s'):format(name))
+ end
+ end
+
+ if suggestion then
+ if not suggestion.arguments then suggestion.arguments = {} end
+ if not suggestion.help then suggestion.help = '' end
+
+ TriggerClientEvent('chat:addSuggestion', -1, ('/%s'):format(name), suggestion.help, suggestion.arguments)
+ end
+
+ ESX.RegisteredCommands[name] = {group = group, cb = cb, allowConsole = allowConsole, suggestion = suggestion}
+
+ RegisterCommand(name, function(playerId, args, rawCommand)
+ local command = ESX.RegisteredCommands[name]
+
+ if not command.allowConsole and playerId == 0 then
+ print(('[^3WARNING^7] ^5%s'):format(_U('commanderror_console')))
+ else
+ local xPlayer, error = ESX.GetPlayerFromId(playerId), nil
+
+ if command.suggestion then
+ if command.suggestion.validate then
+ if #args ~= #command.suggestion.arguments then
+ error = _U('commanderror_argumentmismatch', #args, #command.suggestion.arguments)
+ end
+ end
+
+ if not error and command.suggestion.arguments then
+ local newArgs = {}
+
+ for k,v in ipairs(command.suggestion.arguments) do
+ if v.type then
+ if v.type == 'number' then
+ local newArg = tonumber(args[k])
+
+ if newArg then
+ newArgs[v.name] = newArg
+ else
+ error = _U('commanderror_argumentmismatch_number', k)
+ end
+ elseif v.type == 'player' or v.type == 'playerId' then
+ local targetPlayer = tonumber(args[k])
+
+ if args[k] == 'me' then targetPlayer = playerId end
+
+ if targetPlayer then
+ local xTargetPlayer = ESX.GetPlayerFromId(targetPlayer)
+
+ if xTargetPlayer then
+ if v.type == 'player' then
+ newArgs[v.name] = xTargetPlayer
+ else
+ newArgs[v.name] = targetPlayer
+ end
+ else
+ error = _U('commanderror_invalidplayerid')
+ end
+ else
+ error = _U('commanderror_argumentmismatch_number', k)
+ end
+ elseif v.type == 'string' then
+ newArgs[v.name] = args[k]
+ elseif v.type == 'item' then
+ if ESX.Items[args[k]] then
+ newArgs[v.name] = args[k]
+ else
+ error = _U('commanderror_invaliditem')
+ end
+ elseif v.type == 'weapon' then
+ if ESX.GetWeapon(args[k]) then
+ newArgs[v.name] = string.upper(args[k])
+ else
+ error = _U('commanderror_invalidweapon')
+ end
+ elseif v.type == 'any' then
+ newArgs[v.name] = args[k]
+ end
+ end
+
+ if error then break end
+ end
+
+ args = newArgs
+ end
+ end
+
+ if error then
+ if playerId == 0 then
+ print(('[^3WARNING^7] %s^7'):format(error))
+ else
+ xPlayer.triggerEvent('chat:addMessage', {args = {'^1SYSTEM', error}})
+ end
+ else
+ cb(xPlayer or false, args, function(msg)
+ if playerId == 0 then
+ print(('[^3WARNING^7] %s^7'):format(msg))
+ else
+ xPlayer.triggerEvent('chat:addMessage', {args = {'^1SYSTEM', msg}})
+ end
+ end)
+ end
+ end
+ end, true)
+
+ if type(group) == 'table' then
+ for k,v in ipairs(group) do
+ ExecuteCommand(('add_ace group.%s command.%s allow'):format(v, name))
+ end
+ else
+ ExecuteCommand(('add_ace group.%s command.%s allow'):format(group, name))
+ end
+end
+
+ESX.ClearTimeout = function(id)
+ ESX.CancelledTimeouts[id] = true
+end
+
+ESX.RegisterServerCallback = function(name, cb)
+ ESX.ServerCallbacks[name] = cb
+end
+
+ESX.TriggerServerCallback = function(name, requestId, source, cb, ...)
+ if ESX.ServerCallbacks[name] then
+ ESX.ServerCallbacks[name](source, cb, ...)
+ else
+ print(('[^3WARNING^7] Server callback ^5"%s"^0 does not exist. ^1Please Check The Server File for Errors!'):format(name))
+ end
+end
+
+local savePlayers = -1
+Citizen.CreateThread(function()
+ savePlayers = MySQL.Sync.store("UPDATE users SET `accounts` = ?, `job` = ?, `job_grade` = ?, `group` = ?, `position` = ?, `inventory` = ?, `loadout` = ? WHERE `identifier` = ?")
+end)
+
+ESX.SavePlayer = function(xPlayer, cb)
+ local asyncTasks = {}
+
+ table.insert(asyncTasks, function(cb2)
+ MySQL.Async.execute(savePlayers, {
+ json.encode(xPlayer.getAccounts(true)),
+ xPlayer.job.name,
+ xPlayer.job.grade,
+ xPlayer.getGroup(),
+ json.encode(xPlayer.getCoords()),
+ json.encode(xPlayer.getInventory(true)),
+ json.encode(xPlayer.getLoadout(true)),
+ xPlayer.getIdentifier()
+ }, function(rowsChanged)
+ cb2()
+ end)
+ end)
+
+ Async.parallel(asyncTasks, function(results)
+ print(('[^2INFO^7] Saved player ^5"%s^7"'):format(xPlayer.getName()))
+
+ if cb then
+ cb()
+ end
+ end)
+end
+
+ESX.SavePlayers = function(cb)
+ local xPlayers, asyncTasks = ESX.GetPlayers(), {}
+
+ for i=1, #xPlayers, 1 do
+ table.insert(asyncTasks, function(cb2)
+ local xPlayer = ESX.GetPlayerFromId(xPlayers[i])
+ ESX.SavePlayer(xPlayer, cb2)
+ end)
+ end
+
+ Async.parallelLimit(asyncTasks, 8, function(results)
+ print(('[^2INFO^7] Saved ^5%s^0 player(s)'):format(#xPlayers))
+ if cb then
+ cb()
+ end
+ end)
+end
+
+ESX.StartDBSync = function()
+ function saveData()
+ ESX.SavePlayers()
+ SetTimeout(10 * 60 * 1000, saveData)
+ end
+
+ SetTimeout(10 * 60 * 1000, saveData)
+end
+
+ESX.GetPlayers = function()
+ local sources = {}
+
+ for k,v in pairs(ESX.Players) do
+ table.insert(sources, k)
+ end
+
+ return sources
+end
+
+ESX.GetExtendedPlayers = function(key, val)
+ local xPlayers = {}
+ for k, v in pairs(ESX.Players) do
+ if key then
+ if (key == 'job' and v.job.name == val) or v[key] == val then
+ table.insert(xPlayers, v)
+ end
+ else
+ table.insert(xPlayers, v)
+ end
+ end
+ return xPlayers
+end
+
+ESX.GetPlayerFromId = function(source)
+ return ESX.Players[tonumber(source)]
+end
+
+ESX.GetPlayerFromIdentifier = function(identifier)
+ for k,v in pairs(ESX.Players) do
+ if v.identifier == identifier then
+ return v
+ end
+ end
+end
+
+ESX.GetIdentifier = function(playerId)
+ for k,v in ipairs(GetPlayerIdentifiers(playerId)) do
+ if string.match(v, 'license:') then
+ local identifier = string.gsub(v, 'license:', '')
+ return identifier
+ end
+ end
+end
+
+ESX.RegisterUsableItem = function(item, cb)
+ ESX.UsableItemsCallbacks[item] = cb
+end
+
+ESX.UseItem = function(source, item)
+ ESX.UsableItemsCallbacks[item](source, item)
+end
+
+ESX.GetItemLabel = function(item)
+ if ESX.Items[item] then
+ return ESX.Items[item].label
+ end
+end
+
+ESX.CreatePickup = function(type, name, count, label, playerId, components, tintIndex)
+ local pickupId = (ESX.PickupId == 65635 and 0 or ESX.PickupId + 1)
+ local xPlayer = ESX.GetPlayerFromId(playerId)
+ local coords = xPlayer.getCoords()
+
+ ESX.Pickups[pickupId] = {
+ type = type, name = name,
+ count = count, label = label,
+ coords = coords
+ }
+
+ if type == 'item_weapon' then
+ ESX.Pickups[pickupId].components = components
+ ESX.Pickups[pickupId].tintIndex = tintIndex
+ end
+
+ TriggerClientEvent('esx:createPickup', -1, pickupId, label, coords, type, name, components, tintIndex)
+ ESX.PickupId = pickupId
+end
+
+ESX.DoesJobExist = function(job, grade)
+ grade = tostring(grade)
+
+ if job and grade then
+ if ESX.Jobs[job] and ESX.Jobs[job].grades[grade] then
+ return true
+ end
+ end
+
+ return false
+end
diff --git a/[esx]/es_extended/server/main.lua b/[esx]/es_extended/server/main.lua
new file mode 100644
index 00000000..bb5bfcd8
--- /dev/null
+++ b/[esx]/es_extended/server/main.lua
@@ -0,0 +1,598 @@
+local NewPlayer, LoadPlayer = -1, -1
+Citizen.CreateThread(function()
+ SetMapName('San Andreas')
+ SetGameType('ESX Legacy')
+
+ local query = '`accounts`, `job`, `job_grade`, `group`, `position`, `inventory`, `skin`, `loadout`' -- Select these fields from the database
+ if Config.Multichar or Config.Identity then -- append these fields to the select query
+ query = query..', `firstname`, `lastname`, `dateofbirth`, `sex`, `height`'
+ end
+
+ if Config.Multichar then -- insert identity data with creation
+ MySQL.Async.store("INSERT INTO `users` SET `accounts` = ?, `identifier` = ?, `group` = ?, `firstname` = ?, `lastname` = ?, `dateofbirth` = ?, `sex` = ?, `height` = ?", function(storeId)
+ NewPlayer = storeId
+ end)
+ else
+ MySQL.Async.store("INSERT INTO `users` SET `accounts` = ?, `identifier` = ?, `group` = ?", function(storeId)
+ NewPlayer = storeId
+ end)
+ end
+
+ MySQL.Async.store("SELECT "..query.." FROM `users` WHERE identifier = ?", function(storeId)
+ LoadPlayer = storeId
+ end)
+end)
+
+if Config.Multichar then
+ AddEventHandler('esx:onPlayerJoined', function(src, char, data)
+ if not ESX.Players[src] then
+ local identifier = char..':'..ESX.GetIdentifier(src)
+ if data then
+ createESXPlayer(identifier, src, data)
+ else
+ loadESXPlayer(identifier, src, false)
+ end
+ end
+ end)
+else
+ RegisterNetEvent('esx:onPlayerJoined')
+ AddEventHandler('esx:onPlayerJoined', function()
+ if not ESX.Players[source] then
+ onPlayerJoined(source)
+ end
+ end)
+end
+
+function onPlayerJoined(playerId)
+ local identifier = ESX.GetIdentifier(playerId)
+ if identifier then
+ if ESX.GetPlayerFromIdentifier(identifier) then
+ DropPlayer(playerId, ('there was an error loading your character!\nError code: identifier-active-ingame\n\nThis error is caused by a player on this server who has the same identifier as you have. Make sure you are not playing on the same Rockstar account.\n\nYour Rockstar identifier: %s'):format(identifier))
+ else
+ MySQL.Async.fetchScalar('SELECT 1 FROM users WHERE identifier = @identifier', {
+ ['@identifier'] = identifier
+ }, function(result)
+ if result then
+ loadESXPlayer(identifier, playerId, false)
+ else createESXPlayer(identifier, playerId) end
+ end)
+ end
+ else
+ DropPlayer(playerId, 'there was an error loading your character!\nError code: identifier-missing-ingame\n\nThe cause of this error is not known, your identifier could not be found. Please come back later or report this problem to the server administration team.')
+ end
+end
+
+function createESXPlayer(identifier, playerId, data)
+ local accounts = {}
+
+ for account,money in pairs(Config.StartingAccountMoney) do
+ accounts[account] = money
+ end
+
+ if IsPlayerAceAllowed(playerId, "command") then
+ print(('^2[INFO] ^0 Player ^5%s ^0Has been granted admin permissions via ^5Ace Perms.^7'):format(playerId))
+ defaultGroup = "admin"
+ else
+ defaultGroup = "user"
+ end
+
+ if not Config.Multichar then
+ MySQL.Async.execute(NewPlayer, {
+ json.encode(accounts),
+ identifier,
+ defaultGroup,
+ }, function(rowsChanged)
+ loadESXPlayer(identifier, playerId, true)
+ end)
+ else
+ MySQL.Async.execute(NewPlayer, {
+ json.encode(accounts),
+ identifier,
+ defaultGroup,
+ data.firstname,
+ data.lastname,
+ data.dateofbirth,
+ data.sex,
+ data.height,
+ }, function(rowsChanged)
+ loadESXPlayer(identifier, playerId, true)
+ end)
+ end
+end
+
+AddEventHandler('playerConnecting', function(name, setCallback, deferrals)
+ deferrals.defer()
+ local playerId = source
+ local identifier = ESX.GetIdentifier(playerId)
+ Citizen.Wait(100)
+
+ if identifier then
+ if ESX.GetPlayerFromIdentifier(identifier) then
+ deferrals.done(('There was an error loading your character!\nError code: identifier-active\n\nThis error is caused by a player on this server who has the same identifier as you have. Make sure you are not playing on the same account.\n\nYour identifier: %s'):format(identifier))
+ else
+ deferrals.done()
+ end
+ else
+ deferrals.done('There was an error loading your character!\nError code: identifier-missing\n\nThe cause of this error is not known, your identifier could not be found. Please come back later or report this problem to the server administration team.')
+ end
+end)
+
+function loadESXPlayer(identifier, playerId, isNew)
+ local tasks = {}
+
+ local userData = {
+ accounts = {},
+ inventory = {},
+ job = {},
+ loadout = {},
+ playerName = GetPlayerName(playerId),
+ weight = 0
+ }
+
+ table.insert(tasks, function(cb)
+ MySQL.Async.fetchAll(LoadPlayer, { identifier
+ }, function(result)
+ local job, grade, jobObject, gradeObject = result[1].job, tostring(result[1].job_grade)
+ local foundAccounts, foundItems = {}, {}
+
+ -- Accounts
+ if result[1].accounts and result[1].accounts ~= '' then
+ local accounts = json.decode(result[1].accounts)
+
+ for account,money in pairs(accounts) do
+ foundAccounts[account] = money
+ end
+ end
+
+ for account,label in pairs(Config.Accounts) do
+ table.insert(userData.accounts, {
+ name = account,
+ money = foundAccounts[account] or Config.StartingAccountMoney[account] or 0,
+ label = label
+ })
+ end
+
+ -- Job
+ if ESX.DoesJobExist(job, grade) then
+ jobObject, gradeObject = ESX.Jobs[job], ESX.Jobs[job].grades[grade]
+ else
+ print(('[^3WARNING^7] Ignoring invalid job for %s [job: %s, grade: %s]'):format(identifier, job, grade))
+ job, grade = 'unemployed', '0'
+ jobObject, gradeObject = ESX.Jobs[job], ESX.Jobs[job].grades[grade]
+ end
+
+ userData.job.id = jobObject.id
+ userData.job.name = jobObject.name
+ userData.job.label = jobObject.label
+
+ userData.job.grade = tonumber(grade)
+ userData.job.grade_name = gradeObject.name
+ userData.job.grade_label = gradeObject.label
+ userData.job.grade_salary = gradeObject.salary
+
+ userData.job.skin_male = {}
+ userData.job.skin_female = {}
+
+ if gradeObject.skin_male then userData.job.skin_male = json.decode(gradeObject.skin_male) end
+ if gradeObject.skin_female then userData.job.skin_female = json.decode(gradeObject.skin_female) end
+
+ -- Inventory
+ if result[1].inventory and result[1].inventory ~= '' then
+ local inventory = json.decode(result[1].inventory)
+
+ for name,count in pairs(inventory) do
+ local item = ESX.Items[name]
+
+ if item then
+ foundItems[name] = count
+ else
+ print(('[^3WARNING^7] Ignoring invalid item "%s" for "%s"'):format(name, identifier))
+ end
+ end
+ end
+
+ for name,item in pairs(ESX.Items) do
+ local count = foundItems[name] or 0
+ if count > 0 then userData.weight = userData.weight + (item.weight * count) end
+
+ table.insert(userData.inventory, {
+ name = name,
+ count = count,
+ label = item.label,
+ weight = item.weight,
+ usable = ESX.UsableItemsCallbacks[name] ~= nil,
+ rare = item.rare,
+ canRemove = item.canRemove
+ })
+ end
+
+ table.sort(userData.inventory, function(a, b)
+ return a.label < b.label
+ end)
+
+ -- Group
+ if result[1].group then
+ if result[1].group == "superadmin" then
+ userData.group = "admin"
+ else
+ userData.group = result[1].group
+ end
+ else
+ userData.group = 'user'
+ end
+
+ -- Loadout
+ if result[1].loadout and result[1].loadout ~= '' then
+ local loadout = json.decode(result[1].loadout)
+
+ for name,weapon in pairs(loadout) do
+ local label = ESX.GetWeaponLabel(name)
+
+ if label then
+ if not weapon.components then weapon.components = {} end
+ if not weapon.tintIndex then weapon.tintIndex = 0 end
+
+ table.insert(userData.loadout, {
+ name = name,
+ ammo = weapon.ammo,
+ label = label,
+ components = weapon.components,
+ tintIndex = weapon.tintIndex
+ })
+ end
+ end
+ end
+
+ -- Position
+ if result[1].position and result[1].position ~= '' then
+ userData.coords = json.decode(result[1].position)
+ else
+ print('[^3WARNING^7] Column ^5"position"^0 in ^5"users"^0 table is missing required default value. Using backup coords, fix your database.')
+ userData.coords = {x = -269.4, y = -955.3, z = 31.2, heading = 205.8}
+ end
+
+ -- Skin
+ if result[1].skin and result[1].skin ~= '' then
+ userData.skin = json.decode(result[1].skin)
+ else
+ if userData.sex == 'f' then userData.skin = {sex=1} else userData.skin = {sex=0} end
+ end
+
+ -- Identity
+ if result[1].firstname and result[1].firstname ~= '' then
+ userData.firstname = result[1].firstname
+ userData.lastname = result[1].lastname
+ userData.playerName = userData.firstname..' '..userData.lastname
+ if result[1].dateofbirth then userData.dateofbirth = result[1].dateofbirth end
+ if result[1].sex then userData.sex = result[1].sex end
+ if result[1].height then userData.height = result[1].height end
+ end
+
+ cb()
+ end)
+ end)
+
+ Async.parallel(tasks, function(results)
+ local xPlayer = CreateExtendedPlayer(playerId, identifier, userData.group, userData.accounts, userData.inventory, userData.weight, userData.job, userData.loadout, userData.playerName, userData.coords)
+ ESX.Players[playerId] = xPlayer
+
+ if userData.firstname then
+ xPlayer.set('firstName', userData.firstname)
+ xPlayer.set('lastName', userData.lastname)
+ if userData.dateofbirth then xPlayer.set('dateofbirth', userData.dateofbirth) end
+ if userData.sex then xPlayer.set('sex', userData.sex) end
+ if userData.height then xPlayer.set('height', userData.height) end
+ end
+
+ TriggerEvent('esx:playerLoaded', playerId, xPlayer, isNew)
+
+ xPlayer.triggerEvent('esx:playerLoaded', {
+ accounts = xPlayer.getAccounts(),
+ coords = xPlayer.getCoords(),
+ identifier = xPlayer.getIdentifier(),
+ inventory = xPlayer.getInventory(),
+ job = xPlayer.getJob(),
+ loadout = xPlayer.getLoadout(),
+ maxWeight = xPlayer.getMaxWeight(),
+ money = xPlayer.getMoney(),
+ dead = false
+ }, isNew, userData.skin)
+
+ xPlayer.triggerEvent('esx:createMissingPickups', ESX.Pickups)
+ xPlayer.triggerEvent('esx:registerSuggestions', ESX.RegisteredCommands)
+ print(('[^2INFO^0] Player ^5"%s" ^0has connected to the server. ID: ^5%s^7'):format(xPlayer.getName(), playerId))
+ end)
+end
+
+AddEventHandler('chatMessage', function(playerId, author, message)
+ if message:sub(1, 1) == '/' and playerId > 0 then
+ CancelEvent()
+ local commandName = message:sub(1):gmatch("%w+")()
+ TriggerClientEvent('chat:addMessage', playerId, {args = {'^1SYSTEM', _U('commanderror_invalidcommand', commandName)}})
+ end
+end)
+
+AddEventHandler('playerDropped', function(reason)
+ local playerId = source
+ local xPlayer = ESX.GetPlayerFromId(playerId)
+
+ if xPlayer then
+ TriggerEvent('esx:playerDropped', playerId, reason)
+
+ ESX.SavePlayer(xPlayer, function()
+ ESX.Players[playerId] = nil
+ end)
+ end
+end)
+
+if Config.Multichar then
+ AddEventHandler('esx:playerLogout', function(playerId)
+ local xPlayer = ESX.GetPlayerFromId(playerId)
+ if xPlayer then
+ TriggerEvent('esx:playerDropped', playerId, reason)
+
+ ESX.SavePlayer(xPlayer, function()
+ ESX.Players[playerId] = nil
+ end)
+ end
+ TriggerClientEvent("esx:onPlayerLogout", playerId)
+ end)
+end
+
+RegisterNetEvent('esx:updateCoords')
+AddEventHandler('esx:updateCoords', function(coords)
+ local xPlayer = ESX.GetPlayerFromId(source)
+
+ if xPlayer then
+ xPlayer.updateCoords(coords)
+ end
+end)
+
+RegisterNetEvent('esx:updateWeaponAmmo')
+AddEventHandler('esx:updateWeaponAmmo', function(weaponName, ammoCount)
+ local xPlayer = ESX.GetPlayerFromId(source)
+
+ if xPlayer then
+ xPlayer.updateWeaponAmmo(weaponName, ammoCount)
+ end
+end)
+
+RegisterNetEvent('esx:giveInventoryItem')
+AddEventHandler('esx:giveInventoryItem', function(target, type, itemName, itemCount)
+ local playerId = source
+ local sourceXPlayer = ESX.GetPlayerFromId(playerId)
+ local targetXPlayer = ESX.GetPlayerFromId(target)
+
+ if type == 'item_standard' then
+ local sourceItem = sourceXPlayer.getInventoryItem(itemName)
+
+ if itemCount > 0 and sourceItem.count >= itemCount then
+ if targetXPlayer.canCarryItem(itemName, itemCount) then
+ sourceXPlayer.removeInventoryItem(itemName, itemCount)
+ targetXPlayer.addInventoryItem (itemName, itemCount)
+
+ sourceXPlayer.showNotification(_U('gave_item', itemCount, sourceItem.label, targetXPlayer.name))
+ targetXPlayer.showNotification(_U('received_item', itemCount, sourceItem.label, sourceXPlayer.name))
+ else
+ sourceXPlayer.showNotification(_U('ex_inv_lim', targetXPlayer.name))
+ end
+ else
+ sourceXPlayer.showNotification(_U('imp_invalid_quantity'))
+ end
+ elseif type == 'item_account' then
+ if itemCount > 0 and sourceXPlayer.getAccount(itemName).money >= itemCount then
+ sourceXPlayer.removeAccountMoney(itemName, itemCount)
+ targetXPlayer.addAccountMoney (itemName, itemCount)
+
+ sourceXPlayer.showNotification(_U('gave_account_money', ESX.Math.GroupDigits(itemCount), Config.Accounts[itemName], targetXPlayer.name))
+ targetXPlayer.showNotification(_U('received_account_money', ESX.Math.GroupDigits(itemCount), Config.Accounts[itemName], sourceXPlayer.name))
+ else
+ sourceXPlayer.showNotification(_U('imp_invalid_amount'))
+ end
+ elseif type == 'item_weapon' then
+ if sourceXPlayer.hasWeapon(itemName) then
+ local weaponLabel = ESX.GetWeaponLabel(itemName)
+
+ if not targetXPlayer.hasWeapon(itemName) then
+ local _, weapon = sourceXPlayer.getWeapon(itemName)
+ local _, weaponObject = ESX.GetWeapon(itemName)
+ itemCount = weapon.ammo
+
+ sourceXPlayer.removeWeapon(itemName)
+ targetXPlayer.addWeapon(itemName, itemCount)
+
+ if weaponObject.ammo and itemCount > 0 then
+ local ammoLabel = weaponObject.ammo.label
+ sourceXPlayer.showNotification(_U('gave_weapon_withammo', weaponLabel, itemCount, ammoLabel, targetXPlayer.name))
+ targetXPlayer.showNotification(_U('received_weapon_withammo', weaponLabel, itemCount, ammoLabel, sourceXPlayer.name))
+ else
+ sourceXPlayer.showNotification(_U('gave_weapon', weaponLabel, targetXPlayer.name))
+ targetXPlayer.showNotification(_U('received_weapon', weaponLabel, sourceXPlayer.name))
+ end
+ else
+ sourceXPlayer.showNotification(_U('gave_weapon_hasalready', targetXPlayer.name, weaponLabel))
+ targetXPlayer.showNotification(_U('received_weapon_hasalready', sourceXPlayer.name, weaponLabel))
+ end
+ end
+ elseif type == 'item_ammo' then
+ if sourceXPlayer.hasWeapon(itemName) then
+ local weaponNum, weapon = sourceXPlayer.getWeapon(itemName)
+
+ if targetXPlayer.hasWeapon(itemName) then
+ local _, weaponObject = ESX.GetWeapon(itemName)
+
+ if weaponObject.ammo then
+ local ammoLabel = weaponObject.ammo.label
+
+ if weapon.ammo >= itemCount then
+ sourceXPlayer.removeWeaponAmmo(itemName, itemCount)
+ targetXPlayer.addWeaponAmmo(itemName, itemCount)
+
+ sourceXPlayer.showNotification(_U('gave_weapon_ammo', itemCount, ammoLabel, weapon.label, targetXPlayer.name))
+ targetXPlayer.showNotification(_U('received_weapon_ammo', itemCount, ammoLabel, weapon.label, sourceXPlayer.name))
+ end
+ end
+ else
+ sourceXPlayer.showNotification(_U('gave_weapon_noweapon', targetXPlayer.name))
+ targetXPlayer.showNotification(_U('received_weapon_noweapon', sourceXPlayer.name, weapon.label))
+ end
+ end
+ end
+end)
+
+RegisterNetEvent('esx:removeInventoryItem')
+AddEventHandler('esx:removeInventoryItem', function(type, itemName, itemCount)
+ local playerId = source
+ local xPlayer = ESX.GetPlayerFromId(source)
+
+ if type == 'item_standard' then
+ if itemCount == nil or itemCount < 1 then
+ xPlayer.showNotification(_U('imp_invalid_quantity'))
+ else
+ local xItem = xPlayer.getInventoryItem(itemName)
+
+ if (itemCount > xItem.count or xItem.count < 1) then
+ xPlayer.showNotification(_U('imp_invalid_quantity'))
+ else
+ xPlayer.removeInventoryItem(itemName, itemCount)
+ local pickupLabel = ('~y~%s~s~ [~b~%s~s~]'):format(xItem.label, itemCount)
+ ESX.CreatePickup('item_standard', itemName, itemCount, pickupLabel, playerId)
+ xPlayer.showNotification(_U('threw_standard', itemCount, xItem.label))
+ end
+ end
+ elseif type == 'item_account' then
+ if itemCount == nil or itemCount < 1 then
+ xPlayer.showNotification(_U('imp_invalid_amount'))
+ else
+ local account = xPlayer.getAccount(itemName)
+
+ if (itemCount > account.money or account.money < 1) then
+ xPlayer.showNotification(_U('imp_invalid_amount'))
+ else
+ xPlayer.removeAccountMoney(itemName, itemCount)
+ local pickupLabel = ('~y~%s~s~ [~g~%s~s~]'):format(account.label, _U('locale_currency', ESX.Math.GroupDigits(itemCount)))
+ ESX.CreatePickup('item_account', itemName, itemCount, pickupLabel, playerId)
+ xPlayer.showNotification(_U('threw_account', ESX.Math.GroupDigits(itemCount), string.lower(account.label)))
+ end
+ end
+ elseif type == 'item_weapon' then
+ itemName = string.upper(itemName)
+
+ if xPlayer.hasWeapon(itemName) then
+ local _, weapon = xPlayer.getWeapon(itemName)
+ local _, weaponObject = ESX.GetWeapon(itemName)
+ local components, pickupLabel = ESX.Table.Clone(weapon.components)
+ xPlayer.removeWeapon(itemName)
+
+ if weaponObject.ammo and weapon.ammo > 0 then
+ local ammoLabel = weaponObject.ammo.label
+ pickupLabel = ('~y~%s~s~ [~g~%s~s~ %s]'):format(weapon.label, weapon.ammo, ammoLabel)
+ xPlayer.showNotification(_U('threw_weapon_ammo', weapon.label, weapon.ammo, ammoLabel))
+ else
+ pickupLabel = ('~y~%s~s~'):format(weapon.label)
+ xPlayer.showNotification(_U('threw_weapon', weapon.label))
+ end
+
+ ESX.CreatePickup('item_weapon', itemName, weapon.ammo, pickupLabel, playerId, components, weapon.tintIndex)
+ end
+ end
+end)
+
+RegisterNetEvent('esx:useItem')
+AddEventHandler('esx:useItem', function(itemName)
+ local xPlayer = ESX.GetPlayerFromId(source)
+ local count = xPlayer.getInventoryItem(itemName).count
+
+ if count > 0 then
+ ESX.UseItem(source, itemName)
+ else
+ xPlayer.showNotification(_U('act_imp'))
+ end
+end)
+
+RegisterNetEvent('esx:onPickup')
+AddEventHandler('esx:onPickup', function(pickupId)
+ local pickup, xPlayer, success = ESX.Pickups[pickupId], ESX.GetPlayerFromId(source)
+
+ if pickup then
+ if pickup.type == 'item_standard' then
+ if xPlayer.canCarryItem(pickup.name, pickup.count) then
+ xPlayer.addInventoryItem(pickup.name, pickup.count)
+ success = true
+ else
+ xPlayer.showNotification(_U('threw_cannot_pickup'))
+ end
+ elseif pickup.type == 'item_account' then
+ success = true
+ xPlayer.addAccountMoney(pickup.name, pickup.count)
+ elseif pickup.type == 'item_weapon' then
+ if xPlayer.hasWeapon(pickup.name) then
+ xPlayer.showNotification(_U('threw_weapon_already'))
+ else
+ success = true
+ xPlayer.addWeapon(pickup.name, pickup.count)
+ xPlayer.setWeaponTint(pickup.name, pickup.tintIndex)
+
+ for k,v in ipairs(pickup.components) do
+ xPlayer.addWeaponComponent(pickup.name, v)
+ end
+ end
+ end
+
+ if success then
+ ESX.Pickups[pickupId] = nil
+ TriggerClientEvent('esx:removePickup', -1, pickupId)
+ end
+ end
+end)
+
+ESX.RegisterServerCallback('esx:getPlayerData', function(source, cb)
+ local xPlayer = ESX.GetPlayerFromId(source)
+
+ cb({
+ identifier = xPlayer.identifier,
+ accounts = xPlayer.getAccounts(),
+ inventory = xPlayer.getInventory(),
+ job = xPlayer.getJob(),
+ loadout = xPlayer.getLoadout(),
+ money = xPlayer.getMoney()
+ })
+end)
+
+ESX.RegisterServerCallback('esx:getOtherPlayerData', function(source, cb, target)
+ local xPlayer = ESX.GetPlayerFromId(target)
+
+ cb({
+ identifier = xPlayer.identifier,
+ accounts = xPlayer.getAccounts(),
+ inventory = xPlayer.getInventory(),
+ job = xPlayer.getJob(),
+ loadout = xPlayer.getLoadout(),
+ money = xPlayer.getMoney()
+ })
+end)
+
+ESX.RegisterServerCallback('esx:getPlayerNames', function(source, cb, players)
+ players[source] = nil
+
+ for playerId,v in pairs(players) do
+ local xPlayer = ESX.GetPlayerFromId(playerId)
+
+ if xPlayer then
+ players[playerId] = xPlayer.getName()
+ else
+ players[playerId] = nil
+ end
+ end
+
+ cb(players)
+end)
+
+AddEventHandler('txAdmin:events:scheduledRestart', function(eventData)
+ if eventData.secondsRemaining == 60 then
+ Citizen.CreateThread(function()
+ Citizen.Wait(50000)
+ ESX.SavePlayers()
+ end)
+ end
+end)
diff --git a/[esx]/es_extended/server/paycheck.lua b/[esx]/es_extended/server/paycheck.lua
new file mode 100644
index 00000000..293898f9
--- /dev/null
+++ b/[esx]/es_extended/server/paycheck.lua
@@ -0,0 +1,44 @@
+ESX.StartPayCheck = function()
+ function payCheck()
+ local xPlayers = ESX.GetPlayers()
+
+ for i=1, #xPlayers, 1 do
+ local xPlayer = ESX.GetPlayerFromId(xPlayers[i])
+ local job = xPlayer.job.grade_name
+ local salary = xPlayer.job.grade_salary
+
+ if salary > 0 then
+ if job == 'unemployed' then -- unemployed
+ xPlayer.addAccountMoney('bank', salary)
+ TriggerClientEvent('esx:showAdvancedNotification', xPlayer.source, _U('bank'), _U('received_paycheck'), _U('received_help', salary), 'CHAR_BANK_MAZE', 9)
+ elseif Config.EnableSocietyPayouts then -- possibly a society
+ TriggerEvent('esx_society:getSociety', xPlayer.job.name, function (society)
+ if society ~= nil then -- verified society
+ TriggerEvent('esx_addonaccount:getSharedAccount', society.account, function (account)
+ if account.money >= salary then -- does the society money to pay its employees?
+ xPlayer.addAccountMoney('bank', salary)
+ account.removeMoney(salary)
+
+ TriggerClientEvent('esx:showAdvancedNotification', xPlayer.source, _U('bank'), _U('received_paycheck'), _U('received_salary', salary), 'CHAR_BANK_MAZE', 9)
+ else
+ TriggerClientEvent('esx:showAdvancedNotification', xPlayer.source, _U('bank'), '', _U('company_nomoney'), 'CHAR_BANK_MAZE', 1)
+ end
+ end)
+ else -- not a society
+ xPlayer.addAccountMoney('bank', salary)
+ TriggerClientEvent('esx:showAdvancedNotification', xPlayer.source, _U('bank'), _U('received_paycheck'), _U('received_salary', salary), 'CHAR_BANK_MAZE', 9)
+ end
+ end)
+ else -- generic job
+ xPlayer.addAccountMoney('bank', salary)
+ TriggerClientEvent('esx:showAdvancedNotification', xPlayer.source, _U('bank'), _U('received_paycheck'), _U('received_salary', salary), 'CHAR_BANK_MAZE', 9)
+ end
+ end
+
+ end
+
+ SetTimeout(Config.PaycheckInterval, payCheck)
+ end
+
+ SetTimeout(Config.PaycheckInterval, payCheck)
+end
diff --git a/[esx]/es_extended/version.json b/[esx]/es_extended/version.json
new file mode 100644
index 00000000..477b5b19
--- /dev/null
+++ b/[esx]/es_extended/version.json
@@ -0,0 +1,5 @@
+{
+ "version": "legacy",
+ "commit" : "1.3.5",
+ "changelog": "\n- Base resources updated to use ESX Legacy improvements\n - Improved functionality for ESX.GetExtendedPlayers to return specific players only\n - "
+}
diff --git a/[esx]/esx_identity/.editorconfig b/[esx]/esx_identity/.editorconfig
new file mode 100644
index 00000000..9b425256
--- /dev/null
+++ b/[esx]/esx_identity/.editorconfig
@@ -0,0 +1,9 @@
+root = true
+
+[*]
+indent_size = 4
+indent_style = tab
+end_of_line = crlf
+charset = utf-8
+trim_trailing_whitespace = true
+insert_final_newline = true
\ No newline at end of file
diff --git a/[esx]/esx_identity/LICENSE b/[esx]/esx_identity/LICENSE
new file mode 100644
index 00000000..30ace6a8
--- /dev/null
+++ b/[esx]/esx_identity/LICENSE
@@ -0,0 +1,674 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc.
+ 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 .
+
+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:
+
+ {project} Copyright (C) {year} {fullname}
+ 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
+.
+
+ 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
+.
\ No newline at end of file
diff --git a/[esx]/esx_identity/README.md b/[esx]/esx_identity/README.md
new file mode 100644
index 00000000..2d466b10
--- /dev/null
+++ b/[esx]/esx_identity/README.md
@@ -0,0 +1,53 @@
+# esx_identity
+
+## Requirements
+* Dependencies For Full Functionality
+ * [esx_skin](https://github.com/ESX-Org/esx_skin)
+ * [esx_policejob](https://github.com/ESX-Org/esx_policejob)
+ * [esx_society](https://github.com/ESX-Org/esx_society)
+
+## Download & Installation
+
+### Using [fvm](https://github.com/qlaffont/fvm-installer)
+```
+fvm install --save --folder=esx esx-org/esx_identity
+```
+
+### Using Git
+```
+cd resources
+git clone https://github.com/ESX-Org/esx_identity [esx]/esx_identity
+```
+
+### Manually
+- Download https://github.com/ESX-Org/esx_identity/archive/master.zip
+- Put it in the `[esx]` directory
+
+## Installation
+- Import `esx_identity.sql` in your database
+- Add this to your `server.cfg`:
+
+```
+start esx_identity
+```
+
+- If you are using esx_policejob or esx_society, you need to enable the following in the scripts' `config.lua`:
+```Config.EnableESXIdentity = true```
+
+### Commands
+```
+/char
+/chardel
+```
+
+# Legal
+### License
+esx_identity - rp characters
+
+Copyright (C) 2015-2020 Jérémie N'gadi
+
+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 http://www.gnu.org/licenses/.
diff --git a/[esx]/esx_identity/client/main.lua b/[esx]/esx_identity/client/main.lua
new file mode 100644
index 00000000..cf5359c1
--- /dev/null
+++ b/[esx]/esx_identity/client/main.lua
@@ -0,0 +1,93 @@
+ESX = nil
+local loadingScreenFinished = false
+
+Citizen.CreateThread(function()
+ while ESX == nil do
+ TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
+ Citizen.Wait(0)
+ end
+end)
+
+RegisterNetEvent('esx_identity:alreadyRegistered')
+AddEventHandler('esx_identity:alreadyRegistered', function()
+ while not loadingScreenFinished do
+ Citizen.Wait(100)
+ end
+
+ TriggerEvent('esx_skin:playerRegistered')
+end)
+
+AddEventHandler('esx:loadingScreenOff', function()
+ loadingScreenFinished = true
+end)
+
+if not Config.UseDeferrals then
+ local guiEnabled, isDead = false, false
+
+ AddEventHandler('esx:onPlayerDeath', function(data)
+ isDead = true
+ end)
+
+ AddEventHandler('esx:onPlayerSpawn', function(spawn)
+ isDead = false
+ end)
+
+ function EnableGui(state)
+ SetNuiFocus(state, state)
+ guiEnabled = state
+
+ SendNUIMessage({
+ type = "enableui",
+ enable = state
+ })
+ end
+
+ RegisterNetEvent('esx_identity:showRegisterIdentity')
+ AddEventHandler('esx_identity:showRegisterIdentity', function()
+ TriggerEvent('esx_skin:resetFirstSpawn')
+
+ if not isDead then
+ EnableGui(true)
+ end
+ end)
+
+ RegisterNUICallback('register', function(data, cb)
+ ESX.TriggerServerCallback('esx_identity:registerIdentity', function(callback)
+ if callback then
+ ESX.ShowNotification(_U('thank_you_for_registering'))
+ EnableGui(false)
+ if not ESX.GetConfig().Multichar then TriggerEvent('esx_skin:playerRegistered') end
+ else
+ ESX.ShowNotification(_U('registration_error'))
+ end
+ end, data)
+ end)
+
+ Citizen.CreateThread(function()
+ while true do
+ Citizen.Wait(5)
+
+ if guiEnabled then
+ DisableControlAction(0, 1, true) -- LookLeftRight
+ DisableControlAction(0, 2, true) -- LookUpDown
+ DisableControlAction(0, 106, true) -- VehicleMouseControlOverride
+ DisableControlAction(0, 142, true) -- MeleeAttackAlternate
+ DisableControlAction(0, 30, true) -- MoveLeftRight
+ DisableControlAction(0, 31, true) -- MoveUpDown
+ DisableControlAction(0, 21, true) -- disable sprint
+ DisableControlAction(0, 24, true) -- disable attack
+ DisableControlAction(0, 25, true) -- disable aim
+ DisableControlAction(0, 47, true) -- disable weapon
+ DisableControlAction(0, 58, true) -- disable weapon
+ DisableControlAction(0, 263, true) -- disable melee
+ DisableControlAction(0, 264, true) -- disable melee
+ DisableControlAction(0, 257, true) -- disable melee
+ DisableControlAction(0, 140, true) -- disable melee
+ DisableControlAction(0, 141, true) -- disable melee
+ DisableControlAction(0, 143, true) -- disable melee
+ DisableControlAction(0, 75, true) -- disable exit vehicle
+ DisableControlAction(27, 75, true) -- disable exit vehicle
+ end
+ end
+ end)
+end
diff --git a/[esx]/esx_identity/config.lua b/[esx]/esx_identity/config.lua
new file mode 100644
index 00000000..2c21e317
--- /dev/null
+++ b/[esx]/esx_identity/config.lua
@@ -0,0 +1,29 @@
+Config = {}
+Config.Locale = 'en'
+
+-- [Config.EnableCommands]
+-- Enables Commands Such As /char and /chardel
+Config.EnableCommands = true
+
+-- [Config.UseSteamID]
+-- Changes the identifiers from Rockstar License To Steam. In order to use this, you will have to have
+-- made edits to your ESX in order to use Steam identifiers all around, because new ESX uses Rockstar
+-- license. I just made it easier for people that convert to steam identifiers.
+
+-- [Config.UseDeferrals]
+-- EXPERIMENTAL Character Registration Method. This will allow players to create identities in deferrals
+-- before they ever join the server. This still needs time of testing to see what issues that we have
+-- in linux servers and windows servers, and which artifacts it will work on, and which artifacts it
+-- will not work on. If you don't know a lot about this, I would suggest to set it false for now.
+Config.UseDeferrals = false -- EXPERIMENTAL Character Registration Method.
+
+
+-- These values are for the second input validation in server/main.lua
+Config.MaxNameLength = 20
+Config.MinHeight = 45
+Config.MaxHeight = 96
+Config.LowestYear = 1900
+Config.HighestYear = 2021
+
+Config.FullCharDelete = false
+Config.EnableDebugging = false
diff --git a/[esx]/esx_identity/esx_identity.sql b/[esx]/esx_identity/esx_identity.sql
new file mode 100644
index 00000000..ed5a3b06
--- /dev/null
+++ b/[esx]/esx_identity/esx_identity.sql
@@ -0,0 +1,9 @@
+USE `es_extended`;
+
+ALTER TABLE `users`
+ ADD COLUMN `firstname` VARCHAR(16) NULL DEFAULT NULL,
+ ADD COLUMN `lastname` VARCHAR(16) NULL DEFAULT NULL,
+ ADD COLUMN `dateofbirth` VARCHAR(10) NULL DEFAULT NULL,
+ ADD COLUMN `sex` VARCHAR(1) NULL DEFAULT NULL,
+ ADD COLUMN `height` INT NULL DEFAULT NULL
+;
diff --git a/[esx]/esx_identity/fxmanifest.lua b/[esx]/esx_identity/fxmanifest.lua
new file mode 100644
index 00000000..72cf2823
--- /dev/null
+++ b/[esx]/esx_identity/fxmanifest.lua
@@ -0,0 +1,41 @@
+fx_version 'adamant'
+
+game 'gta5'
+
+description 'ESX Identity'
+
+version '1.4.0'
+
+server_scripts {
+ '@es_extended/locale.lua',
+ '@mysql-async/lib/MySQL.lua',
+ 'locales/en.lua',
+ 'locales/es.lua',
+ 'locales/cs.lua',
+ 'locales/pl.lua',
+ 'locales/fi.lua',
+ 'config.lua',
+ 'server/main.lua'
+}
+
+client_scripts {
+ '@es_extended/locale.lua',
+ 'locales/en.lua',
+ 'locales/es.lua',
+ 'locales/cs.lua',
+ 'locales/pl.lua',
+ 'locales/fi.lua',
+ 'config.lua',
+ 'client/main.lua'
+}
+
+ui_page 'html/index.html'
+
+files {
+ 'html/index.html',
+ 'html/js/script.js',
+ 'html/css/style.css',
+ 'html/img/esx_identity.png'
+}
+
+dependency 'es_extended'
diff --git a/[esx]/esx_identity/html/css/style.css b/[esx]/esx_identity/html/css/style.css
new file mode 100644
index 00000000..eaa2535e
--- /dev/null
+++ b/[esx]/esx_identity/html/css/style.css
@@ -0,0 +1,127 @@
+body {
+ font-family: sans-serif;
+ overflow: hidden;
+ display: none;
+ color: #000000;
+}
+
+.dialog {
+ width: 332px;
+ opacity : 0.95;
+ position : absolute;
+ margin-left: auto;
+ margin-right: auto;
+ top : 30.0%;
+ padding: 10px;
+ left : 50%; /* à 50%/50% du parent référent */
+ transform : translate(-50%); /* décalage de 50% de sa propre taille */
+ background-color: #B7B7B7;
+ border-radius : 4px;
+ box-shadow: 0px 0px 50px 0px #000;
+ border-left:5px solid #000;
+ border:1px inset;
+ margin:5px;
+ margin-bottom:20px;
+ color: #000000;
+}
+
+input {
+ width: 100%;
+ padding: 10px;
+ text-align:left;
+ color: #000000;
+}
+
+::placeholder { /* Chrome, Firefox, Opera, Safari 10.1+ */
+ color: black;
+ opacity: 1; /* Firefox */
+}
+
+.radio-toolbar input[type="radio"] {
+ opacity: 0;
+ position: absolute;
+ width: 36%;
+}
+
+.radio-toolbar label {
+ display: inline-block;
+ margin-top: 5px;
+ background-color: #ddd;
+ padding: 10px 20px;
+ font-family: sans-serif, Arial;
+ font-size: 16px;
+ color: #000000;
+ border: 2px solid #444;
+ border-radius: 4px;
+ width: 36%;
+}
+
+.radio-toolbar input[type="radio"]:checked + label {
+ width: 36%;
+ background-color:#3399FF;
+ border-color: #0033FF;
+ color: #000000;
+}
+
+.radio-toolbar input[type="radio"]:focus + label {
+ border: 2px solid #444;
+ width: 36%;
+ color: #000000;
+}
+
+.radio-toolbar label:hover {
+ background-color: #dfd;
+ width: 36%;
+ color: #000000;
+}
+
+button {
+ display: block;
+ margin-top: 5px;
+ padding: 10px;
+ background-color: #373737;
+ border: 2px solid #444;
+ color: #FFFFFF;
+ width: 100%;
+}
+
+h1 {
+ display: block;
+ margin-top: 5px;
+ margin-right: 5px;
+ padding: 10px;
+ background-color: #506be6;
+ color: #000000;
+ width: 93%;
+ text-align: center;
+}
+
+.range-wrap {
+ position: relative;
+ margin: 0 auto 3rem;
+}
+
+.range {
+ width: 100%;
+}
+
+.bubble {
+ background: #3399FF;
+ color: black;
+ padding: 4px 12px;
+ position: absolute;
+ border-radius: 4px;
+ left: 50%;
+ transform: translateX(-50%);
+}
+
+.bubble::after {
+ content: "";
+ position: absolute;
+ width: 2px;
+ height: 2px;
+ background: #3399FF;
+ color: black;
+ top: -1px;
+ left: 50%;
+}
\ No newline at end of file
diff --git a/[esx]/esx_identity/html/img/esx_identity.png b/[esx]/esx_identity/html/img/esx_identity.png
new file mode 100644
index 00000000..dcfc17c4
Binary files /dev/null and b/[esx]/esx_identity/html/img/esx_identity.png differ
diff --git a/[esx]/esx_identity/html/index.html b/[esx]/esx_identity/html/index.html
new file mode 100644
index 00000000..182d344a
--- /dev/null
+++ b/[esx]/esx_identity/html/index.html
@@ -0,0 +1,163 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
If the submit button doesn't work, please ensure that you've entered the fields correctly.
+
+
+
\ No newline at end of file
diff --git a/[esx]/esx_identity/html/localization/sv_index(outofdate).html b/[esx]/esx_identity/html/localization/sv_index(outofdate).html
new file mode 100644
index 00000000..7706c17b
--- /dev/null
+++ b/[esx]/esx_identity/html/localization/sv_index(outofdate).html
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/[esx]/esx_identity/locales/cs.lua b/[esx]/esx_identity/locales/cs.lua
new file mode 100644
index 00000000..80c6a267
--- /dev/null
+++ b/[esx]/esx_identity/locales/cs.lua
@@ -0,0 +1,11 @@
+Locales['cs'] = {
+ ['show_registration'] = 'zobrazit registracni menu',
+ ['show_active_character'] = 'zobrazit aktivni postavy',
+ ['delete_character'] = 'smazat svou stavajici postavu a vytvorit novou',
+ ['deleted_character'] = 'vase postava byla smazana.',
+ ['not_registered'] = 'nemas zaregistrovanou postavu.',
+ ['active_character'] = '~b~aktivni postava:~s~ %s %s',
+ ['already_registered'] = 'jiz mas zaregistrovanou postavu.',
+ ['failed_identity'] = 'nastaveni vasi postavy selhalo, zkus to prosim znovu pozdeji nebo kontaktuj majitele serveru!',
+ ['create_a_character'] = 'aby jsi mohl/a hrat, tak se musis registrovat.'
+}
diff --git a/[esx]/esx_identity/locales/en.lua b/[esx]/esx_identity/locales/en.lua
new file mode 100644
index 00000000..165ee7ae
--- /dev/null
+++ b/[esx]/esx_identity/locales/en.lua
@@ -0,0 +1,33 @@
+Locales['en'] = {
+ ['show_active_character'] = 'Show Active Character',
+ ['active_character'] = 'Active Character: ~b~%s~s~',
+ ['error_active_character'] = "There was an error retrieving your name. Please contact an admin.",
+ ['delete_character'] = 'Delete Your Character And Create A New One',
+ ['deleted_character'] = 'Your character has been deleted.',
+ ['error_delete_character'] = "There was an error deleting your character. Please contact an admin.",
+ ['thank_you_for_registering'] = "Thank you for registering. Have fun.",
+ ['registration_error'] = "There was an error during registration. Please contact an admin.",
+ ['debug_xPlayer_get_first_name'] = "Return Your First Name",
+ ['debug_xPlayer_get_last_name'] = "Return Your Last Name",
+ ['debug_xPlayer_get_full_name'] = "Return Your Full Name",
+ ['debug_xPlayer_get_sex'] = "Return Your Sex",
+ ['debug_xPlayer_get_dob'] = "Return Your DOB",
+ ['debug_xPlayer_get_height'] = "Return Your Height",
+ ['error_debug_xPlayer_get_first_name'] = "There was an error retrieving your first name.",
+ ['error_debug_xPlayer_get_last_name'] = "There was an error retrieving your last name.",
+ ['error_debug_xPlayer_get_full_name'] = "There was an error retrieving your full name.",
+ ['error_debug_xPlayer_get_sex'] = "There was an error retrieving your sex.",
+ ['error_debug_xPlayer_get_dob'] = "There was an error retrieving your date of birth.",
+ ['error_debug_xPlayer_get_height'] = "There was an error retrieving your height.",
+ ['return_debug_xPlayer_get_first_name'] = "First Name: ~b~%s",
+ ['return_debug_xPlayer_get_last_name'] = "Last Name: ~b~%s",
+ ['return_debug_xPlayer_get_full_name'] = "Full Name: ~b~%s",
+ ['return_debug_xPlayer_get_sex'] = "Sex: ~b~%s",
+ ['return_debug_xPlayer_get_dob'] = "DOB: ~b~%s",
+ ['return_debug_xPlayer_get_height'] = "Height: ~b~%s Inches",
+ ['data_incorrect'] = 'Data entered incorrectly. Please try again.',
+ ['invalid_format'] = 'Data formatted incorrectly. Please try again.',
+ ['no_identifier'] = 'There was an error loading your character!\nError code: identifier-missing\n\nThe cause of this error is not known, your identifier could not be found. Please come back later or report this problem to the server administration team.',
+ ['missing_identity'] = 'There was an error loading your character!\nError code: identity-missing\n\nIt seems like your identity is missing, try connecting again.',
+ ['deleted_identity'] = 'Your character has been deleted. Please login again in order to create a new character.'
+}
diff --git a/[esx]/esx_identity/locales/es.lua b/[esx]/esx_identity/locales/es.lua
new file mode 100644
index 00000000..2352d302
--- /dev/null
+++ b/[esx]/esx_identity/locales/es.lua
@@ -0,0 +1,33 @@
+Locales['es'] = {
+ ['show_active_character'] = 'Mostrar personaje activo',
+ ['active_character'] = 'Personaje activo: ~b~%s~s~',
+ ['error_active_character'] = "Se produjo un error al recuperar tu nombre. Por favor contacta con un administrador",
+ ['delete_character'] = 'Elimina tu personaje y crea uno nuevo',
+ ['deleted_character'] = 'Tu personaje ha sido eliminado',
+ ['error_delete_character'] = "Se produjo un error al eliminar tu personaje. Por favor contacta con un administrador",
+ ['thank_you_for_registering'] = "Gracias por registrarte. Que te diviertas",
+ ['registration_error'] = "Se ha producido un error durante el registro. Por favor contacta con un administrador",
+ ['debug_xPlayer_get_first_name'] = "Devuelve tu nombre",
+ ['debug_xPlayer_get_last_name'] = "Devuelve tu apellido",
+ ['debug_xPlayer_get_full_name'] = "Devuelve tu nombre completo",
+ ['debug_xPlayer_get_sex'] = "Devuelve tu sexo",
+ ['debug_xPlayer_get_dob'] = "Devuelve tu fecha de nacimiento",
+ ['debug_xPlayer_get_height'] = "Devuelve tu altura",
+ ['error_debug_xPlayer_get_first_name'] = "Se produjo un error al recuperar tu nombre",
+ ['error_debug_xPlayer_get_last_name'] = "Se produjo un error al recuperar tu apellido",
+ ['error_debug_xPlayer_get_full_name'] = "Se produjo un error al recuperar tu nombre completo",
+ ['error_debug_xPlayer_get_sex'] = "Se produjo un error al recuperar tu sexo",
+ ['error_debug_xPlayer_get_dob'] = "Se produjo un error al recuperar tu fecha de nacimiento",
+ ['error_debug_xPlayer_get_height'] = "Se produjo un error al recuperar tu altura",
+ ['return_debug_xPlayer_get_first_name'] = "Nombre: ~b~%s",
+ ['return_debug_xPlayer_get_last_name'] = "Apellido: ~b~%s",
+ ['return_debug_xPlayer_get_full_name'] = "Nombre completo: ~b~%s",
+ ['return_debug_xPlayer_get_sex'] = "Sexo: ~b~%s",
+ ['return_debug_xPlayer_get_dob'] = "Fecha de nacimiento: ~b~%s",
+ ['return_debug_xPlayer_get_height'] = "Altura: ~b~%s centímetros",
+ ['data_incorrect'] = 'Datos introducidos de forma incorrecta. Inténtalo de nuevo',
+ ['invalid_format'] = 'Datos con formato incorrecto. Inténtalo de nuevo',
+ ['no_identifier'] = '¡Se ha producido un error al cargar tu personaje!\nCódigo de error: identifier-missing\n\nSe desconoce la causa de este error, no se pudo encontrar su identificador. Regrese más tarde o informe este problema al equipo de administración del servidor',
+ ['missing_identity'] = '¡Se ha producido un error al cargar tu personaje!\nCódigo de error: identity-missing\n\nParece que falta su identidad, intente conectarse nuevamente',
+ ['deleted_identity'] = 'Tu personaje ha sido borrado. Vuelva a iniciar sesión para crear un nuevo personaje'
+}
diff --git a/[esx]/esx_identity/locales/fi.lua b/[esx]/esx_identity/locales/fi.lua
new file mode 100644
index 00000000..a1720782
--- /dev/null
+++ b/[esx]/esx_identity/locales/fi.lua
@@ -0,0 +1,33 @@
+Locales['fi'] = {
+ ['show_active_character'] = 'Näytä nykyinen hahmosi',
+ ['active_character'] = 'Nykyinen hahmosi: ~b~%s~s~',
+ ['error_active_character'] = "Hahmosi hakemisessa ilmeni ongelma. Ota yhteyttä ylläpitoon.",
+ ['delete_character'] = 'Poista hahmosi ja luo uusi.',
+ ['deleted_character'] = 'Hahmosi on poistetu.',
+ ['error_delete_character'] = "Hahmosi poistossa ilmeni ongelma. Ota yhteyttä ylläpitoon.",
+ ['thank_you_for_registering'] = "Kiitos registeröitymisestä. Pidä hauskaa!",
+ ['registration_error'] = "Registeröinnissä ilmeni ongelma. Ota yhteyttä ylläpitoon.",
+ ['debug_xPlayer_get_first_name'] = "Palauta etunimi",
+ ['debug_xPlayer_get_last_name'] = "Palauta sukunimi",
+ ['debug_xPlayer_get_full_name'] = "Palauta kokonimi",
+ ['debug_xPlayer_get_sex'] = "Palauta sukupuoli",
+ ['debug_xPlayer_get_dob'] = "Palauta syntymäpäivä",
+ ['debug_xPlayer_get_height'] = "Palauta pituus",
+ ['error_debug_xPlayer_get_first_name'] = "Hahmosi etunimen haussa ilmeni ongelma.",
+ ['error_debug_xPlayer_get_last_name'] = "Hahmosi sukunimen haussa ilmeni ongelma.",
+ ['error_debug_xPlayer_get_full_name'] = "Hahmosi kokonimen haussa ilmeni ongelma.",
+ ['error_debug_xPlayer_get_sex'] = "Hahmosi sukupuolen haussa ilmeni ongelma.",
+ ['error_debug_xPlayer_get_dob'] = "Hahmosi syntymäpäivän haussa ilmeni ongelma.",
+ ['error_debug_xPlayer_get_height'] = "Hahmosi pituuden haussa ilmeni ongelma.",
+ ['return_debug_xPlayer_get_first_name'] = "Etunimi: ~b~%s",
+ ['return_debug_xPlayer_get_last_name'] = "Sukunimi: ~b~%s",
+ ['return_debug_xPlayer_get_full_name'] = "Kokonimi: ~b~%s",
+ ['return_debug_xPlayer_get_sex'] = "Sukupuoli: ~b~%s",
+ ['return_debug_xPlayer_get_dob'] = "Syntymäpäivä: ~b~%s",
+ ['return_debug_xPlayer_get_height'] = "Pituus: ~b~%s CM",
+ ['data_incorrect'] = 'Data syötetty väärin. Yritä uudelleen.',
+ ['invalid_format'] = 'Data syötetty väärässä muodossa. Yritä uudelleen.',
+ ['no_identifier'] = 'Hahmosi lataamisessa ilmeni ongelma!\nVirhekoodi: identifier-missing\n\nVirhekoodin syytä ei tiedetä, joten ota yhteyttä ylläpitoon.',
+ ['missing_identity'] = 'Hahmosi lataamisessa ilmeni ongelma!\nError code: identity-missing\n\nNäyttää että hahmoasi ei ole olemassa. Kokeile yhdistää uudelleen tai ota yhteyttä ylläpitoon',
+ ['deleted_identity'] = 'Hahmosi on poistetu. Yhdistä uudestaan palvelimelle luodaksesi uuden hahmosi.'
+}
diff --git a/[esx]/esx_identity/locales/pl.lua b/[esx]/esx_identity/locales/pl.lua
new file mode 100644
index 00000000..72b2d38a
--- /dev/null
+++ b/[esx]/esx_identity/locales/pl.lua
@@ -0,0 +1,33 @@
+Locales['pl'] = {
+ ['show_active_character'] = 'Pokaż aktywną postać',
+ ['active_character'] = 'Aktywna postać: ~b~%s~s~',
+ ['error_active_character'] = "Podczas pobierania Twojego imienia wystąpił błąd. Proszę skontaktować się z administratorem.",
+ ['delete_character'] = 'Usuń swoją postać i stwórz nową',
+ ['deleted_character'] = 'Twoja postać została usunięta.',
+ ['error_delete_character'] = "Wystąpił błąd podczas usuwania twojej postaci. Proszę skontaktować się z administratorem.",
+ ['thank_you_for_registering'] = "Dziękujemy za rejestrację. Baw się dobrze.",
+ ['registration_error'] = "Wystąpił błąd podczas rejestracji. Proszę skontaktować się z administratorem.",
+ ['debug_xPlayer_get_first_name'] = "Podaj swoje imię",
+ ['debug_xPlayer_get_last_name'] = "Podaj swoje nazwisko",
+ ['debug_xPlayer_get_full_name'] = "Podaj swoją pełną nazwę",
+ ['debug_xPlayer_get_sex'] = "Podaj swoją płeć",
+ ['debug_xPlayer_get_dob'] = "Podaj swoją datę urodzenia",
+ ['debug_xPlayer_get_height'] = "Podaj swój wzrost",
+ ['error_debug_xPlayer_get_first_name'] = "Podczas pobierania twojego imienia wystąpił błąd.",
+ ['error_debug_xPlayer_get_last_name'] = "Podczas pobierania twojego nazwiska wystąpił błąd.",
+ ['error_debug_xPlayer_get_full_name'] = "Podczas pobierania twojego pełnego imienia wystąpił błąd.",
+ ['error_debug_xPlayer_get_sex'] = "Podczas pobierania twojej płci wystąpił błąd.",
+ ['error_debug_xPlayer_get_dob'] = "Podczas pobierania daty urodzenia wystąpił błąd.",
+ ['error_debug_xPlayer_get_height'] = "Podczas pobierania wzrostu wystąpił błąd.",
+ ['return_debug_xPlayer_get_first_name'] = "Imię: ~b~%s",
+ ['return_debug_xPlayer_get_last_name'] = "Nazwisko: ~b~%s",
+ ['return_debug_xPlayer_get_full_name'] = "Pełna nazwa: ~b~%s",
+ ['return_debug_xPlayer_get_sex'] = "Płeć: ~b~%s",
+ ['return_debug_xPlayer_get_dob'] = "Data urodzenia: ~b~%s",
+ ['return_debug_xPlayer_get_height'] = "Wzrost: ~b~%s centymetrów",
+ ['data_incorrect'] = 'Data została wprowadzona niepoprawnie. Proszę spróbuj ponownie.',
+ ['invalid_format'] = 'Data została wprowadzona niepoprawnie. Proszę spróbuj ponownie.',
+ ['no_identifier'] = 'Wystąpił błąd podczas ładowania twojej postaci!\nKod błędu: identifier-missing\n\nPrzyczyna tego błędu nie jest znana, nie można znaleźć Twojego identyfikatora. Wróć później lub zgłoś ten problem zespołowi administracyjnemu serwera.',
+ ['missing_identity'] = 'Wystąpił błąd podczas ładowania twojej postaci!\nKod błędu: identity-missing\n\nWygląda na to, że brakuje Twojej tożsamości, spróbuj połączyć się ponownie.',
+ ['deleted_identity'] = 'Twoja postać została usunięta. Dołącz ponownie, aby utworzyć nową postać.'
+}
diff --git a/[esx]/esx_identity/server/main.lua b/[esx]/esx_identity/server/main.lua
new file mode 100644
index 00000000..ba3de70b
--- /dev/null
+++ b/[esx]/esx_identity/server/main.lua
@@ -0,0 +1,547 @@
+ESX = nil
+TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
+local playerIdentity = {}
+local alreadyRegistered = {}
+local multichar = ESX.GetConfig().Multichar
+
+if multichar == nil then
+ ESX.GetIdentifier = function(playerId)
+ for k,v in ipairs(GetPlayerIdentifiers(playerId)) do
+ if string.match(v, 'license:') then
+ local identifier = string.gsub(v, 'license:', '')
+ return identifier
+ end
+ end
+ end
+end
+
+if Config.UseDeferrals then
+ AddEventHandler('playerConnecting', function(playerName, setKickReason, deferrals)
+ deferrals.defer()
+ local playerId, identifier = source, ESX.GetIdentifier(source)
+ Citizen.Wait(100)
+
+ if identifier then
+ MySQL.Async.fetchAll('SELECT firstname, lastname, dateofbirth, sex, height FROM users WHERE identifier = @identifier', {
+ ['@identifier'] = identifier
+ }, function(result)
+ if result[1] then
+ if result[1].firstname then
+ playerIdentity[identifier] = {
+ firstName = result[1].firstname,
+ lastName = result[1].lastname,
+ dateOfBirth = result[1].dateofbirth,
+ sex = result[1].sex,
+ height = result[1].height
+ }
+
+ deferrals.done()
+ else
+ deferrals.presentCard([==[{"type": "AdaptiveCard","body":[{"type":"Container","items":[{"type":"ColumnSet","columns":[{"type":"Column","items":[{"type":"Input.Text","placeholder":"First Name","id":"firstname","maxLength":15},{"type":"Input.Text","placeholder":"Date of Birth (MM/DD/YYYY)","id":"dateofbirth","maxLength":10}],"width":"stretch"},{"type":"Column","width":"stretch","items":[{"type":"Input.Text","placeholder":"Last Name","id":"lastname","maxLength":15},{"type":"Input.Text","placeholder":"Height (48-96 inches)","id":"height","maxLength":2}]}]},{"type":"Input.ChoiceSet","placeholder":"Sex","choices":[{"title":"Male","value":"m"},{"title":"Female","value":"f"}],"style":"expanded","id":"sex"}]},{"type": "ActionSet","actions": [{"type":"Action.Submit","title":"Submit"}]}],"$schema": "http://adaptivecards.io/schemas/adaptive-card.json","version":"1.0"}]==], function(data, rawData)
+ if data.firstname == '' or data.lastname == '' or data.dateofbirth == '' or data.sex == '' or data.height == '' then
+ deferrals.done(_U('data_incorrect'))
+ else
+ if checkNameFormat(data.firstname) and checkNameFormat(data.lastname) and checkDOBFormat(data.dateofbirth) and checkSexFormat(data.sex) and checkHeightFormat(data.height) then
+ playerIdentity[identifier] = {
+ firstName = formatName(data.firstname),
+ lastName = formatName(data.lastname),
+ dateOfBirth = data.dateofbirth,
+ sex = data.sex,
+ height = tonumber(data.height),
+ saveToDatabase = true
+ }
+
+ deferrals.done()
+ else
+ deferrals.done(_U('invalid_format'))
+ end
+ end
+ end)
+ end
+ else
+ deferrals.presentCard([==[{"type": "AdaptiveCard","body":[{"type":"Container","items":[{"type":"ColumnSet","columns":[{"type":"Column","items":[{"type":"Input.Text","placeholder":"First Name","id":"firstname","maxLength":15},{"type":"Input.Text","placeholder":"Date of Birth (MM/DD/YYYY)","id":"dateofbirth","maxLength":10}],"width":"stretch"},{"type":"Column","width":"stretch","items":[{"type":"Input.Text","placeholder":"Last Name","id":"lastname","maxLength":15},{"type":"Input.Text","placeholder":"Height (48-96 inches)","id":"height","maxLength":2}]}]},{"type":"Input.ChoiceSet","placeholder":"Sex","choices":[{"title":"Male","value":"m"},{"title":"Female","value":"f"}],"style":"expanded","id":"sex"}]},{"type": "ActionSet","actions": [{"type":"Action.Submit","title":"Submit"}]}],"$schema": "http://adaptivecards.io/schemas/adaptive-card.json","version":"1.0"}]==], function(data, rawData)
+ if data.firstname == '' or data.lastname == '' or data.dateofbirth == '' or data.sex == '' or data.height == '' then
+ deferrals.done(_U('data_incorrect'))
+ else
+ if checkNameFormat(data.firstname) and checkNameFormat(data.lastname) and checkDOBFormat(data.dateofbirth) and checkSexFormat(data.sex) and checkHeightFormat(data.height) then
+ playerIdentity[identifier] = {
+ firstName = formatName(data.firstname),
+ lastName = formatName(data.lastname),
+ dateOfBirth = data.dateofbirth,
+ sex = data.sex,
+ height = tonumber(data.height),
+ saveToDatabase = true
+ }
+
+ deferrals.done()
+ else
+ deferrals.done(_U('invalid_format'))
+ end
+ end
+ end)
+ end
+ end)
+ else
+ deferrals.done(_U('no_identifier'))
+ end
+ end)
+
+ RegisterNetEvent('esx:playerLoaded')
+ AddEventHandler('esx:playerLoaded', function(playerId, xPlayer)
+ if playerIdentity[xPlayer.identifier] then
+ local currentIdentity = playerIdentity[xPlayer.identifier]
+
+ xPlayer.setName(('%s %s'):format(currentIdentity.firstName, currentIdentity.lastName))
+ xPlayer.set('firstName', currentIdentity.firstName)
+ xPlayer.set('lastName', currentIdentity.lastName)
+ xPlayer.set('dateofbirth', currentIdentity.dateOfBirth)
+ xPlayer.set('sex', currentIdentity.sex)
+ xPlayer.set('height', currentIdentity.height)
+
+ if currentIdentity.saveToDatabase then
+ saveIdentityToDatabase(xPlayer.identifier, currentIdentity)
+ end
+
+ Citizen.Wait(5)
+ alreadyRegistered[xPlayer.identifier] = true
+ TriggerClientEvent('esx_identity:alreadyRegistered', xPlayer.source)
+
+ playerIdentity[xPlayer.identifier] = nil
+ else
+ xPlayer.kick(_('missing_identity'))
+ end
+ end)
+
+elseif not Config.UseDeferrals then
+ if not multichar then
+ AddEventHandler('playerConnecting', function(playerName, setKickReason, deferrals)
+ deferrals.defer()
+ local playerId, identifier = source, ESX.GetIdentifier(source)
+ Citizen.Wait(40)
+
+ if identifier then
+ MySQL.Async.fetchAll('SELECT firstname, lastname, dateofbirth, sex, height FROM users WHERE identifier = @identifier', {
+ ['@identifier'] = identifier
+ }, function(result)
+ if result[1] then
+ if result[1].firstname then
+ playerIdentity[identifier] = {
+ firstName = result[1].firstname,
+ lastName = result[1].lastname,
+ dateOfBirth = result[1].dateofbirth,
+ sex = result[1].sex,
+ height = result[1].height
+ }
+
+ alreadyRegistered[identifier] = true
+
+ deferrals.done()
+ else
+ playerIdentity[identifier] = nil
+ alreadyRegistered[identifier] = false
+ deferrals.done()
+ end
+ else
+ playerIdentity[identifier] = nil
+ alreadyRegistered[identifier] = false
+ deferrals.done()
+ end
+ end)
+ else
+ deferrals.done(_U('no_identifier'))
+ end
+ end)
+
+ AddEventHandler('onResourceStart', function(resource)
+ if resource == GetCurrentResourceName() then
+ Citizen.Wait(300)
+
+ while not ESX do
+ Citizen.Wait(10)
+ end
+
+ local xPlayers = ESX.GetPlayers()
+
+ for i=1, #xPlayers, 1 do
+ local xPlayer = ESX.GetPlayerFromId(xPlayers[i])
+
+ if xPlayer then
+ checkIdentity(xPlayer)
+ end
+ end
+ end
+ end)
+
+ RegisterNetEvent('esx:playerLoaded')
+ AddEventHandler('esx:playerLoaded', function(playerId, xPlayer)
+ local currentIdentity = playerIdentity[xPlayer.identifier]
+ if currentIdentity and alreadyRegistered[xPlayer.identifier] == true then
+
+ xPlayer.setName(('%s %s'):format(currentIdentity.firstName, currentIdentity.lastName))
+ xPlayer.set('firstName', currentIdentity.firstName)
+ xPlayer.set('lastName', currentIdentity.lastName)
+ xPlayer.set('dateofbirth', currentIdentity.dateOfBirth)
+ xPlayer.set('sex', currentIdentity.sex)
+ xPlayer.set('height', currentIdentity.height)
+
+ if currentIdentity.saveToDatabase then
+ saveIdentityToDatabase(xPlayer.identifier, currentIdentity)
+ end
+
+ Citizen.Wait(10)
+ TriggerClientEvent('esx_identity:alreadyRegistered', xPlayer.source)
+
+ playerIdentity[xPlayer.identifier] = nil
+ else
+ TriggerClientEvent('esx_identity:showRegisterIdentity', xPlayer.source)
+ end
+ end)
+ end
+
+ ESX.RegisterServerCallback('esx_identity:registerIdentity', function(source, cb, data)
+ local xPlayer = ESX.GetPlayerFromId(source)
+
+ if xPlayer then
+ if not alreadyRegistered[xPlayer.identifier] then
+ if checkNameFormat(data.firstname) and checkNameFormat(data.lastname) and checkSexFormat(data.sex) and checkDOBFormat(data.dateofbirth) and checkHeightFormat(data.height) then
+ playerIdentity[xPlayer.identifier] = {
+ firstName = formatName(data.firstname),
+ lastName = formatName(data.lastname),
+ dateOfBirth = data.dateofbirth,
+ sex = data.sex,
+ height = data.height
+ }
+
+ local currentIdentity = playerIdentity[xPlayer.identifier]
+
+ xPlayer.setName(('%s %s'):format(currentIdentity.firstName, currentIdentity.lastName))
+ xPlayer.set('firstName', currentIdentity.firstName)
+ xPlayer.set('lastName', currentIdentity.lastName)
+ xPlayer.set('dateofbirth', currentIdentity.dateOfBirth)
+ xPlayer.set('sex', currentIdentity.sex)
+ xPlayer.set('height', currentIdentity.height)
+
+ saveIdentityToDatabase(xPlayer.identifier, currentIdentity)
+ alreadyRegistered[xPlayer.identifier] = true
+
+ playerIdentity[xPlayer.identifier] = nil
+ cb(true)
+ else
+ cb(false)
+ end
+ else
+ cb(false)
+ end
+ else
+ if multichar and checkNameFormat(data.firstname) and checkNameFormat(data.lastname) and checkSexFormat(data.sex) and checkDOBFormat(data.dateofbirth) and checkHeightFormat(data.height) then
+ TriggerEvent('esx_identity:completedRegistration', source, data)
+ cb(true)
+ end
+ end
+ end)
+
+ function checkIdentity(xPlayer)
+ MySQL.Async.fetchAll('SELECT firstname, lastname, dateofbirth, sex, height FROM users WHERE identifier = @identifier', {
+ ['@identifier'] = xPlayer.identifier
+ }, function(result)
+ if result[1] then
+ if result[1].firstname then
+ playerIdentity[xPlayer.identifier] = {
+ firstName = result[1].firstname,
+ lastName = result[1].lastname,
+ dateOfBirth = result[1].dateofbirth,
+ sex = result[1].sex,
+ height = result[1].height
+ }
+
+ alreadyRegistered[xPlayer.identifier] = true
+
+ setIdentity(xPlayer)
+ else
+ playerIdentity[xPlayer.identifier] = nil
+ alreadyRegistered[xPlayer.identifier] = false
+ TriggerClientEvent('esx_identity:showRegisterIdentity', xPlayer.source)
+ end
+ else
+ TriggerClientEvent('esx_identity:showRegisterIdentity', xPlayer.source)
+ end
+ end)
+ end
+
+ function setIdentity(xPlayer)
+ if alreadyRegistered[xPlayer.identifier] then
+ local currentIdentity = playerIdentity[xPlayer.identifier]
+
+ xPlayer.setName(('%s %s'):format(currentIdentity.firstName, currentIdentity.lastName))
+ xPlayer.set('firstName', currentIdentity.firstName)
+ xPlayer.set('lastName', currentIdentity.lastName)
+ xPlayer.set('dateofbirth', currentIdentity.dateOfBirth)
+ xPlayer.set('sex', currentIdentity.sex)
+ xPlayer.set('height', currentIdentity.height)
+
+ if currentIdentity.saveToDatabase then
+ saveIdentityToDatabase(xPlayer.identifier, currentIdentity)
+ end
+
+ playerIdentity[xPlayer.identifier] = nil
+ end
+ end
+end
+
+if Config.EnableCommands then
+ ESX.RegisterCommand('char', 'user', function(xPlayer, args, showError)
+ if xPlayer and xPlayer.getName() then
+ xPlayer.showNotification(_U('active_character', xPlayer.getName()))
+ else
+ xPlayer.showNotification(_U('error_active_character'))
+ end
+ end, false, {help = _U('show_active_character')})
+
+ ESX.RegisterCommand('chardel', 'user', function(xPlayer, args, showError)
+ if xPlayer and xPlayer.getName() then
+ if Config.UseDeferrals then
+ xPlayer.kick(_('deleted_identity'))
+ Citizen.Wait(1500)
+ deleteIdentity(xPlayer)
+ xPlayer.showNotification(_U('deleted_character'))
+ playerIdentity[xPlayer.identifier] = nil
+ alreadyRegistered[xPlayer.identifier] = false
+ else
+ deleteIdentity(xPlayer)
+ xPlayer.showNotification(_U('deleted_character'))
+ playerIdentity[xPlayer.identifier] = nil
+ alreadyRegistered[xPlayer.identifier] = false
+ TriggerClientEvent('esx_identity:showRegisterIdentity', xPlayer.source)
+ end
+ else
+ xPlayer.showNotification(_U('error_delete_character'))
+ end
+ end, false, {help = _U('delete_character')})
+end
+
+if Config.EnableDebugging then
+ ESX.RegisterCommand('xPlayerGetFirstName', 'user', function(xPlayer, args, showError)
+ if xPlayer and xPlayer.get('firstName') then
+ xPlayer.showNotification(_U('return_debug_xPlayer_get_first_name', xPlayer.get('firstName')))
+ else
+ xPlayer.showNotification(_U('error_debug_xPlayer_get_first_name'))
+ end
+ end, false, {help = _U('debug_xPlayer_get_first_name')})
+
+ ESX.RegisterCommand('xPlayerGetLastName', 'user', function(xPlayer, args, showError)
+ if xPlayer and xPlayer.get('lastName') then
+ xPlayer.showNotification(_U('return_debug_xPlayer_get_last_name', xPlayer.get('lastName')))
+ else
+ xPlayer.showNotification(_U('error_debug_xPlayer_get_last_name'))
+ end
+ end, false, {help = _U('debug_xPlayer_get_last_name')})
+
+ ESX.RegisterCommand('xPlayerGetFullName', 'user', function(xPlayer, args, showError)
+ if xPlayer and xPlayer.getName() then
+ xPlayer.showNotification(_U('return_debug_xPlayer_get_full_name', xPlayer.getName()))
+ else
+ xPlayer.showNotification(_U('error_debug_xPlayer_get_full_name'))
+ end
+ end, false, {help = _U('debug_xPlayer_get_full_name')})
+
+ ESX.RegisterCommand('xPlayerGetSex', 'user', function(xPlayer, args, showError)
+ if xPlayer and xPlayer.get('sex') then
+ xPlayer.showNotification(_U('return_debug_xPlayer_get_sex', xPlayer.get('sex')))
+ else
+ xPlayer.showNotification(_U('error_debug_xPlayer_get_sex'))
+ end
+ end, false, {help = _U('debug_xPlayer_get_sex')})
+
+ ESX.RegisterCommand('xPlayerGetDOB', 'user', function(xPlayer, args, showError)
+ if xPlayer and xPlayer.get('dateofbirth') then
+ xPlayer.showNotification(_U('return_debug_xPlayer_get_dob', xPlayer.get('dateofbirth')))
+ else
+ xPlayer.showNotification(_U('error_debug_xPlayer_get_dob'))
+ end
+ end, false, {help = _U('debug_xPlayer_get_dob')})
+
+ ESX.RegisterCommand('xPlayerGetHeight', 'user', function(xPlayer, args, showError)
+ if xPlayer and xPlayer.get('height') then
+ xPlayer.showNotification(_U('return_debug_xPlayer_get_height', xPlayer.get('height')))
+ else
+ xPlayer.showNotification(_U('error_debug_xPlayer_get_height'))
+ end
+ end, false, {help = _U('debug_xPlayer_get_height')})
+end
+
+function deleteIdentity(xPlayer)
+ if alreadyRegistered[xPlayer.identifier] then
+ xPlayer.setName(('%s %s'):format(nil, nil))
+ xPlayer.set('firstName', nil)
+ xPlayer.set('lastName', nil)
+ xPlayer.set('dateofbirth', nil)
+ xPlayer.set('sex', nil)
+ xPlayer.set('height', nil)
+
+ deleteIdentityFromDatabase(xPlayer)
+ end
+end
+
+function saveIdentityToDatabase(identifier, identity)
+ MySQL.Sync.execute('UPDATE users SET firstname = @firstname, lastname = @lastname, dateofbirth = @dateofbirth, sex = @sex, height = @height WHERE identifier = @identifier', {
+ ['@identifier'] = identifier,
+ ['@firstname'] = identity.firstName,
+ ['@lastname'] = identity.lastName,
+ ['@dateofbirth'] = identity.dateOfBirth,
+ ['@sex'] = identity.sex,
+ ['@height'] = identity.height
+ })
+end
+
+function deleteIdentityFromDatabase(xPlayer)
+ MySQL.Sync.execute('UPDATE users SET firstname = @firstname, lastname = @lastname, dateofbirth = @dateofbirth, sex = @sex, height = @height , skin = @skin WHERE identifier = @identifier', {
+ ['@identifier'] = xPlayer.identifier,
+ ['@firstname'] = NULL,
+ ['@lastname'] = NULL,
+ ['@dateofbirth'] = NULL,
+ ['@sex'] = NULL,
+ ['@height'] = NULL,
+ ['@skin'] = NULL
+ })
+
+ if Config.FullCharDelete then
+ MySQL.Sync.execute('UPDATE addon_account_data SET money = 0 WHERE account_name = @account_name AND owner = @owner', {
+ ['@account_name'] = 'bank_savings',
+ ['@owner'] = xPlayer.identifier
+ })
+
+ MySQL.Sync.execute('UPDATE addon_account_data SET money = 0 WHERE account_name = @account_name AND owner = @owner', {
+ ['@account_name'] = 'caution',
+ ['@owner'] = xPlayer.identifier
+ })
+
+ MySQL.Sync.execute('UPDATE datastore_data SET data = @data WHERE name = @name AND owner = @owner', {
+ ['@data'] = '\'{}\'',
+ ['@name'] = 'user_ears',
+ ['@owner'] = xPlayer.identifier
+ })
+
+ MySQL.Sync.execute('UPDATE datastore_data SET data = @data WHERE name = @name AND owner = @owner', {
+ ['@data'] = '\'{}\'',
+ ['@name'] = 'user_glasses',
+ ['@owner'] = xPlayer.identifier
+ })
+
+ MySQL.Sync.execute('UPDATE datastore_data SET data = @data WHERE name = @name AND owner = @owner', {
+ ['@data'] = '\'{}\'',
+ ['@name'] = 'user_helmet',
+ ['@owner'] = xPlayer.identifier
+ })
+
+ MySQL.Sync.execute('UPDATE datastore_data SET data = @data WHERE name = @name AND owner = @owner', {
+ ['@data'] = '\'{}\'',
+ ['@name'] = 'user_mask',
+ ['@owner'] = xPlayer.identifier
+ })
+ end
+end
+
+function checkNameFormat(name)
+ if not checkAlphanumeric(name) then
+ if not checkForNumbers(name) then
+ local stringLength = string.len(name)
+ if stringLength > 0 and stringLength < Config.MaxNameLength then
+ return true
+ else
+ return false
+ end
+ else
+ return false
+ end
+ else
+ return false
+ end
+end
+
+function checkDOBFormat(dob)
+ local date = tostring(dob)
+ if checkDate(date) then
+ return true
+ else
+ return false
+ end
+end
+
+function checkSexFormat(sex)
+ if sex == "m" or sex == "M" or sex == "f" or sex == "F" then
+ return true
+ else
+ return false
+ end
+end
+
+function checkHeightFormat(height)
+ local numHeight = tonumber(height)
+ if numHeight < Config.MinHeight and numHeight > Config.MaxHeight then
+ return false
+ else
+ return true
+ end
+end
+
+function formatName(name)
+ local loweredName = convertToLowerCase(name)
+ local formattedName = convertFirstLetterToUpper(loweredName)
+ return formattedName
+end
+
+function convertToLowerCase(str)
+ return string.lower(str)
+end
+
+function convertFirstLetterToUpper(str)
+ return str:gsub("^%l", string.upper)
+end
+
+function checkAlphanumeric(str)
+ return (string.match(str, "%W"))
+end
+
+function checkForNumbers(str)
+ return (string.match(str,"%d"))
+end
+
+function checkDate(str)
+ if string.match(str, '(%d%d)/(%d%d)/(%d%d%d%d)') ~= nil then
+ local m, d, y = string.match(str, '(%d+)/(%d+)/(%d+)')
+ m = tonumber(m)
+ d = tonumber(d)
+ y = tonumber(y)
+ if ((d <= 0) or (d > 31)) or ((m <= 0) or (m > 12)) or ((y <= Config.LowestYear) or (y > Config.HighestYear)) then
+ return false
+ elseif m == 4 or m == 6 or m == 9 or m == 11 then
+ if d > 30 then
+ return false
+ else
+ return true
+ end
+ elseif m == 2 then
+ if y%400 == 0 or (y%100 ~= 0 and y%4 == 0) then
+ if d > 29 then
+ return false
+ else
+ return true
+ end
+ else
+ if d > 28 then
+ return false
+ else
+ return true
+ end
+ end
+ else
+ if d > 31 then
+ return false
+ else
+ return true
+ end
+ end
+ else
+ return false
+ end
+end
diff --git a/[esx]/esx_menu_default/.editorconfig b/[esx]/esx_menu_default/.editorconfig
new file mode 100644
index 00000000..9b425256
--- /dev/null
+++ b/[esx]/esx_menu_default/.editorconfig
@@ -0,0 +1,9 @@
+root = true
+
+[*]
+indent_size = 4
+indent_style = tab
+end_of_line = crlf
+charset = utf-8
+trim_trailing_whitespace = true
+insert_final_newline = true
\ No newline at end of file
diff --git a/[esx]/esx_menu_default/LICENSE b/[esx]/esx_menu_default/LICENSE
new file mode 100644
index 00000000..3b39cdcf
--- /dev/null
+++ b/[esx]/esx_menu_default/LICENSE
@@ -0,0 +1,674 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc.
+ 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.
+
+ fxserver-esx_menu_default
+ Copyright (C) 2015 Jérémie N'gadi
+
+ 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 .
+
+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:
+
+ fxserver-esx_menu_default Copyright (C) 2015 Jérémie N'gadi
+ 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
+.
+
+ 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
+.
\ No newline at end of file
diff --git a/[esx]/esx_menu_default/README.md b/[esx]/esx_menu_default/README.md
new file mode 100644
index 00000000..7a2235e4
--- /dev/null
+++ b/[esx]/esx_menu_default/README.md
@@ -0,0 +1,2 @@
+# esx_menu_default
+ESX Menu Default
diff --git a/[esx]/esx_menu_default/client/main.lua b/[esx]/esx_menu_default/client/main.lua
new file mode 100644
index 00000000..a8b2f6f8
--- /dev/null
+++ b/[esx]/esx_menu_default/client/main.lua
@@ -0,0 +1,101 @@
+ESX = nil
+
+Citizen.CreateThread(function()
+ while ESX == nil do
+ Citizen.Wait(5)
+ TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
+ end
+
+ local GUI, MenuType = {}, 'default'
+ GUI.Time = 0
+
+ local openMenu = function(namespace, name, data)
+ SendNUIMessage({
+ action = 'openMenu',
+ namespace = namespace,
+ name = name,
+ data = data
+ })
+ end
+
+ local closeMenu = function(namespace, name)
+ SendNUIMessage({
+ action = 'closeMenu',
+ namespace = namespace,
+ name = name,
+ data = data
+ })
+ end
+
+ ESX.UI.Menu.RegisterType(MenuType, openMenu, closeMenu)
+
+ AddEventHandler('esx_menu_default:message:menu_submit', function(data)
+ local menu = ESX.UI.Menu.GetOpened(MenuType, data._namespace, data._name)
+
+ if menu.submit ~= nil then
+ menu.submit(data, menu)
+ end
+ end)
+
+ AddEventHandler('esx_menu_default:message:menu_cancel', function(data)
+ local menu = ESX.UI.Menu.GetOpened(MenuType, data._namespace, data._name)
+
+ if menu.cancel ~= nil then
+ menu.cancel(data, menu)
+ end
+ end)
+
+ AddEventHandler('esx_menu_default:message:menu_change', function(data)
+ local menu = ESX.UI.Menu.GetOpened(MenuType, data._namespace, data._name)
+
+ for i=1, #data.elements, 1 do
+ menu.setElement(i, 'value', data.elements[i].value)
+
+ if data.elements[i].selected then
+ menu.setElement(i, 'selected', true)
+ else
+ menu.setElement(i, 'selected', false)
+ end
+ end
+
+ if menu.change ~= nil then
+ menu.change(data, menu)
+ end
+ end)
+
+ Citizen.CreateThread(function()
+ while true do
+ Citizen.Wait(15)
+
+ if IsControlPressed(0, 18) and IsInputDisabled(0) and (GetGameTimer() - GUI.Time) > 150 then
+ SendNUIMessage({action = 'controlPressed', control = 'ENTER'})
+ GUI.Time = GetGameTimer()
+ end
+
+ if IsControlPressed(0, 177) and IsInputDisabled(0) and (GetGameTimer() - GUI.Time) > 150 then
+ SendNUIMessage({action = 'controlPressed', control = 'BACKSPACE'})
+ GUI.Time = GetGameTimer()
+ end
+
+ if IsControlPressed(0, 27) and IsInputDisabled(0) and (GetGameTimer() - GUI.Time) > 200 then
+ SendNUIMessage({action = 'controlPressed', control = 'TOP'})
+ GUI.Time = GetGameTimer()
+ end
+
+ if IsControlPressed(0, 173) and IsInputDisabled(0) and (GetGameTimer() - GUI.Time) > 200 then
+ SendNUIMessage({action = 'controlPressed', control = 'DOWN'})
+ GUI.Time = GetGameTimer()
+ end
+
+ if IsControlPressed(0, 174) and IsInputDisabled(0) and (GetGameTimer() - GUI.Time) > 150 then
+ SendNUIMessage({action = 'controlPressed', control = 'LEFT'})
+ GUI.Time = GetGameTimer()
+ end
+
+ if IsControlPressed(0, 175) and IsInputDisabled(0) and (GetGameTimer() - GUI.Time) > 150 then
+ SendNUIMessage({action = 'controlPressed', control = 'RIGHT'})
+ GUI.Time = GetGameTimer()
+ end
+ end
+ end)
+end)
diff --git a/[esx]/esx_menu_default/fxmanifest.lua b/[esx]/esx_menu_default/fxmanifest.lua
new file mode 100644
index 00000000..ad8b00e9
--- /dev/null
+++ b/[esx]/esx_menu_default/fxmanifest.lua
@@ -0,0 +1,27 @@
+fx_version 'adamant'
+
+game 'gta5'
+
+description 'ESX Menu Default'
+
+version '1.0.4'
+
+client_scripts {
+ '@es_extended/client/wrapper.lua',
+ 'client/main.lua'
+}
+
+ui_page {
+ 'html/ui.html'
+}
+
+files {
+ 'html/ui.html',
+ 'html/css/app.css',
+ 'html/js/mustache.min.js',
+ 'html/js/app.js'
+}
+
+dependencies {
+ 'es_extended'
+}
diff --git a/[esx]/esx_menu_default/html/css/app.css b/[esx]/esx_menu_default/html/css/app.css
new file mode 100644
index 00000000..b03e1e9b
--- /dev/null
+++ b/[esx]/esx_menu_default/html/css/app.css
@@ -0,0 +1,96 @@
+@font-face {
+ font-family: bankgothic;
+ src: url('../fonts/bankgothic.ttf');
+}
+
+@font-face {
+ font-family: pcdown;
+ src: url('../fonts/pdown.ttf');
+}
+
+.menu {
+ font-family: 'PT Sans Narrow', sans-serif;
+ font-size: 22px;
+ min-width: 400px;
+ color: #fff;
+ box-shadow: 0px 0px 50px 0px #000;
+ position: absolute;
+}
+
+.menu.align-left {
+ left: 40;
+ top: 50%;
+ transform: translate(0, -50%);
+}
+
+.menu.align-top-left {
+ left: 40;
+ top: 40;
+}
+
+.menu.align-top {
+ left: 50%;
+ top: 40;
+ transform: translate(-50%, 0);
+}
+
+.menu.align-top-right {
+ right: 10;
+ top: 40;
+}
+
+.menu.align-right {
+ right: 40;
+ top: 50%;
+ transform: translate(0, -50%);
+}
+
+.menu.align-bottom-right {
+ right: 40;
+ bottom: 40;
+}
+
+.menu.align-bottom {
+ left: 50%;
+ bottom: 40;
+ transform: translate(-50%, 0);
+}
+
+.menu.align-bottom-left {
+ left: 40;
+ bottom: 40;
+}
+
+.menu.align-center {
+ left: 50%;
+ top: 50%;
+ transform: translate(-50%, -50%);
+}
+
+.menu .head {
+ background-color: #4682B4;
+ text-align: center;
+ height: 40px;
+ line-height: 40px;
+}
+
+.menu .menu-items {
+ max-height: 600px;
+ overflow-y: auto;
+}
+
+.menu .menu-items .menu-item {
+ height: 40px;
+ display: block;
+ background-color: rgba(40, 40, 40, 1);
+ line-height: 32px;
+ color: #ffffff;
+ padding: 2px;
+ text-align: center;
+}
+
+.menu .menu-items .menu-item.selected {
+ background-color: rgba(20, 20, 20, 1);
+ border-top: 2px solid #e76767;
+ border-bottom: 2px solid #e76767;
+}
diff --git a/[esx]/esx_menu_default/html/fonts/bankgothic.ttf b/[esx]/esx_menu_default/html/fonts/bankgothic.ttf
new file mode 100644
index 00000000..f3d8049b
Binary files /dev/null and b/[esx]/esx_menu_default/html/fonts/bankgothic.ttf differ
diff --git a/[esx]/esx_menu_default/html/fonts/pdown.ttf b/[esx]/esx_menu_default/html/fonts/pdown.ttf
new file mode 100644
index 00000000..69c76cf3
Binary files /dev/null and b/[esx]/esx_menu_default/html/fonts/pdown.ttf differ
diff --git a/[esx]/esx_menu_default/html/js/app.js b/[esx]/esx_menu_default/html/js/app.js
new file mode 100644
index 00000000..320fc386
--- /dev/null
+++ b/[esx]/esx_menu_default/html/js/app.js
@@ -0,0 +1,346 @@
+(function(){
+ let MenuTpl =
+ '