diff --git a/_resources/esx_vehicleshop/.editorconfig b/_resources/esx_vehicleshop/.editorconfig new file mode 100644 index 00000000..9b425256 --- /dev/null +++ b/_resources/esx_vehicleshop/.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/_resources/esx_vehicleshop/LICENSE b/_resources/esx_vehicleshop/LICENSE new file mode 100644 index 00000000..12a695e0 --- /dev/null +++ b/_resources/esx_vehicleshop/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_vehicleshop + 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_vehicleshop 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/_resources/esx_vehicleshop/README.md b/_resources/esx_vehicleshop/README.md new file mode 100644 index 00000000..77e40f64 --- /dev/null +++ b/_resources/esx_vehicleshop/README.md @@ -0,0 +1,59 @@ +# esx_vehicleshop + +ESX Vehicle Shop adds an vehicle shop to the game, where employeed players can sell vehicles to other players. You can also disable the job part so any player can buy vehicles with a menu based interaction. + +## Requirements + +* Auto mode (everyone can buy vehicles from the dealer) + * No need to download other resources + +* Player management (the car dealer job): billing, boss actions and more! + * [esx_society](https://github.com/ESX-Org/esx_society) + * [esx_billing](https://github.com/ESX-Org/esx_billing) + * [esx_addonaccount](https://github.com/ESX-Org/esx_addonaccount) + * [esx_addoninventory](https://github.com/ESX-Org/esx_addoninventory) + * [cron](https://github.com/ESX-Org/cron) + +## Download & Installation + +### Using [fvm](https://github.com/qlaffont/fvm-installer) + +``` +fvm install --save --folder=esx esx-org/esx_vehicleshop +``` + +### Using Git + +``` +cd resources +git clone https://github.com/ESX-Org/esx_vehicleshop [esx]/esx_vehicleshop +``` + +### Manually + +- Download https://github.com/ESX-Org/esx_vehicleshop/archive/master.zip +- Put it in the `[esx]` directory + +### Installation + +- Import `esx_vehicleshop.sql` in your database +- Add this in your `server.cfg`: + +``` +start esx_vehicleshop +``` +- If you want player management you have to set `Config.EnablePlayerManagement` to `true` in `config.lua` + +## Legal + +### License + +esx_vehicleshop - vehicle shop for ESX + +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/_resources/esx_vehicleshop/client/main.lua b/_resources/esx_vehicleshop/client/main.lua new file mode 100644 index 00000000..a63bcdb9 --- /dev/null +++ b/_resources/esx_vehicleshop/client/main.lua @@ -0,0 +1,866 @@ +local HasAlreadyEnteredMarker, IsInShopMenu = false, false +local CurrentAction, CurrentActionMsg, LastZone, currentDisplayVehicle, CurrentVehicleData +local CurrentActionData, Vehicles, Categories = {}, {}, {} + +ESX = nil + +Citizen.CreateThread(function() + while ESX == nil do + TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end) + Citizen.Wait(0) + end + + PlayerManagement() +end) + +function getVehicleLabelFromModel(model) + for k,v in ipairs(Vehicles) do + if v.model == model then + return v.name + end + end + + return +end + +function getVehicles() + ESX.TriggerServerCallback('esx_vehicleshop:getCategories', function(categories) + Categories = categories + end) + + ESX.TriggerServerCallback('esx_vehicleshop:getVehicles', function(vehicles) + Vehicles = vehicles + end) +end + +function PlayerManagement() + if Config.EnablePlayerManagement then + if ESX.PlayerData.job.name == 'cardealer' then + Config.Zones.ShopEntering.Type = 1 + + if ESX.PlayerData.job.grade_name == 'boss' then + Config.Zones.BossActions.Type = 1 + end + + else + Config.Zones.ShopEntering.Type = -1 + Config.Zones.BossActions.Type = -1 + Config.Zones.ResellVehicle.Type = -1 + end + end +end + +RegisterNetEvent('esx:playerLoaded') +AddEventHandler('esx:playerLoaded', function(xPlayer) + ESX.PlayerData = xPlayer + + PlayerManagement() + getVehicles() +end) + +RegisterNetEvent('esx_vehicleshop:sendCategories') +AddEventHandler('esx_vehicleshop:sendCategories', function(categories) + Categories = categories +end) + +RegisterNetEvent('esx_vehicleshop:sendVehicles') +AddEventHandler('esx_vehicleshop:sendVehicles', function(vehicles) + Vehicles = vehicles +end) + + +RegisterNetEvent('esx:setJob') AddEventHandler('esx:setJob', PlayerManagement) + +function DeleteDisplayVehicleInsideShop() + local attempt = 0 + + if currentDisplayVehicle and DoesEntityExist(currentDisplayVehicle) then + while DoesEntityExist(currentDisplayVehicle) and not NetworkHasControlOfEntity(currentDisplayVehicle) and attempt < 100 do + Citizen.Wait(100) + NetworkRequestControlOfEntity(currentDisplayVehicle) + attempt = attempt + 1 + end + + if DoesEntityExist(currentDisplayVehicle) and NetworkHasControlOfEntity(currentDisplayVehicle) then + ESX.Game.DeleteVehicle(currentDisplayVehicle) + end + end +end + +function ReturnVehicleProvider() + ESX.TriggerServerCallback('esx_vehicleshop:getCommercialVehicles', function(vehicles) + local elements = {} + + for k,v in ipairs(vehicles) do + local returnPrice = ESX.Math.Round(v.price * 0.75) + local vehicleLabel = getVehicleLabelFromModel(v.vehicle) + + table.insert(elements, { + label = ('%s [%s]'):format(vehicleLabel, _U('generic_shopitem', ESX.Math.GroupDigits(returnPrice))), + value = v.vehicle + }) + end + + ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'return_provider_menu', { + title = _U('return_provider_menu'), + align = 'top-left', + elements = elements + }, function(data, menu) + TriggerServerEvent('esx_vehicleshop:returnProvider', data.current.value) + + Citizen.Wait(300) + menu.close() + ReturnVehicleProvider() + end, function(data, menu) + menu.close() + end) + end) +end + +function StartShopRestriction() + Citizen.CreateThread(function() + while IsInShopMenu do + Citizen.Wait(0) + + DisableControlAction(0, 75, true) -- Disable exit vehicle + DisableControlAction(27, 75, true) -- Disable exit vehicle + end + end) +end + +function OpenShopMenu() + if #Vehicles == 0 then + print('[esx_vehicleshop] [^3ERROR^7] No vehicles found') + return + end + + IsInShopMenu = true + + StartShopRestriction() + ESX.UI.Menu.CloseAll() + + local playerPed = PlayerPedId() + + FreezeEntityPosition(playerPed, true) + SetEntityVisible(playerPed, false) + SetEntityCoords(playerPed, Config.Zones.ShopInside.Pos) + + local vehiclesByCategory = {} + local elements = {} + local firstVehicleData = nil + + for i=1, #Categories, 1 do + vehiclesByCategory[Categories[i].name] = {} + end + + for i=1, #Vehicles, 1 do + if IsModelInCdimage(GetHashKey(Vehicles[i].model)) then + table.insert(vehiclesByCategory[Vehicles[i].category], Vehicles[i]) + else + print(('[esx_vehicleshop] [^3ERROR^7] Vehicle "%s" does not exist'):format(Vehicles[i].model)) + end + end + + for k,v in pairs(vehiclesByCategory) do + table.sort(v, function(a, b) + return a.name < b.name + end) + end + + for i=1, #Categories, 1 do + local category = Categories[i] + local categoryVehicles = vehiclesByCategory[category.name] + local options = {} + + for j=1, #categoryVehicles, 1 do + local vehicle = categoryVehicles[j] + + if i == 1 and j == 1 then + firstVehicleData = vehicle + end + + table.insert(options, ('%s %s'):format(vehicle.name, _U('generic_shopitem', ESX.Math.GroupDigits(vehicle.price)))) + end + + table.sort(options) + + table.insert(elements, { + name = category.name, + label = category.label, + value = 0, + type = 'slider', + max = #Categories[i], + options = options + }) + end + + ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'vehicle_shop', { + title = _U('car_dealer'), + align = 'top-left', + elements = elements + }, function(data, menu) + local vehicleData = vehiclesByCategory[data.current.name][data.current.value + 1] + + ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'shop_confirm', { + title = _U('buy_vehicle_shop', vehicleData.name, ESX.Math.GroupDigits(vehicleData.price)), + align = 'top-left', + elements = { + {label = _U('no'), value = 'no'}, + {label = _U('yes'), value = 'yes'} + }}, function(data2, menu2) + if data2.current.value == 'yes' then + if Config.EnablePlayerManagement then + ESX.TriggerServerCallback('esx_vehicleshop:buyCarDealerVehicle', function(success) + if success then + IsInShopMenu = false + DeleteDisplayVehicleInsideShop() + + CurrentAction = 'shop_menu' + CurrentActionMsg = _U('shop_menu') + CurrentActionData = {} + + local playerPed = PlayerPedId() + FreezeEntityPosition(playerPed, false) + SetEntityVisible(playerPed, true) + SetEntityCoords(playerPed, Config.Zones.ShopEntering.Pos) + + menu2.close() + menu.close() + ESX.ShowNotification(_U('vehicle_purchased')) + else + ESX.ShowNotification(_U('broke_company')) + end + end, vehicleData.model) + else + local generatedPlate = GeneratePlate() + + ESX.TriggerServerCallback('esx_vehicleshop:buyVehicle', function(success) + if success then + IsInShopMenu = false + menu2.close() + menu.close() + DeleteDisplayVehicleInsideShop() + + ESX.Game.SpawnVehicle(vehicleData.model, Config.Zones.ShopOutside.Pos, Config.Zones.ShopOutside.Heading, function(vehicle) + TaskWarpPedIntoVehicle(playerPed, vehicle, -1) + SetVehicleNumberPlateText(vehicle, generatedPlate) + + FreezeEntityPosition(playerPed, false) + SetEntityVisible(playerPed, true) + end) + else + ESX.ShowNotification(_U('not_enough_money')) + end + end, vehicleData.model, generatedPlate) + end + else + menu2.close() + end + end, function(data2, menu2) + menu2.close() + end) + end, function(data, menu) + menu.close() + DeleteDisplayVehicleInsideShop() + local playerPed = PlayerPedId() + + CurrentAction = 'shop_menu' + CurrentActionMsg = _U('shop_menu') + CurrentActionData = {} + + FreezeEntityPosition(playerPed, false) + SetEntityVisible(playerPed, true) + SetEntityCoords(playerPed, Config.Zones.ShopEntering.Pos) + + IsInShopMenu = false + end, function(data, menu) + local vehicleData = vehiclesByCategory[data.current.name][data.current.value + 1] + local playerPed = PlayerPedId() + + DeleteDisplayVehicleInsideShop() + WaitForVehicleToLoad(vehicleData.model) + + ESX.Game.SpawnLocalVehicle(vehicleData.model, Config.Zones.ShopInside.Pos, Config.Zones.ShopInside.Heading, function(vehicle) + currentDisplayVehicle = vehicle + TaskWarpPedIntoVehicle(playerPed, vehicle, -1) + FreezeEntityPosition(vehicle, true) + SetModelAsNoLongerNeeded(vehicleData.model) + end) + end) + + DeleteDisplayVehicleInsideShop() + WaitForVehicleToLoad(firstVehicleData.model) + + ESX.Game.SpawnLocalVehicle(firstVehicleData.model, Config.Zones.ShopInside.Pos, Config.Zones.ShopInside.Heading, function(vehicle) + currentDisplayVehicle = vehicle + TaskWarpPedIntoVehicle(playerPed, vehicle, -1) + FreezeEntityPosition(vehicle, true) + SetModelAsNoLongerNeeded(firstVehicleData.model) + end) +end + +function WaitForVehicleToLoad(modelHash) + modelHash = (type(modelHash) == 'number' and modelHash or GetHashKey(modelHash)) + + if not HasModelLoaded(modelHash) then + RequestModel(modelHash) + + BeginTextCommandBusyspinnerOn('STRING') + AddTextComponentSubstringPlayerName(_U('shop_awaiting_model')) + EndTextCommandBusyspinnerOn(4) + + while not HasModelLoaded(modelHash) do + Citizen.Wait(0) + DisableAllControlActions(0) + end + + BusyspinnerOff() + end +end + +function OpenResellerMenu() + ESX.UI.Menu.CloseAll() + + ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'reseller', { + title = _U('car_dealer'), + align = 'top-left', + elements = { + {label = _U('buy_vehicle'), value = 'buy_vehicle'}, + {label = _U('pop_vehicle'), value = 'pop_vehicle'}, + {label = _U('depop_vehicle'), value = 'depop_vehicle'}, + {label = _U('return_provider'), value = 'return_provider'}, + {label = _U('create_bill'), value = 'create_bill'}, + {label = _U('get_rented_vehicles'), value = 'get_rented_vehicles'}, + {label = _U('set_vehicle_owner_sell'), value = 'set_vehicle_owner_sell'}, + {label = _U('set_vehicle_owner_rent'), value = 'set_vehicle_owner_rent'}, + {label = _U('deposit_stock'), value = 'put_stock'}, + {label = _U('take_stock'), value = 'get_stock'} + }}, function(data, menu) + local action = data.current.value + + if action == 'buy_vehicle' then + OpenShopMenu() + elseif action == 'put_stock' then + OpenPutStocksMenu() + elseif action == 'get_stock' then + OpenGetStocksMenu() + elseif action == 'pop_vehicle' then + OpenPopVehicleMenu() + elseif action == 'depop_vehicle' then + if currentDisplayVehicle then + DeleteDisplayVehicleInsideShop() + else + ESX.ShowNotification(_U('no_current_vehicle')) + end + elseif action == 'return_provider' then + ReturnVehicleProvider() + elseif action == 'create_bill' then + local closestPlayer, closestDistance = ESX.Game.GetClosestPlayer() + + if closestPlayer ~= -1 and closestDistance < 3 then + ESX.UI.Menu.Open('dialog', GetCurrentResourceName(), 'set_vehicle_owner_sell_amount', { + title = _U('invoice_amount') + }, function(data2, menu2) + local amount = tonumber(data2.value) + + if amount == nil then + ESX.ShowNotification(_U('invalid_amount')) + else + menu2.close() + local closestPlayer, closestDistance = ESX.Game.GetClosestPlayer() + + if closestPlayer == -1 or closestDistance > 3.0 then + ESX.ShowNotification(_U('no_players')) + else + TriggerServerEvent('esx_billing:sendBill', GetPlayerServerId(closestPlayer), 'society_cardealer', _U('car_dealer'), tonumber(data2.value)) + end + end + end, function(data2, menu2) + menu2.close() + end) + else + ESX.ShowNotification(_U('no_players')) + end + elseif action == 'get_rented_vehicles' then + OpenRentedVehiclesMenu() + elseif action == 'set_vehicle_owner_sell' then + if currentDisplayVehicle then + local closestPlayer, closestDistance = ESX.Game.GetClosestPlayer() + + if closestPlayer ~= -1 and closestDistance < 3 then + local newPlate = GeneratePlate() + local vehicleProps = ESX.Game.GetVehicleProperties(currentDisplayVehicle) + vehicleProps.plate = newPlate + SetVehicleNumberPlateText(currentDisplayVehicle, newPlate) + TriggerServerEvent('esx_vehicleshop:setVehicleOwnedPlayerId', GetPlayerServerId(closestPlayer), vehicleProps, CurrentVehicleData.model, CurrentVehicleData.name) + currentDisplayVehicle = nil + else + ESX.ShowNotification(_U('no_players')) + end + else + ESX.ShowNotification(_U('no_current_vehicle')) + end + elseif action == 'set_vehicle_owner_rent' then + if currentDisplayVehicle then + local closestPlayer, closestDistance = ESX.Game.GetClosestPlayer() + + if closestPlayer ~= -1 and closestDistance < 3 then + ESX.UI.Menu.Open('dialog', GetCurrentResourceName(), 'set_vehicle_owner_rent_amount', { + title = _U('rental_amount') + }, function(data2, menu2) + local amount = tonumber(data2.value) + + if not amount then + ESX.ShowNotification(_U('invalid_amount')) + else + menu2.close() + local closestPlayer, closestDistance = ESX.Game.GetClosestPlayer() + + if closestPlayer ~= -1 and closestDistance < 3 then + local newPlate = 'RENT' .. string.upper(ESX.GetRandomString(4)) + local model = CurrentVehicleData.model + SetVehicleNumberPlateText(currentDisplayVehicle, newPlate) + TriggerServerEvent('esx_vehicleshop:rentVehicle', model, newPlate, amount, GetPlayerServerId(closestPlayer)) + currentDisplayVehicle = nil + else + ESX.ShowNotification(_U('no_players')) + end + end + end, function(data2, menu2) + menu2.close() + end) + else + ESX.ShowNotification(_U('no_players')) + end + else + ESX.ShowNotification(_U('no_current_vehicle')) + end + end + end, function(data, menu) + menu.close() + + CurrentAction = 'reseller_menu' + CurrentActionMsg = _U('shop_menu') + CurrentActionData = {} + end) +end + +function OpenPopVehicleMenu() + ESX.TriggerServerCallback('esx_vehicleshop:getCommercialVehicles', function(vehicles) + local elements = {} + + for k,v in ipairs(vehicles) do + local vehicleLabel = getVehicleLabelFromModel(v.vehicle) + + table.insert(elements, { + label = ('%s [MSRP %s]'):format(vehicleLabel, _U('generic_shopitem', ESX.Math.GroupDigits(v.price))), + value = v.vehicle + }) + end + + ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'commercial_vehicles', { + title = _U('vehicle_dealer'), + align = 'top-left', + elements = elements + }, function(data, menu) + local model = data.current.value + DeleteDisplayVehicleInsideShop() + + ESX.Game.SpawnVehicle(model, Config.Zones.ShopInside.Pos, Config.Zones.ShopInside.Heading, function(vehicle) + currentDisplayVehicle = vehicle + + for i=1, #Vehicles, 1 do + if model == Vehicles[i].model then + CurrentVehicleData = Vehicles[i] + break + end + end + end) + end, function(data, menu) + menu.close() + end) + end) +end + +function OpenRentedVehiclesMenu() + ESX.TriggerServerCallback('esx_vehicleshop:getRentedVehicles', function(vehicles) + local elements = {} + + for k,v in ipairs(vehicles) do + local vehicleLabel = getVehicleLabelFromModel(v.name) + + table.insert(elements, { + label = ('%s: %s - %s'):format(v.playerName, vehicleLabel, v.plate), + value = v.name + }) + end + + ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'rented_vehicles', { + title = _U('rent_vehicle'), + align = 'top-left', + elements = elements + }, nil, function(data, menu) + menu.close() + end) + end) +end + +function OpenBossActionsMenu() + ESX.UI.Menu.CloseAll() + + ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'reseller',{ + title = _U('dealer_boss'), + align = 'top-left', + elements = { + {label = _U('boss_actions'), value = 'boss_actions'}, + {label = _U('boss_sold'), value = 'sold_vehicles'} + }}, function(data, menu) + if data.current.value == 'boss_actions' then + TriggerEvent('esx_society:openBossMenu', 'cardealer', function(data2, menu2) + menu2.close() + end) + elseif data.current.value == 'sold_vehicles' then + + ESX.TriggerServerCallback('esx_vehicleshop:getSoldVehicles', function(customers) + local elements = { + head = { _U('customer_client'), _U('customer_model'), _U('customer_plate'), _U('customer_soldby'), _U('customer_date') }, + rows = {} + } + + for i=1, #customers, 1 do + table.insert(elements.rows, { + data = customers[i], + cols = { + customers[i].client, + customers[i].model, + customers[i].plate, + customers[i].soldby, + customers[i].date + } + }) + end + + ESX.UI.Menu.Open('list', GetCurrentResourceName(), 'sold_vehicles', elements, function(data2, menu2) + + end, function(data2, menu2) + menu2.close() + end) + end) + end + + end, function(data, menu) + menu.close() + + CurrentAction = 'boss_actions_menu' + CurrentActionMsg = _U('shop_menu') + CurrentActionData = {} + end) +end + +function OpenGetStocksMenu() + ESX.TriggerServerCallback('esx_vehicleshop:getStockItems', function(items) + local elements = {} + + for i=1, #items, 1 do + if items[i].count > 0 then + table.insert(elements, { + label = 'x' .. items[i].count .. ' ' .. items[i].label, + value = items[i].name + }) + end + end + + ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'stocks_menu', { + title = _U('dealership_stock'), + align = 'top-left', + elements = elements + }, function(data, menu) + local itemName = data.current.value + + ESX.UI.Menu.Open('dialog', GetCurrentResourceName(), 'stocks_menu_get_item_count', { + title = _U('amount') + }, function(data2, menu2) + local count = tonumber(data2.value) + + if count == nil then + ESX.ShowNotification(_U('quantity_invalid')) + else + TriggerServerEvent('esx_vehicleshop:getStockItem', itemName, count) + menu2.close() + menu.close() + OpenGetStocksMenu() + end + end, function(data2, menu2) + menu2.close() + end) + end, function(data, menu) + menu.close() + end) + end) +end + +function OpenPutStocksMenu() + ESX.TriggerServerCallback('esx_vehicleshop:getPlayerInventory', function(inventory) + local elements = {} + + for i=1, #inventory.items, 1 do + local item = inventory.items[i] + + if item.count > 0 then + table.insert(elements, { + label = item.label .. ' x' .. item.count, + type = 'item_standard', + value = item.name + }) + end + end + + ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'stocks_menu', { + title = _U('inventory'), + align = 'top-left', + elements = elements + }, function(data, menu) + local itemName = data.current.value + + ESX.UI.Menu.Open('dialog', GetCurrentResourceName(), 'stocks_menu_put_item_count', { + title = _U('amount') + }, function(data2, menu2) + local count = tonumber(data2.value) + + if count == nil then + ESX.ShowNotification(_U('quantity_invalid')) + else + TriggerServerEvent('esx_vehicleshop:putStockItems', itemName, count) + menu2.close() + menu.close() + OpenPutStocksMenu() + end + end, function(data2, menu2) + menu2.close() + end) + end, function(data, menu) + menu.close() + end) + end) +end + +AddEventHandler('esx_vehicleshop:hasEnteredMarker', function(zone) + if zone == 'ShopEntering' then + + if Config.EnablePlayerManagement then + if ESX.PlayerData.job ~= nil and ESX.PlayerData.job.name == 'cardealer' then + CurrentAction = 'reseller_menu' + CurrentActionMsg = _U('shop_menu') + CurrentActionData = {} + end + else + CurrentAction = 'shop_menu' + CurrentActionMsg = _U('shop_menu') + CurrentActionData = {} + end + + elseif zone == 'GiveBackVehicle' and Config.EnablePlayerManagement then + local playerPed = PlayerPedId() + + if IsPedInAnyVehicle(playerPed, false) then + local vehicle = GetVehiclePedIsIn(playerPed, false) + + CurrentAction = 'give_back_vehicle' + CurrentActionMsg = _U('vehicle_menu') + CurrentActionData = {vehicle = vehicle} + end + elseif zone == 'ResellVehicle' then + local playerPed = PlayerPedId() + + if IsPedSittingInAnyVehicle(playerPed) then + local vehicle = GetVehiclePedIsIn(playerPed, false) + local vehicleData, model, resellPrice, plate + + if GetPedInVehicleSeat(vehicle, -1) == playerPed then + for i=1, #Vehicles, 1 do + if GetHashKey(Vehicles[i].model) == GetEntityModel(vehicle) then + vehicleData = Vehicles[i] + break + end + end + + if vehicleData then + resellPrice = ESX.Math.Round(vehicleData.price / 100 * Config.ResellPercentage) + model = GetEntityModel(vehicle) + plate = ESX.Math.Trim(GetVehicleNumberPlateText(vehicle)) + + CurrentAction = 'resell_vehicle' + CurrentActionMsg = _U('sell_menu', vehicleData.name, ESX.Math.GroupDigits(resellPrice)) + + CurrentActionData = { + vehicle = vehicle, + label = vehicleData.name, + price = resellPrice, + model = model, + plate = plate + } + else + ESX.ShowNotification(_U('invalid_vehicle')) + end + end + end + + elseif zone == 'BossActions' and Config.EnablePlayerManagement and ESX.PlayerData.job ~= nil and ESX.PlayerData.job.name == 'cardealer' and ESX.PlayerData.job.grade_name == 'boss' then + CurrentAction = 'boss_actions_menu' + CurrentActionMsg = _U('shop_menu') + CurrentActionData = {} + end +end) + +AddEventHandler('esx_vehicleshop:hasExitedMarker', function(zone) + if not IsInShopMenu then + ESX.UI.Menu.CloseAll() + end + + CurrentAction = nil +end) + +AddEventHandler('onResourceStop', function(resource) + if resource == GetCurrentResourceName() then + if IsInShopMenu then + ESX.UI.Menu.CloseAll() + + local playerPed = PlayerPedId() + + FreezeEntityPosition(playerPed, false) + SetEntityVisible(playerPed, true) + SetEntityCoords(playerPed, Config.Zones.ShopEntering.Pos) + end + + DeleteDisplayVehicleInsideShop() + end +end) + +if Config.EnablePlayerManagement then + RegisterNetEvent('esx_phone:loaded') + AddEventHandler('esx_phone:loaded', function(phoneNumber, contacts) + local specialContact = { + name = _U('dealership'), + number = 'cardealer', + base64Icon = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAMAAABrrFhUAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAMAUExURQAAADMzMzszM0M0M0w0M1Q1M101M2U2M242M3Y3M383Moc4MpA4Mpg5MqE5Mqk6MrI6Mro7Mrw8Mr89M71DML5EO8I+NMU/NcBMLshANctBNs5CN8RULMddKsheKs9YLtBCONZEOdlFOtxGO99HPNhMNsplKM1nKM1uJtRhLddiLt5kMNJwJ9B2JNR/IeNIPeVJPehKPuRQOuhSO+lZOOlhNuloM+p3Lep/KupwMMFORsVYUcplXc1waNJ7delUSepgVexrYe12bdeHH9iIH9qQHd2YG+udH+OEJeuGJ+uOJeuVIuChGeSpF+aqGOykHOysGeeyFeuzFuyzFuq6E+27FO+Cee3CEdaGgdqTjvCNhfKYkvOkngAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJezdycAAAEAdFJOU////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wBT9wclAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGHRFWHRTb2Z0d2FyZQBwYWludC5uZXQgNC4xLjb9TgnoAAAQGElEQVR4Xt2d+WMUtxXHbS6bEGMPMcQQ04aEUnqYo9xJWvC6kAKmQLM2rdn//9+g0uir2Tl0PElPszP7+cnH7Fj6rPTeG2lmvfKld2azk8lk/36L/cnkZDbDIT3Sp4DZ8QS9dTI57tNDTwJOOu+4j/0TvDQz+QXMSG+7mUn+sZBZQELnNROcKhMZBXx+gS4k8+IzTpmBXAJOnqPxTDzPFRKyCODuvSKPgwwC2EZ+lxf4E4xwCzhBU7PBPQx4BWR88+fwDgNGAbMsM9/Ec8bygE3A5966L3nOlhiZBGSf+l2YggGLgBna1DMsE4FBQH9zvw1HLEgX0Evkt5GeEVIFMFztpJF6rZQm4DNasVDSEkKSgIVN/ibP0ZwoEgQsfPTPSZgH8QIG8vYr4gdBrIABvf2K2EEQKWBQb78ichBECRhE8O8SlQ5iBAQvcffFPhoYQoSAAQ5/TcQ0CBYw0OGvCZ4GoQIGF/3bhGaDQAELvfKhERgIwgQMePrPCQsEQQLwFwYPmksiQMCC1n1iCFgooQtYwLJfPPQFQ7KAUfU/wABVwMj6TzdAFDDY6tcOMR3SBIyw/1QDJAGj7D/RAEXA6Oa/hhIHCAJG23+SAb+AEfefYsArYET1nwlvTegVgBONFnTDik8ATjNi0BEbHgGjuP5147k6dgsYaQHQxF0OOAUMfv2LhnOVzCVg4OufdFwrpS4BePkSgA6ZcAhYggCocQRCu4ClCIAaeyC0CliaAKCwhgGrALxwaUC3OtgELFEAUNjCgEXAklQAdSzVgEUAXrRUoGstzAKWbgJIzJPAKGAJJ4DEOAmMAvCCpQPda2ASsJQTQGKaBAYBS1YC1TGUQwYBOHgpQRdrdAUsaQRUdONgVwAOXVLQyTkdASO4CyiFzhMWbQEj3wbw094oaAtY2hSoaafCloClHwCdIdASgIOWGnQVNAWMeiOUSnPDtCkAh3Dz2MBD/G4BoLOKhgD2AfDo6Zv3v32y89v7929eP3n8AIf3RKMgbghgTQEPn/56hH56OXr/+ll/FhqJoC6AMwU8+RV9o/Ph6SO8ODf1RFAXwDcAnrjGvYMPT3sZB/UhUBeAXyfz+AP6E8HR2z6iIzosqQngugp4g77E8jr/KKhdEdQE4JeJPHiPfhCZHn7EVxVHz3CufKDLgrkAnhz4QA//6as7t653ead+uye/3i4qrt8+qHt4m3sQzIuhuQD8Kg3d///8FT1rc6h+fx3f1tk9mKpfCv79h7s4YybQaW4Buv//uoROdXAIKIrtvUrBdPcazpkHdLomgCUEquR/9Gd0yIBTgFBwoH4vDVy9h7PmoAqDlQD8IomnZdOPfo/emPAIENFAx4Lp7pWcBtDtSgBHCHykWm6b/iVeAcU24qQwcOkmzpwBHQa1AI4qUCXAf6IjZvwCiuKlOubTx+1LP+DU/OhqUAvAj1N4glajG2YoAioD74riBk7ODzoOARwzQNX/t9EJCyQBlYGXRZEtGWAOQADDDMAAQBds0AQUOg7cKopcyQBzAALwwxRIA4AqYBu5YLpTFFcy1USq50oAw36oGgBTdMAKUUCxq477dCi+zpQM1MKQEsBQBakUcKCab4cqoNhTB37aE19fyhIKVS2kBOBHCTxUzd1VrbdDFqCPnJZZJYuBsutcAtQigC8EhgjYwXXBq/K7HMmg7HopgGFHXIVAkbY80AUUd9ShOPZb/mRQ7pWXAvCDBFAFi6zlIUBAgUwgyiFJhmTAKEBdBn1yV4GSEAHX1bE6tfInAy2AYTlc5QC8Vy5CBBSv1ME6srAnA7k8LgUwhADVUhWvnAQJ2FEHz6srZgMyCEgB+DaBx6qhd9BOB0EC9DWBSoUS5mTAJuC1aqivDhaECdCpcG6Wd5GETQCWwgndChOgU+F8CBRXOEOhEsBwKYxdUH4B250hwJoMxCWxEJD+cBDq4E9oootAAYYhwBkK90sB+CYBxMAcAgxDoCi+x99Nh0kAYmAOAcYhwJcMmARgO1Reu/sIFmAcAmzJQApgqwPzCKiGAL4FTMlgJgQc4+sEsCGWR4AeAq0i49KP+ONJHAsBbIUwpRKOEKCHQGetgSMZTIQAfJmCaiGlEo4RoBdIO9fa3+HPp8AiQGfBTAKK2+o13QF2LT0UjkKAXhnZwbdz0pPBOATsqRft4dsa36Qmgy8rDFkQy0H5BGBdwLTekpoMZhwCdCHoXxGMFGCfA4K0ZDBbYbgW1AIovYoTgIUR83pDUjI4WWEoA/ILsOaBkpRkMBmHAOwU2vZdEpLBZIXho0LyCyjUq6yXm/GLJPsr+ILOQzzxMEffGJ5RAF5W3l9p4nd/UU15dP/+3bDhECjg4VvHMwAZBehbRrwcvf1bWG0QJuCZ8xGIjAJwQUTh6I9BGyhBArADaMO7Ny6IFKB3yUjshmTGIAGexyAwH53Ub5YOAHmQhkgW9LwQIkDdBTMCRMFEzgshAt7i/IOnvE2BGAhCBGDpb/iotTlagRgigPwU3KLBGjrplooAAaMJAdVVE+VW4wAB4U8CLozqosG/h0QXoDcAR0FVZ3hvtKUL0Os+o2B+4ewrjOkCIh8GXRDzxSNPYUwW4CmDh0b9nl1nYUwWMJoqSNHYSnTdZEleEBlNEQAa64f2wnifuiQ2oiJA0VpDtwUC8prgiIoA0LrithTGE+Ky+KiKAEX7xm1zYXxC3BgZVREA2tsoxk0k6s7QuIoARXenzlAYz2ibo/Qi4PDwUD/xlYF34vS4YcSPYRehWxgTd4dJHwrx7o6OOzu3XpKbSWX68rYe09f3aI4NO2mdW4uIAvxFwPSgNeVuYfmTh8NWZ3buEAyb7llqF8Y0Ac9wRjsHjdv4FHoBNJ2PhkXkbcJKuXGZulkYCwGEQsBXBHy0LIgHrOa7sNx3sOsVbH6EqV4Yy5uk/LfJPcD5bLwyvP2KXYZQMLXvIXj3i8wNqxXG8jY5fx70FAENz5sbG1v4UuJ/l3xM66Nrq3l2rwHDTTUlVSCQN0r6g4D7c5Gq/m9dOHd6teTM+tf4WfXIQyzz/n+9dgZnX6vO7jNg20+vbjYm3SvsLgJ0qN1cU80Dp8/jrUqcBRj/W+dP4cQlp9Y31c/1c1U2rHftoDAmCXAWAViB3lpH0+acxvuEW7ziQPxrdl9y6rz6jb6L0oL97l1VGJcCfCsCziJAKb6Isd9kTQ2ChIJAXdNuncUJG5xRZ/dsmxrvq1KIQKAemPBcDzqLAGX4QucNUqg26offIignwEXL2U9dlL/1hAFzJlRcvacemfHMAWcRULbwa7SoizJAvruhTanX1n9twO23+aBFiyuUp8acRYCnhaurZ+UB0UNA6t1C7DdxuvTrjoOGC4I5FAHOIqA8u6OFq6tlrIosBsokdg4nMnJOHnELh5uxZkIJBDiLYX0LmBE5vs6jMRZkvopMBHJpewOnsVBmGneilUdY+AUCnLWgazVUzoAtxwSQrIlj9AeCBCJngDG9zDkt++GcA/ZEWBT/gwDnHHDFAJmlPQNADYG4Yki80B5fwQVxkPOay3IlVSL77hXg2hGRIcDzFq2urouDokoBWQQ4I4BERgFXKeDMApUAZxB4YF8PFGPUM0cFcpR6ClYzYvBu4RwORCJwCXAlARkClABPIrReDAkB3hlQzoGohQEhwDsDVBjECwz4kiBJgMgElkEgBBir1CaiiVECXpH0yjyLF7SZvnQUwoKy60qA94OUHvwJN+w1EPPLWQQoRBN38IIgxIVw8wrTSBkEjFiWqSp+KruuBBA+SusGXtYCzXCB67YYCOOrrDWj+G/ZdSXANwckN40flIpmuBiqANVzCKB8nN7dK3hlHTTDxUAFXFY9hwDSFum9a3htDVoMiMVbBiQI+IfqOQRQ5oCgGwhoWSAWYhaIAh3XAogfKfljOxAQmqjWLaIg1AGyFo4BM6ASQH16rh0I/E0sr1ciIVSCenU0FMyASgBxDnQDgediUF0ORuMNMWdwYDDo9lwA/UMlm4HAW6skzICiuICTWImdAaoKElQCyEOgFQg20RIb8Xm6xDPATqml4XDQ6TgBzUDgGQIbOCwSzxD4CocFg07XBYQ8RFwPBO4lIbkakIQzz0ZHAB0C6wJChkAjELiWBLB7kcCmw++p2BQwHwB1AWGfrVsLBPZhir2LJC7iXAaip1cVAhsCwoZAPRDYDHD0377vFJ0B6gOgISDwA8ZrgcDcxjPRI7SJeeclwa6uAiV1AcEfJjEPBJuGWJVwEdRiy3BRdC4husjlcE1dQPhnzNcDQWt5eI3p7VdstASfTcmu9QHQFBD+Gev1iuDieuXg7Fes3Zdsrldl8Znq9og41FIQaAgIDIOS5qXB1oaEJfSZKM+eWFkJ0FlFU0BIMaSxLBYOl3kRJGkKiBgChjWCYdOIAB0BwYlAYlwsHCz1FCBoCYj7ZyOmxcKh0hoAHQFRQ2BMgaA1ADoCYv/bxlgCQe0qQNEREBUHBTfHEQjQyTldAcTHyDrcu4q/MWTKHfEGXQGxQ+D+/e/xVwYMuljDICD+nw79MPRA0CiCFQYBcamwZOCBoJ0CJSYB8ZNg4IEA3WtgFBAbByUDDgTdCCgwCkiYBAMOBKYJYBOQMAmGGwjQtRYWASmTYKCBwDgBrAKSJsEgA4F5AtgFJE2CIQYCdKuDVUDi/2AcWiAwlEAKq4DU/70yrEDwMzrVxS4gMQwMKhDYAoDAISAxDAwpEKBDJlwCkv8V61ACgTUACFwC0qoByTACgaUCUDgFMPwTqgEEAnsAlLgFJAfCAQQCRwCUeAQkB8LFBwJ0xIZPAIOBxQYCdMOKV0DkRkGDBQaC9jZAB6+AqA3TNgsLBM2NUBN+ASwGbn6DFvWLv/8UASwG7n2LNvUJof8kAQzlgOA7tKo/nAWQhiSAx8CNngOBuwDS0ATwGOg3END6TxXAEgd6DQSU+S+hCuAx0F8goPafLoDJQE+BgNz/AAEsNWFPgcBb/80JEMBxXSDoIRCguSSCBDBcHUsyBwLP9W+LMAE86TBvICCmP02ggPRVspKMgYBU/tUIFZC+UlqSLRC41j+NBAsYdCAIm/4lEQKGGwgCp39JjACmacAeCIKHvyRKANM04A0EEcNfEimAKRswBoK/o2GhxApgGgRcgSDy7RfEC+AZBDyBIDT510gQwDMIGAJB/NsvSBLAkw5SA0FU8K9IE8AzD5ICQcLoL0kVEP2ERR3zZzRR6Dz/EEy6gC+z9FBwL24D9XLAwocNBgEsa0URj11xdJ9JAMeCYfBjV/RlPydMAkRCSJ0IQYGA592XsAlIjwX0QMDXfVYBgsSMQAsE6ZG/Dq+A1GBACARMU7+CW4AgZRh4AgHvm1+SQYAYBvHRwBEILnO/+SVZBAjiHZgDQZ7eC3IJEHyOnAvdQPBT2vWOk4wCJFHXSs1AkHq14yGzAMEsXEIVCH5hTPgW8gsoOQlcSr9W/Jxr0rfoSUDJ7Jg0GCbHM7ygD/oUAGazk8mkMyL2J5OTWZ89L/ny5f+yiDXCPYKoAQAAAABJRU5ErkJggg==', + } + + TriggerEvent('esx_phone:addSpecialContact', specialContact.name, specialContact.number, specialContact.base64Icon) + end) +end + +-- Create Blips +Citizen.CreateThread(function() + local blip = AddBlipForCoord(Config.Zones.ShopEntering.Pos) + + SetBlipSprite (blip, 326) + SetBlipDisplay(blip, 4) + SetBlipScale (blip, 1.0) + SetBlipAsShortRange(blip, true) + + BeginTextCommandSetBlipName('STRING') + AddTextComponentSubstringPlayerName(_U('car_dealer')) + EndTextCommandSetBlipName(blip) +end) + +-- Enter / Exit marker events & Draw Markers +Citizen.CreateThread(function() + while true do + Citizen.Wait(4) + local playerCoords = GetEntityCoords(PlayerPedId()) + local isInMarker, letSleep, currentZone = false, true + + for k,v in pairs(Config.Zones) do + local distance = #(playerCoords - v.Pos) + + if distance < Config.DrawDistance then + letSleep = false + + if v.Type ~= -1 then + DrawMarker(v.Type, v.Pos, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, v.Size.x, v.Size.y, v.Size.z, Config.MarkerColor.r, Config.MarkerColor.g, Config.MarkerColor.b, 100, false, true, 2, false, nil, nil, false) + end + + if distance < v.Size.x then + isInMarker, currentZone = true, k + end + end + end + + if (isInMarker and not HasAlreadyEnteredMarker) or (isInMarker and LastZone ~= currentZone) then + HasAlreadyEnteredMarker, LastZone = true, currentZone + LastZone = currentZone + TriggerEvent('esx_vehicleshop:hasEnteredMarker', currentZone) + end + + if not isInMarker and HasAlreadyEnteredMarker then + HasAlreadyEnteredMarker = false + TriggerEvent('esx_vehicleshop:hasExitedMarker', LastZone) + end + + if letSleep then + Citizen.Wait(500) + end + end +end) + +-- Key controls +Citizen.CreateThread(function() + while true do + Citizen.Wait(5) + + if CurrentAction then + ESX.ShowHelpNotification(CurrentActionMsg) + + if IsControlJustReleased(0, 38) then + if CurrentAction == 'shop_menu' then + if Config.LicenseEnable then + ESX.TriggerServerCallback('esx_license:checkLicense', function(hasDriversLicense) + if hasDriversLicense then + OpenShopMenu() + else + ESX.ShowNotification(_U('license_missing')) + end + end, GetPlayerServerId(PlayerId()), 'drive') + else + OpenShopMenu() + end + elseif CurrentAction == 'reseller_menu' then + OpenResellerMenu() + elseif CurrentAction == 'give_back_vehicle' then + ESX.TriggerServerCallback('esx_vehicleshop:giveBackVehicle', function(isRentedVehicle) + if isRentedVehicle then + ESX.Game.DeleteVehicle(CurrentActionData.vehicle) + ESX.ShowNotification(_U('delivered')) + else + ESX.ShowNotification(_U('not_rental')) + end + end, ESX.Math.Trim(GetVehicleNumberPlateText(CurrentActionData.vehicle))) + elseif CurrentAction == 'resell_vehicle' then + ESX.TriggerServerCallback('esx_vehicleshop:resellVehicle', function(vehicleSold) + if vehicleSold then + ESX.Game.DeleteVehicle(CurrentActionData.vehicle) + ESX.ShowNotification(_U('vehicle_sold_for', CurrentActionData.label, ESX.Math.GroupDigits(CurrentActionData.price))) + else + ESX.ShowNotification(_U('not_yours')) + end + end, CurrentActionData.plate, CurrentActionData.model) + elseif CurrentAction == 'boss_actions_menu' then + OpenBossActionsMenu() + end + + CurrentAction = nil + end + else + Citizen.Wait(500) + end + end +end) + +Citizen.CreateThread(function() + RequestIpl('shr_int') -- Load walls and floor + + local interiorID = 7170 + LoadInterior(interiorID) + EnableInteriorProp(interiorID, 'csr_beforeMission') -- Load large window + RefreshInterior(interiorID) +end) diff --git a/_resources/esx_vehicleshop/client/utils.lua b/_resources/esx_vehicleshop/client/utils.lua new file mode 100644 index 00000000..88a30d50 --- /dev/null +++ b/_resources/esx_vehicleshop/client/utils.lua @@ -0,0 +1,69 @@ +local NumberCharset = {} +local Charset = {} + +for i = 48, 57 do table.insert(NumberCharset, string.char(i)) end + +for i = 65, 90 do table.insert(Charset, string.char(i)) end +for i = 97, 122 do table.insert(Charset, string.char(i)) end + +function GeneratePlate() + local generatedPlate + local doBreak = false + + while true do + Citizen.Wait(2) + math.randomseed(GetGameTimer()) + if Config.PlateUseSpace then + generatedPlate = string.upper(GetRandomLetter(Config.PlateLetters) .. ' ' .. GetRandomNumber(Config.PlateNumbers)) + else + generatedPlate = string.upper(GetRandomLetter(Config.PlateLetters) .. GetRandomNumber(Config.PlateNumbers)) + end + + ESX.TriggerServerCallback('esx_vehicleshop:isPlateTaken', function(isPlateTaken) + if not isPlateTaken then + doBreak = true + end + end, generatedPlate) + + if doBreak then + break + end + end + + return generatedPlate +end + +-- mixing async with sync tasks +function IsPlateTaken(plate) + local callback = 'waiting' + + ESX.TriggerServerCallback('esx_vehicleshop:isPlateTaken', function(isPlateTaken) + callback = isPlateTaken + end, plate) + + while type(callback) == 'string' do + Citizen.Wait(0) + end + + return callback +end + +function GetRandomNumber(length) + Citizen.Wait(0) + math.randomseed(GetGameTimer()) + if length > 0 then + return GetRandomNumber(length - 1) .. NumberCharset[math.random(1, #NumberCharset)] + else + return '' + end +end + +function GetRandomLetter(length) + Citizen.Wait(0) + math.randomseed(GetGameTimer()) + if length > 0 then + return GetRandomLetter(length - 1) .. Charset[math.random(1, #Charset)] + else + return '' + end +end diff --git a/_resources/esx_vehicleshop/config.lua b/_resources/esx_vehicleshop/config.lua new file mode 100644 index 00000000..f233dad5 --- /dev/null +++ b/_resources/esx_vehicleshop/config.lua @@ -0,0 +1,57 @@ +Config = {} +Config.DrawDistance = 100 +Config.MarkerColor = {r = 120, g = 120, b = 240} +Config.EnablePlayerManagement = false -- enables the actual car dealer job. You'll need esx_addonaccount, esx_billing and esx_society +Config.ResellPercentage = 50 + +Config.Locale = 'en' + +Config.LicenseEnable = false -- require people to own drivers license when buying vehicles? Only applies if EnablePlayerManagement is disabled. Requires esx_license + +-- looks like this: 'LLL NNN' +-- The maximum plate length is 8 chars (including spaces & symbols), don't go past it! +Config.PlateLetters = 3 +Config.PlateNumbers = 3 +Config.PlateUseSpace = true + +Config.Zones = { + + ShopEntering = { + Pos = vector3(-33.7, -1102.0, 25.4), + Size = {x = 1.5, y = 1.5, z = 1.0}, + Type = 1 + }, + + ShopInside = { + Pos = vector3(-47.5, -1097.2, 25.4), + Size = {x = 1.5, y = 1.5, z = 1.0}, + Heading = -20.0, + Type = -1 + }, + + ShopOutside = { + Pos = vector3(-28.6, -1085.6, 25.5), + Size = {x = 1.5, y = 1.5, z = 1.0}, + Heading = 330.0, + Type = -1 + }, + + BossActions = { + Pos = vector3(-32.0, -1114.2, 25.4), + Size = {x = 1.5, y = 1.5, z = 1.0}, + Type = -1 + }, + + GiveBackVehicle = { + Pos = vector3(-18.2, -1078.5, 25.6), + Size = {x = 3.0, y = 3.0, z = 1.0}, + Type = (Config.EnablePlayerManagement and 1 or -1) + }, + + ResellVehicle = { + Pos = vector3(-44.6, -1080.7, 25.6), + Size = {x = 3.0, y = 3.0, z = 1.0}, + Type = 1 + } + +} diff --git a/_resources/esx_vehicleshop/esx_vehicleshop.sql b/_resources/esx_vehicleshop/esx_vehicleshop.sql new file mode 100644 index 00000000..56bce343 --- /dev/null +++ b/_resources/esx_vehicleshop/esx_vehicleshop.sql @@ -0,0 +1,333 @@ +USE `es_extended`; + +INSERT INTO `addon_account` (name, label, shared) VALUES + ('society_cardealer','Concessionnaire',1) +; + +INSERT INTO `addon_inventory` (name, label, shared) VALUES + ('society_cardealer','Concesionnaire',1) +; + +INSERT INTO `jobs` (name, label) VALUES + ('cardealer','Concessionnaire') +; + +INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES + ('cardealer',0,'recruit','Recrue',10,'{}','{}'), + ('cardealer',1,'novice','Novice',25,'{}','{}'), + ('cardealer',2,'experienced','Experimente',40,'{}','{}'), + ('cardealer',3,'boss','Patron',0,'{}','{}') +; + +CREATE TABLE `cardealer_vehicles` ( + `id` int NOT NULL AUTO_INCREMENT, + `vehicle` varchar(255) NOT NULL, + `price` int NOT NULL, + + PRIMARY KEY (`id`) +); + +CREATE TABLE `vehicle_sold` ( + `client` VARCHAR(50) NOT NULL, + `model` VARCHAR(50) NOT NULL, + `plate` VARCHAR(50) NOT NULL, + `soldby` VARCHAR(50) NOT NULL, + `date` VARCHAR(50) NOT NULL, + + PRIMARY KEY (`plate`) +); + +CREATE TABLE `owned_vehicles` ( + `owner` varchar(40) NOT NULL, + `plate` varchar(12) NOT NULL, + `vehicle` longtext, + `type` VARCHAR(20) NOT NULL DEFAULT 'car', + `job` VARCHAR(20) NULL DEFAULT NULL, + `stored` TINYINT NOT NULL DEFAULT '0', + + PRIMARY KEY (`plate`) +); + +CREATE TABLE `rented_vehicles` ( + `vehicle` varchar(60) NOT NULL, + `plate` varchar(12) NOT NULL, + `player_name` varchar(255) NOT NULL, + `base_price` int NOT NULL, + `rent_price` int NOT NULL, + `owner` varchar(22) NOT NULL, + + PRIMARY KEY (`plate`) +); + +CREATE TABLE `vehicle_categories` ( + `name` varchar(60) NOT NULL, + `label` varchar(60) NOT NULL, + + PRIMARY KEY (`name`) +); + +INSERT INTO `vehicle_categories` (name, label) VALUES + ('compacts','Compacts'), + ('coupes','Coupés'), + ('sedans','Sedans'), + ('sports','Sports'), + ('sportsclassics','Sports Classics'), + ('super','Super'), + ('muscle','Muscle'), + ('offroad','Off Road'), + ('suvs','SUVs'), + ('vans','Vans'), + ('motorcycles','Motos') +; + +CREATE TABLE `vehicles` ( + `name` varchar(60) NOT NULL, + `model` varchar(60) NOT NULL, + `price` int NOT NULL, + `category` varchar(60) DEFAULT NULL, + + PRIMARY KEY (`model`) +); + +INSERT INTO `vehicles` (name, model, price, category) VALUES + ('Blade','blade',15000,'muscle'), + ('Buccaneer','buccaneer',18000,'muscle'), + ('Buccaneer Rider','buccaneer2',24000,'muscle'), + ('Chino','chino',15000,'muscle'), + ('Chino Luxe','chino2',19000,'muscle'), + ('Coquette BlackFin','coquette3',55000,'muscle'), + ('Dominator','dominator',35000,'muscle'), + ('Dukes','dukes',28000,'muscle'), + ('Gauntlet','gauntlet',30000,'muscle'), + ('Hotknife','hotknife',125000,'muscle'), + ('Faction','faction',20000,'muscle'), + ('Faction Rider','faction2',30000,'muscle'), + ('Faction XL','faction3',40000,'muscle'), + ('Nightshade','nightshade',65000,'muscle'), + ('Phoenix','phoenix',12500,'muscle'), + ('Picador','picador',18000,'muscle'), + ('Sabre Turbo','sabregt',20000,'muscle'), + ('Sabre GT','sabregt2',25000,'muscle'), + ('Slam Van','slamvan3',11500,'muscle'), + ('Tampa','tampa',16000,'muscle'), + ('Virgo','virgo',14000,'muscle'), + ('Vigero','vigero',12500,'muscle'), + ('Voodoo','voodoo',7200,'muscle'), + ('Blista','blista',8000,'compacts'), + ('Brioso R/A','brioso',18000,'compacts'), + ('Issi','issi2',10000,'compacts'), + ('Panto','panto',10000,'compacts'), + ('Prairie','prairie',12000,'compacts'), + ('Bison','bison',45000,'vans'), + ('Bobcat XL','bobcatxl',32000,'vans'), + ('Burrito','burrito3',19000,'vans'), + ('Burrito','gburrito2',29000,'vans'), + ('Camper','camper',42000,'vans'), + ('Gang Burrito','gburrito',45000,'vans'), + ('Journey','journey',6500,'vans'), + ('Minivan','minivan',13000,'vans'), + ('Moonbeam','moonbeam',18000,'vans'), + ('Moonbeam Rider','moonbeam2',35000,'vans'), + ('Paradise','paradise',19000,'vans'), + ('Rumpo','rumpo',15000,'vans'), + ('Rumpo Trail','rumpo3',19500,'vans'), + ('Surfer','surfer',12000,'vans'), + ('Youga','youga',10800,'vans'), + ('Youga Luxuary','youga2',14500,'vans'), + ('Asea','asea',5500,'sedans'), + ('Cognoscenti','cognoscenti',55000,'sedans'), + ('Emperor','emperor',8500,'sedans'), + ('Fugitive','fugitive',12000,'sedans'), + ('Glendale','glendale',6500,'sedans'), + ('Intruder','intruder',7500,'sedans'), + ('Premier','premier',8000,'sedans'), + ('Primo Custom','primo2',14000,'sedans'), + ('Regina','regina',5000,'sedans'), + ('Schafter','schafter2',25000,'sedans'), + ('Stretch','stretch',90000,'sedans'), + ('Super Diamond','superd',130000,'sedans'), + ('Tailgater','tailgater',30000,'sedans'), + ('Warrener','warrener',4000,'sedans'), + ('Washington','washington',9000,'sedans'), + ('Baller','baller2',40000,'suvs'), + ('Baller Sport','baller3',60000,'suvs'), + ('Cavalcade','cavalcade2',55000,'suvs'), + ('Contender','contender',70000,'suvs'), + ('Dubsta','dubsta',45000,'suvs'), + ('Dubsta Luxuary','dubsta2',60000,'suvs'), + ('Fhantom','fq2',17000,'suvs'), + ('Grabger','granger',50000,'suvs'), + ('Gresley','gresley',47500,'suvs'), + ('Huntley S','huntley',40000,'suvs'), + ('Landstalker','landstalker',35000,'suvs'), + ('Mesa','mesa',16000,'suvs'), + ('Mesa Trail','mesa3',40000,'suvs'), + ('Patriot','patriot',55000,'suvs'), + ('Radius','radi',29000,'suvs'), + ('Rocoto','rocoto',45000,'suvs'), + ('Seminole','seminole',25000,'suvs'), + ('XLS','xls',32000,'suvs'), + ('Btype','btype',62000,'sportsclassics'), + ('Btype Luxe','btype3',85000,'sportsclassics'), + ('Btype Hotroad','btype2',155000,'sportsclassics'), + ('Casco','casco',30000,'sportsclassics'), + ('Coquette Classic','coquette2',40000,'sportsclassics'), + ('Manana','manana',12800,'sportsclassics'), + ('Monroe','monroe',55000,'sportsclassics'), + ('Pigalle','pigalle',20000,'sportsclassics'), + ('Stinger','stinger',80000,'sportsclassics'), + ('Stinger GT','stingergt',75000,'sportsclassics'), + ('Stirling GT','feltzer3',65000,'sportsclassics'), + ('Z-Type','ztype',220000,'sportsclassics'), + ('Bifta','bifta',12000,'offroad'), + ('Bf Injection','bfinjection',16000,'offroad'), + ('Blazer','blazer',6500,'offroad'), + ('Blazer Sport','blazer4',8500,'offroad'), + ('Brawler','brawler',45000,'offroad'), + ('Bubsta 6x6','dubsta3',120000,'offroad'), + ('Dune Buggy','dune',8000,'offroad'), + ('Guardian','guardian',45000,'offroad'), + ('Rebel','rebel2',35000,'offroad'), + ('Sandking','sandking',55000,'offroad'), + ('The Liberator','monster',210000,'offroad'), + ('Trophy Truck','trophytruck',60000,'offroad'), + ('Trophy Truck Limited','trophytruck2',80000,'offroad'), + ('Cognoscenti Cabrio','cogcabrio',55000,'coupes'), + ('Exemplar','exemplar',32000,'coupes'), + ('F620','f620',40000,'coupes'), + ('Felon','felon',42000,'coupes'), + ('Felon GT','felon2',55000,'coupes'), + ('Jackal','jackal',38000,'coupes'), + ('Oracle XS','oracle2',35000,'coupes'), + ('Sentinel','sentinel',32000,'coupes'), + ('Sentinel XS','sentinel2',40000,'coupes'), + ('Windsor','windsor',95000,'coupes'), + ('Windsor Drop','windsor2',125000,'coupes'), + ('Zion','zion',36000,'coupes'), + ('Zion Cabrio','zion2',45000,'coupes'), + ('9F','ninef',65000,'sports'), + ('9F Cabrio','ninef2',80000,'sports'), + ('Alpha','alpha',60000,'sports'), + ('Banshee','banshee',70000,'sports'), + ('Bestia GTS','bestiagts',55000,'sports'), + ('Buffalo','buffalo',12000,'sports'), + ('Buffalo S','buffalo2',20000,'sports'), + ('Carbonizzare','carbonizzare',75000,'sports'), + ('Comet','comet2',65000,'sports'), + ('Coquette','coquette',65000,'sports'), + ('Drift Tampa','tampa2',80000,'sports'), + ('Elegy','elegy2',38500,'sports'), + ('Feltzer','feltzer2',55000,'sports'), + ('Furore GT','furoregt',45000,'sports'), + ('Fusilade','fusilade',40000,'sports'), + ('Jester','jester',65000,'sports'), + ('Jester(Racecar)','jester2',135000,'sports'), + ('Khamelion','khamelion',38000,'sports'), + ('Kuruma','kuruma',30000,'sports'), + ('Lynx','lynx',40000,'sports'), + ('Mamba','mamba',70000,'sports'), + ('Massacro','massacro',65000,'sports'), + ('Massacro(Racecar)','massacro2',130000,'sports'), + ('Omnis','omnis',35000,'sports'), + ('Penumbra','penumbra',28000,'sports'), + ('Rapid GT','rapidgt',35000,'sports'), + ('Rapid GT Convertible','rapidgt2',45000,'sports'), + ('Schafter V12','schafter3',50000,'sports'), + ('Seven 70','seven70',39500,'sports'), + ('Sultan','sultan',15000,'sports'), + ('Surano','surano',50000,'sports'), + ('Tropos','tropos',40000,'sports'), + ('Verlierer','verlierer2',70000,'sports'), + ('Adder','adder',900000,'super'), + ('Banshee 900R','banshee2',255000,'super'), + ('Bullet','bullet',90000,'super'), + ('Cheetah','cheetah',375000,'super'), + ('Entity XF','entityxf',425000,'super'), + ('ETR1','sheava',220000,'super'), + ('FMJ','fmj',185000,'super'), + ('Infernus','infernus',180000,'super'), + ('Osiris','osiris',160000,'super'), + ('Pfister','pfister811',85000,'super'), + ('RE-7B','le7b',325000,'super'), + ('Reaper','reaper',150000,'super'), + ('Sultan RS','sultanrs',65000,'super'), + ('T20','t20',300000,'super'), + ('Turismo R','turismor',350000,'super'), + ('Tyrus','tyrus',600000,'super'), + ('Vacca','vacca',120000,'super'), + ('Voltic','voltic',90000,'super'), + ('X80 Proto','prototipo',2500000,'super'), + ('Zentorno','zentorno',1500000,'super'), + ('Akuma','AKUMA',7500,'motorcycles'), + ('Avarus','avarus',18000,'motorcycles'), + ('Bagger','bagger',13500,'motorcycles'), + ('Bati 801','bati',12000,'motorcycles'), + ('Bati 801RR','bati2',19000,'motorcycles'), + ('BF400','bf400',6500,'motorcycles'), + ('BMX (velo)','bmx',160,'motorcycles'), + ('Carbon RS','carbonrs',18000,'motorcycles'), + ('Chimera','chimera',38000,'motorcycles'), + ('Cliffhanger','cliffhanger',9500,'motorcycles'), + ('Cruiser (velo)','cruiser',510,'motorcycles'), + ('Daemon','daemon',11500,'motorcycles'), + ('Daemon High','daemon2',13500,'motorcycles'), + ('Defiler','defiler',9800,'motorcycles'), + ('Double T','double',28000,'motorcycles'), + ('Enduro','enduro',5500,'motorcycles'), + ('Esskey','esskey',4200,'motorcycles'), + ('Faggio','faggio',1900,'motorcycles'), + ('Vespa','faggio2',2800,'motorcycles'), + ('Fixter (velo)','fixter',225,'motorcycles'), + ('Gargoyle','gargoyle',16500,'motorcycles'), + ('Hakuchou','hakuchou',31000,'motorcycles'), + ('Hakuchou Sport','hakuchou2',55000,'motorcycles'), + ('Hexer','hexer',12000,'motorcycles'), + ('Innovation','innovation',23500,'motorcycles'), + ('Manchez','manchez',5300,'motorcycles'), + ('Nemesis','nemesis',5800,'motorcycles'), + ('Nightblade','nightblade',35000,'motorcycles'), + ('PCJ-600','pcj',6200,'motorcycles'), + ('Ruffian','ruffian',6800,'motorcycles'), + ('Sanchez','sanchez',5300,'motorcycles'), + ('Sanchez Sport','sanchez2',5300,'motorcycles'), + ('Sanctus','sanctus',25000,'motorcycles'), + ('Scorcher (velo)','scorcher',280,'motorcycles'), + ('Sovereign','sovereign',22000,'motorcycles'), + ('Shotaro Concept','shotaro',320000,'motorcycles'), + ('Thrust','thrust',24000,'motorcycles'), + ('Tri bike (velo)','tribike3',520,'motorcycles'), + ('Vader','vader',7200,'motorcycles'), + ('Vortex','vortex',9800,'motorcycles'), + ('Woflsbane','wolfsbane',9000,'motorcycles'), + ('Zombie','zombiea',9500,'motorcycles'), + ('Zombie Luxuary','zombieb',12000,'motorcycles'), + ('blazer5', 'blazer5', 1755600, 'offroad'), + ('Ruiner 2', 'ruiner2', 5745600, 'muscle'), + ('Voltic 2', 'voltic2', 3830400, 'super'), + ('Ardent', 'ardent', 1150000, 'sportsclassics'), + ('Oppressor', 'oppressor', 3524500, 'super'), + ('Visione', 'visione', 2250000, 'super'), + ('Retinue', 'retinue', 615000, 'sportsclassics'), + ('Cyclone', 'cyclone', 1890000, 'super'), + ('Rapid GT3', 'rapidgt3', 885000, 'sportsclassics'), + ('raiden', 'raiden', 1375000, 'sports'), + ('Yosemite', 'yosemite', 485000, 'muscle'), + ('Deluxo', 'deluxo', 4721500, 'sportsclassics'), + ('Pariah', 'pariah', 1420000, 'sports'), + ('Stromberg', 'stromberg', 3185350, 'sports'), + ('SC 1', 'sc1', 1603000, 'super'), + ('riata', 'riata', 380000, 'offroad'), + ('Hermes', 'hermes', 535000, 'muscle'), + ('Savestra', 'savestra', 990000, 'sportsclassics'), + ('Streiter', 'streiter', 500000, 'sports'), + ('Kamacho', 'kamacho', 345000, 'offroad'), + ('GT 500', 'gt500', 785000, 'sportsclassics'), + ('Z190', 'z190', 900000, 'sportsclassics'), + ('Viseris', 'viseris', 875000, 'sportsclassics'), + ('Autarch', 'autarch', 1955000, 'super'), + ('Comet 5', 'comet5', 1145000, 'sports'), + ('Neon', 'neon', 1500000, 'sports'), + ('Revolter', 'revolter', 1610000, 'sports'), + ('Sentinel3', 'sentinel3', 650000, 'sports'), + ('Hustler', 'hustler', 625000, 'muscle') +; diff --git a/_resources/esx_vehicleshop/fxmanifest.lua b/_resources/esx_vehicleshop/fxmanifest.lua new file mode 100644 index 00000000..5f171a6d --- /dev/null +++ b/_resources/esx_vehicleshop/fxmanifest.lua @@ -0,0 +1,40 @@ +fx_version 'adamant' + +game 'gta5' + +description 'ESX Vehicle Shop' + +version '1.1.0' + +server_scripts { + '@async/async.lua', + '@mysql-async/lib/MySQL.lua', + '@es_extended/locale.lua', + 'locales/br.lua', + 'locales/en.lua', + 'locales/fi.lua', + 'locales/fr.lua', + 'locales/sv.lua', + 'locales/pl.lua', + 'locales/cs.lua', + 'config.lua', + 'server/main.lua' +} + +client_scripts { + '@es_extended/locale.lua', + 'locales/br.lua', + 'locales/en.lua', + 'locales/fi.lua', + 'locales/fr.lua', + 'locales/sv.lua', + 'locales/pl.lua', + 'locales/cs.lua', + 'config.lua', + 'client/utils.lua', + 'client/main.lua' +} + +dependency 'es_extended' + +export 'GeneratePlate' diff --git a/_resources/esx_vehicleshop/locales/br.lua b/_resources/esx_vehicleshop/locales/br.lua new file mode 100644 index 00000000..02f25d2c --- /dev/null +++ b/_resources/esx_vehicleshop/locales/br.lua @@ -0,0 +1,65 @@ +Locales['br'] = { + -- global menus + ['not_enough_in_society'] = 'não há o suficiente desse ~r~that item~s~ na sociedade!', + ['player_cannot_hold'] = 'você não tem espaço suficiente em seu inventário!', + ['vehicle_belongs'] = 'um veículo com placa ~y~%s~s~ agora pertence a ~b~you~s~', + ['broke_company'] = 'você não tem dinheiro suficiente na conta da empresa', + ['license_missing'] = 'você não tem carteira de motorista!', + ['buy_vehicle_shop'] = 'comprar %s por $%s?', + ['buy_vehicle'] = 'comprar veículo', + ['car_dealer'] = 'Concessionária de carros', + ['shop_awaiting_model'] = 'o veículo está carregando no momento, aguarde', + ['create_bill'] = 'criar recibo', + ['dealer_boss'] = 'Concessionária de carros - Chefe', + ['delivered'] = 'veículo ~g~entregue~s~ para o revendedor', + ['depop_vehicle'] = 'volte ao veiculo', + ['return_provider'] = 'devolver veículo ao fornecedor', + ['get_rented_vehicles'] = 'veículos para alugar', + ['no_current_vehicle'] = 'you do not currently have an vehicle displayed', + ['invalid_amount'] = 'Montante inválido', + ['invoice_amount'] = 'valor da fatura', + ['no'] = 'não', + ['yes'] = 'sim', + ['no_players'] = 'sem jogadores nas proximidades', + ['not_enough_money'] = 'você não tem dinheiro suficiente', + ['not_rental'] = 'isso não é um ~r~veículo de aluguel~s~', + ['not_yours'] = 'este veículo não pertence a você', + ['paid_rental'] = 'you have paid ~g~$%s~s~ for renting an vehicle with plate ~y~%s~s~', + ['paid_rental_evicted'] = 'you could not afford to pay ~g~$%s~s~ for your rented vehicle with plate ~y~%s~s~, it has been returned to the dealership', + ['pop_vehicle'] = 'sai do veiculo', + ['rent_vehicle'] = 'Concessionária - Veículos para alugar', + ['return_provider_menu'] = 'revendedor de carros - Devolver veículo ao fornecedor', + ['rental_amount'] = 'montante do aluguel', + ['sell_menu'] = 'Pressione ~INPUT_CONTEXT~ para vender ', + ['set_vehicle_owner_rent'] = 'Atribuir veículo [Alugar]', + ['set_vehicle_owner_sell'] = 'Veículos para [Venda]', + ['shop_menu'] = 'pressione ~INPUT_CONTEXT~ para acessar o menu', + ['generic_shopitem'] = '$%s', + ['vehicle_dealer'] = 'Veículo - Concessionária', + ['vehicle_menu'] = 'Pressione ~INPUT_CONTEXT~ para fazer o seu veículo', + ['vehicle_purchased'] = 'você comprou um veículo', + ['vehicle_set_owned'] = 'Veículo ~y~%s~s~ foi atribuído a ~b~%s~s~', + ['vehicle_set_rented'] = 'Veículo ~y~%s~s~ foi alugado para ~b~%s~s~', + ['vehicle_sold_for'] = 'o ~b~%s~s~ foi vendido com sucesso para ~g~$%s~s~', + ['vehicle_sold_to'] = 'Veículo ~y~%s~s~ vendido para ~b~%s~s~', + ['deposit_stock'] = 'Colocar no estoque', + ['take_stock'] = 'Retirar do estoque', + ['dealership_stock'] = 'estoque da concessionária', + ['amount'] = 'montante', + ['quantity_invalid'] = 'quantidade inválida', + ['inventory'] = 'Inventário', + ['dealership'] = 'Concessionária', + ['dealer_customers'] = 'clientes revendedores', + ['have_withdrawn'] = 'você retirou ~y~x%s~s~ ~b~%s~s~', + ['have_deposited'] = 'você depositou ~y~x%s~s~ ~b~%s~s~', + ['boss_actions'] = 'ações do chefe', + ['invalid_vehicle'] = 'Veículo inválido', + + -- sold vehicles + ['boss_sold'] = 'lista de veículos vendidos', + ['customer_client'] = 'nome do cliente', + ['customer_model'] = 'modelo de carro', + ['customer_plate'] = 'placa do carro', + ['customer_soldby'] = 'vendido por', + ['customer_date'] = 'data', +} diff --git a/_resources/esx_vehicleshop/locales/cs.lua b/_resources/esx_vehicleshop/locales/cs.lua new file mode 100644 index 00000000..c284826f --- /dev/null +++ b/_resources/esx_vehicleshop/locales/cs.lua @@ -0,0 +1,65 @@ +Locales['cs'] = { + -- global menus + ['not_enough_in_society'] = 'neni zde dostatek ~r~tohoto predmetu~s~ ve spolecnosti!', + ['player_cannot_hold'] = '~r~nemas~s~ dostatek ~y~volneho mista~s~ ve tvem inventari!', + ['vehicle_belongs'] = 'vozidlo se značkou ~y~%s~s~ nyní patří ~b~tobě~s~', + ['broke_company'] = 'nemáš dostatek peněz na účtě společnosti', + ['license_missing'] = 'nemáš ridicský prukaz!', + ['buy_vehicle_shop'] = 'přeješ si zakoupit %s za $%s?', + ['buy_vehicle'] = 'zakoupit vozidlo', + ['car_dealer'] = 'autosalon', + ['shop_awaiting_model'] = 'vozidlo se právě ~g~STAHUJE & NAČÍTÁ~s~, čekej prosím', + ['create_bill'] = 'vytvořit účtenku', + ['dealer_boss'] = 'prodejce aut - Sef', + ['delivered'] = 'vozidlo bylo ~g~doruceno~s~ dealerovi', + ['depop_vehicle'] = 'vrátit vozidlo do garaze', + ['return_provider'] = 'vratit vozidlo zprostredkovateli', + ['get_rented_vehicles'] = 'vozidla na pujceni', + ['no_current_vehicle'] = 'momentalne nemas zobrazene vozidlo', + ['invalid_amount'] = 'neplatná částka', + ['invoice_amount'] = 'castka na fakture', + ['no'] = 'ne', + ['yes'] = 'ano', + ['no_players'] = 'žádní hráči poblíž tebe', + ['not_enough_money'] = 'nemáš dostatek peněz', + ['not_rental'] = 'tohle není ~r~půjčitelné vozidlo~s~', + ['not_yours'] = 'tohle auto ti nepatří', + ['paid_rental'] = 'you have paid ~g~$%s~s~ for renting an vehicle with plate ~y~%s~s~', + ['paid_rental_evicted'] = 'you could not afford to pay ~g~$%s~s~ for your rented vehicle with plate ~y~%s~s~, it has been returned to the dealership', + ['pop_vehicle'] = 'vlozit vozidlo k prodeji', + ['rent_vehicle'] = 'autosalon - Vozidla k pujceni', + ['return_provider_menu'] = 'autosalon - Vratit vozidlo zprostredkovateli', + ['rental_amount'] = 'cena pujceni', + ['sell_menu'] = 'stiskni ~INPUT_CONTEXT~ pro prodani ~y~%s~s~ za ~g~$%s~s~', + ['set_vehicle_owner_rent'] = 'pujcit vozidlo', + ['set_vehicle_owner_sell'] = 'prodat vozidlo', + ['shop_menu'] = 'stiskni ~INPUT_CONTEXT~ pro přístup do menu', + ['generic_shopitem'] = '$%s', + ['vehicle_dealer'] = 'vozidlo - Prodejce aut', + ['vehicle_menu'] = 'stiskni ~INPUT_CONTEXT~ pro vraceni vozidla zpet', + ['vehicle_purchased'] = 'zakoupil jsi vozidlo', + ['vehicle_set_owned'] = 'vozidlo ~y~%s~s~ bylo prirazeno ~b~%s~s~', + ['vehicle_set_rented'] = 'vozidlo ~y~%s~s~ bylo pujceno za ~b~%s~s~', + ['vehicle_sold_for'] = '~b~%s~s~ bylo ~y~prodano~s~ za ~g~$%s~s~', + ['vehicle_sold_to'] = 'vozidlo se znackou ~y~%s~s~ bylo prodano za ~b~%s~s~', + ['deposit_stock'] = 'vlozit do skladu', + ['take_stock'] = 'vybraz ze skladu', + ['dealership_stock'] = 'sklad Autosalonu', + ['amount'] = 'castka', + ['quantity_invalid'] = 'to je neplatne mnozstvi', + ['inventory'] = 'inventar', + ['dealership'] = 'autodealer', + ['dealer_customers'] = 'zakaznici dealera', + ['have_withdrawn'] = 'vybral jsi ~y~x%s~s~ ~b~%s~s~', + ['have_deposited'] = 'vlozil jsi ~y~x%s~s~ ~b~%s~s~', + ['boss_actions'] = 'akce šéfa', + ['invalid_vehicle'] = 'neplatné vozidlo', + + -- sold vehicles + ['boss_sold'] = 'seznam prodaných vozidel', + ['customer_client'] = 'jméno zákazníka', + ['customer_model'] = 'model auta', + ['customer_plate'] = 'značka auta', + ['customer_soldby'] = 'prodáno zaměstnancem', + ['customer_date'] = 'datum', +} diff --git a/_resources/esx_vehicleshop/locales/en.lua b/_resources/esx_vehicleshop/locales/en.lua new file mode 100644 index 00000000..a596a8be --- /dev/null +++ b/_resources/esx_vehicleshop/locales/en.lua @@ -0,0 +1,65 @@ +Locales['en'] = { + -- global menus + ['not_enough_in_society'] = 'there\'s not enough of ~r~that item~s~ in the society!', + ['player_cannot_hold'] = 'you do ~r~not~s~ have enough ~y~free space~s~ in your inventory!', + ['vehicle_belongs'] = 'a vehicle with plate ~y~%s~s~ now belongs to ~b~you~s~', + ['broke_company'] = 'you do not have enough money in the company account', + ['license_missing'] = 'you don\'t have a driver\'s license!', + ['buy_vehicle_shop'] = 'do you want to purchase %s for $%s?', + ['buy_vehicle'] = 'buy vehicle', + ['car_dealer'] = 'car Dealership', + ['shop_awaiting_model'] = 'the vehicle is currently loading, please wait', + ['create_bill'] = 'create bill', + ['dealer_boss'] = 'car Dealer - Boss', + ['delivered'] = 'the vehicle has been ~g~delivered~s~ to the dealer', + ['depop_vehicle'] = 'return vehicle to garage', + ['return_provider'] = 'return vehicle to provider', + ['get_rented_vehicles'] = 'vehicles for rent', + ['no_current_vehicle'] = 'you do not currently have a vehicle on display', + ['invalid_amount'] = 'invalid amount', + ['invoice_amount'] = 'invoice amount', + ['no'] = 'no', + ['yes'] = 'yes', + ['no_players'] = 'there is no players near you', + ['not_enough_money'] = 'you do not have enough money', + ['not_rental'] = 'this is not a ~r~rental vehicle~s~', + ['not_yours'] = 'this vehicle does not belong to you', + ['paid_rental'] = 'you have paid ~g~$%s~s~ for renting a vehicle with plate ~y~%s~s~', + ['paid_rental_evicted'] = 'you could not afford to pay ~g~$%s~s~ for your rented vehicle with plate ~y~%s~s~, it has been returned to the dealership', + ['pop_vehicle'] = 'put out vehicle for sale', + ['rent_vehicle'] = 'car Dealer - Vehicles for rent', + ['return_provider_menu'] = 'car Dealer - Return vehicle to provider', + ['rental_amount'] = 'rental amount', + ['sell_menu'] = 'press ~INPUT_CONTEXT~ to sell your ~y~%s~s~ for ~g~$%s~s~', + ['set_vehicle_owner_rent'] = 'rent vehicle', + ['set_vehicle_owner_sell'] = 'sell vehicle', + ['shop_menu'] = 'press ~INPUT_CONTEXT~ to access the menu', + ['generic_shopitem'] = '$%s', + ['vehicle_dealer'] = 'vehicle - Car Dealer', + ['vehicle_menu'] = 'press ~INPUT_CONTEXT~ to give back the rented vehicle', + ['vehicle_purchased'] = 'you bought a vehicle', + ['vehicle_set_owned'] = 'vehicle ~y~%s~s~ has been assigned to ~b~%s~s~', + ['vehicle_set_rented'] = 'vehicle ~y~%s~s~ has been rented to ~b~%s~s~', + ['vehicle_sold_for'] = 'the ~b~%s~s~ has been ~y~sold~s~ for ~g~$%s~s~', + ['vehicle_sold_to'] = 'the vehicle with plate ~y~%s~s~ has been sold to ~b~%s~s~', + ['deposit_stock'] = 'deposit stock', + ['take_stock'] = 'withdraw stock', + ['dealership_stock'] = 'dealership Stock', + ['amount'] = 'amount', + ['quantity_invalid'] = 'that\'s an invalid quantity', + ['inventory'] = 'inventory', + ['dealership'] = 'car Dealer', + ['dealer_customers'] = 'dealer customers', + ['have_withdrawn'] = 'you have withdrawn ~y~x%s~s~ ~b~%s~s~', + ['have_deposited'] = 'you have deposited ~y~x%s~s~ ~b~%s~s~', + ['boss_actions'] = 'boss actions', + ['invalid_vehicle'] = 'Invalid vehicle', + + -- sold vehicles + ['boss_sold'] = 'list of sold vehicles', + ['customer_client'] = 'customer name', + ['customer_model'] = 'car model', + ['customer_plate'] = 'car plate', + ['customer_soldby'] = 'sold by', + ['customer_date'] = 'date', +} diff --git a/_resources/esx_vehicleshop/locales/fi.lua b/_resources/esx_vehicleshop/locales/fi.lua new file mode 100644 index 00000000..74a17c40 --- /dev/null +++ b/_resources/esx_vehicleshop/locales/fi.lua @@ -0,0 +1,65 @@ +Locales['fi'] = { + -- global menus + ['not_enough_in_society'] = 'firman varastossa ei ole enempää ~r~tuota esinettä~s~!', + ['player_cannot_hold'] = 'sinulla ~r~ei ole~s~ tarpeeksi ~y~vapaata tilaa~s~ repussasi!', + ['vehicle_belongs'] = 'ajoneuvo kilvellä ~y~%s~s~ on nyt ~b~sinun~s~ omistuksessasi', + ['broke_company'] = 'sinulla ei ole tarpeeksi rahaa yrityksen tilillä', + ['license_missing'] = 'you don\'t have a driver\'s license!', + ['buy_vehicle_shop'] = 'haluatko ostaa ajoneuvon %s hintaan $%s?', + ['buy_vehicle'] = 'osta ajoneuvo', + ['car_dealer'] = 'autokauppa', + ['shop_awaiting_model'] = 'the vehicle is currently loading, please wait', + ['create_bill'] = 'tee lasku', + ['dealer_boss'] = 'autokauppa - Pomo', + ['delivered'] = 'ajoneuvo on ~g~kuljetettu~s~ myyjälle', + ['depop_vehicle'] = 'palauta ajoneuvo', + ['return_provider'] = 'return vehicle to provider', + ['get_rented_vehicles'] = 'vuokrattavat ajoneuvot', + ['no_current_vehicle'] = 'you do not currently have an vehicle displayed', + ['invalid_amount'] = 'virheellinen summa', + ['invoice_amount'] = 'laskun summa', + ['no'] = 'ei', + ['yes'] = 'kyllä', + ['no_players'] = 'ei pelaajia lähettyvillä', + ['not_enough_money'] = 'sinulla ei ole tarpeeksi rahaa', + ['not_rental'] = 'tämä ei ole ~r~vuokra ajoneuvo~s~', + ['not_yours'] = 'tämä ajoneuvo ei kuulu sinulle', + ['paid_rental'] = 'you have paid ~g~$%s~s~ for renting an vehicle with plate ~y~%s~s~', + ['paid_rental_evicted'] = 'you could not afford to pay ~g~$%s~s~ for your rented vehicle with plate ~y~%s~s~, it has been returned to the dealership', + ['pop_vehicle'] = 'ota ajoneuvo ulos näkyville myyntiä varten', + ['rent_vehicle'] = 'autokauppa - Vuokrattavat ajokit', + ['return_provider_menu'] = 'car Dealer - Return vehicle to provider', + ['rental_amount'] = 'vuokran summa', + ['sell_menu'] = 'paina ~INPUT_CONTEXT~ myydäksesi ~y~%s~s~ hintaan: ~g~$%s~s~', + ['set_vehicle_owner_rent'] = 'määritä ajoneuvon [Vuokra]', + ['set_vehicle_owner_sell'] = 'myy ajoneuvo', + ['shop_menu'] = 'paina ~INPUT_CONTEXT~ avataksesi menu', + ['generic_shopitem'] = '$%s', + ['vehicle_dealer'] = 'ajonevuo - Autokauppa', + ['vehicle_menu'] = 'paina ~INPUT_CONTEXT~ tehdäksesi tästä sinun ajoneuvo', + ['vehicle_purchased'] = 'sinä ostit ajoneuvon', + ['vehicle_set_owned'] = 'ajoneuvo ~y~%s~s~ on nyt määritetty henkilölle ~b~%s~s~', + ['vehicle_set_rented'] = 'ajoneuvo ~y~%s~s~ on nyt vuokrattu henkilölle ~b~%s~s~', + ['vehicle_sold_for'] = 'the ~b~%s~s~ has been ~y~sold~s~ for ~g~$%s~s~', + ['vehicle_sold_to'] = 'ajoneuvo ~y~%s~s~ myyty henkilölle ~b~%s~s~', + ['deposit_stock'] = 'talleta firman varastoon', + ['take_stock'] = 'nosta firman varastosta', + ['dealership_stock'] = 'autokaupan varasto', + ['amount'] = 'määrä', + ['quantity_invalid'] = 'virheellinen määrä', + ['inventory'] = 'reppu', + ['dealership'] = 'autokauppa', + ['dealer_customers'] = 'autokaupan asiakas', + ['have_withdrawn'] = 'sinä otit ~y~x%s~s~ ~b~%s~s~', + ['have_deposited'] = 'sinä talletit ~y~x%s~s~ ~b~%s~s~', + ['boss_actions'] = 'Pomo toiminnot', + ['invalid_vehicle'] = 'di-wastong sasakyan', + + -- sold vehicles + ['boss_sold'] = 'list of sold vehicles', + ['customer_client'] = 'customer name', + ['customer_model'] = 'car model', + ['customer_plate'] = 'car plate', + ['customer_soldby'] = 'sold by', + ['customer_date'] = 'date', +} diff --git a/_resources/esx_vehicleshop/locales/fr.lua b/_resources/esx_vehicleshop/locales/fr.lua new file mode 100644 index 00000000..db3dde65 --- /dev/null +++ b/_resources/esx_vehicleshop/locales/fr.lua @@ -0,0 +1,65 @@ +Locales['fr'] = { + -- global menus + ['not_enough_in_society'] = 'il n\'y à plus assez ~r~de cet objet~s~ dans la societé!', + ['player_cannot_hold'] = 'vous n\'avez ~r~pas~s~ assez ~y~d\'espace~s~ dans votre inventaire!', + ['vehicle_belongs'] = 'le véhicule avec la plaque ~y~%s~s~ est désormais à ~b~vous~s~', + ['broke_company'] = 'vous n\avez pas assez d\'argent sur le compte de la societé', + ['license_missing'] = 'vous n\'avez pas de permis de conduire !', + ['buy_vehicle_shop'] = 'acheter %s pour $%s?', + ['buy_vehicle'] = 'acheter véhicule', + ['car_dealer'] = 'concessionnaire', + ['shop_awaiting_model'] = 'le véhicule est en train de charger, veuillez patienter...', + ['create_bill'] = 'créer facture', + ['dealer_boss'] = 'concessionnaire - Patron', + ['delivered'] = 'véhicule ~g~rendu~s~ au concessionnaire', + ['depop_vehicle'] = 'rentrer véhicule', + ['return_provider'] = 'rendre le véhicule', + ['get_rented_vehicles'] = 'véhicules en location', + ['no_current_vehicle'] = 'vous n\'avez aucun véhicule d\'affiché pour le moment', + ['invalid_amount'] = 'montant invalide', + ['invoice_amount'] = 'montant de la facture', + ['no'] = 'non', + ['yes'] = 'oui', + ['no_players'] = 'aucun joueur à proximité', + ['not_enough_money'] = 'vous n\'avez pas assez d\'argent', + ['not_rental'] = 'ce n\'est pas un ~r~véhicule de location~s~', + ['not_yours'] = 'ce véhicule ne vous appartient pas', + ['paid_rental'] = 'vous avez payé ~g~$%s~s~ pour louer une voiture avec la plaque ~y~%s~s~', + ['paid_rental_evicted'] = 'vous ne pouviez pas vous permettre de payer ~g~$%s~s~ pour votre véhicule loué avec la plaque ~y~%s~s~, il a été retourné au concessionnaire', + ['pop_vehicle'] = 'sortir véhicule', + ['rent_vehicle'] = 'concessionnaire - Véhicules en location', + ['return_provider_menu'] = 'concessionnaire - Retour de véhicule', + ['rental_amount'] = 'montant de la location', + ['sell_menu'] = 'appuyez sur ~INPUT_CONTEXT~ pour vendre ~y~%s~s~ au prix de ~g~$%s~s~', + ['set_vehicle_owner_rent'] = 'attribuer véhicule [Location]', + ['set_vehicle_owner_sell'] = 'attribuer véhicule [Vente]', + ['shop_menu'] = 'appuyez sur ~INPUT_CONTEXT~ pour accéder au menu', + ['generic_shopitem'] = '$%s', + ['vehicle_dealer'] = 'concessionnaire - Véhicules', + ['vehicle_menu'] = 'appuez sur ~INPUT_CONTEXT~ pour rendre votre véhicule', + ['vehicle_purchased'] = 'vous avez acheté un véhicule', + ['vehicle_set_owned'] = 'le véhicule ~y~%s~s~ a été attribué à ~b~%s~s~', + ['vehicle_set_rented'] = 'le véhicule ~y~%s~s~ a été loué à ~b~%s~s~', + ['vehicle_sold_for'] = 'le ~b~%s~s~ a été ~y~vendu~s~ pour ~g~$%s~s~', + ['vehicle_sold_to'] = 'véhicule ~y~%s~s~ vendu à ~b~%s~s~', + ['deposit_stock'] = 'déposer Stock', + ['take_stock'] = 'prendre Stock', + ['dealership_stock'] = 'concession Stock', + ['amount'] = 'quantité', + ['quantity_invalid'] = 'quantité invalide', + ['inventory'] = 'inventaire', + ['dealership'] = 'concession', + ['dealer_customers'] = 'client concession', + ['have_withdrawn'] = 'vous avez retiré ~y~x%s~s~ ~b~%s~s~', + ['have_deposited'] = 'vous avez deposé ~y~x%s~s~ ~b~%s~s~', + ['boss_actions'] = 'actions du chef', + ['invalid_vehicle'] = 'Véhicule invalide', + + -- sold vehicles + ['boss_sold'] = 'liste des véhicule vendu', + ['customer_client'] = 'nom du client', + ['customer_model'] = 'modèle de voiture', + ['customer_plate'] = 'plaque d\'immatriculation', + ['customer_soldby'] = 'vendu par', + ['customer_date'] = 'date', +} diff --git a/_resources/esx_vehicleshop/locales/pl.lua b/_resources/esx_vehicleshop/locales/pl.lua new file mode 100644 index 00000000..4ee3b293 --- /dev/null +++ b/_resources/esx_vehicleshop/locales/pl.lua @@ -0,0 +1,65 @@ +Locales['pl'] = { + -- global menus + ['not_enough_in_society'] = 'brak tego ~r~przedmiotu~s~ w firmie!', + ['player_cannot_hold'] = '~r~Nie masz~s~ wystarczająco ~y~wolnego~s~ miejsca w ekwipunku!', + ['vehicle_belongs'] = 'pojazd z rejestracją ~y~%s~s~ teraz należy do ~b~ciebie~s~', + ['broke_company'] = 'twoja firma nie ma wystarczająco pieniedzy', + ['license_missing'] = 'you don\'t have a driver\'s license!', + ['buy_vehicle_shop'] = 'czy chcesz kupić %s za $%s?', + ['buy_vehicle'] = 'kup pojazd', + ['car_dealer'] = 'sprzedawca Aut', + ['shop_awaiting_model'] = 'the vehicle is currently loading, please wait', + ['create_bill'] = 'stwórz fakture', + ['dealer_boss'] = 'salon samochodowy - Szef', + ['delivered'] = 'pojazd został ~g~dostarczony~s~ do salonu', + ['depop_vehicle'] = 'oddaj pojazd', + ['return_provider'] = 'return vehicle to provider', + ['get_rented_vehicles'] = 'pojazdy do wynajęcia', + ['no_current_vehicle'] = 'you do not currently have an vehicle displayed', + ['invalid_amount'] = 'nieprawidłowa ilość', + ['invoice_amount'] = 'suma faktury', + ['no'] = 'nie', + ['yes'] = 'tak', + ['no_players'] = 'brak graczy w pobliżu', + ['not_enough_money'] = 'nie masz wystarczająco pieniędzy', + ['not_rental'] = 'to nie jest ~r~wypożyczone auto~s~', + ['not_yours'] = 'ten pojazd nie należy do ciebie', + ['paid_rental'] = 'you have paid ~g~$%s~s~ for renting an vehicle with plate ~y~%s~s~', + ['paid_rental_evicted'] = 'you could not afford to pay ~g~$%s~s~ for your rented vehicle with plate ~y~%s~s~, it has been returned to the dealership', + ['pop_vehicle'] = 'wyciągnij auto do sprzedaży', + ['rent_vehicle'] = 'salon samochodowy - Pojazdy do wynajęcia', + ['return_provider_menu'] = 'car Dealer - Return vehicle to provider', + ['rental_amount'] = 'suma wynajęcia', + ['sell_menu'] = 'wcisnij ~INPUT_CONTEXT~ aby sprzedać ~y~%s~s~ za ~g~$%s~s~', + ['set_vehicle_owner_rent'] = 'zarejestruj pojazd [Wynajem]', + ['set_vehicle_owner_sell'] = 'zarejestruj pojazd [Kupno]', + ['shop_menu'] = 'wcisnij ~INPUT_CONTEXT~ aby wejść do menu', + ['generic_shopitem'] = '$%s', + ['vehicle_dealer'] = 'pojazdy - Sprzedawca aut', + ['vehicle_menu'] = 'wcisnij ~INPUT_CONTEXT~ aby wyjąć pojazd', + ['vehicle_purchased'] = 'kupujesz pojazd', + ['vehicle_set_owned'] = 'pojazd ~y~%s~s~ został zarejestrowany na ~b~%s~s~', + ['vehicle_set_rented'] = 'pojazd ~y~%s~s~ został wynajęty przez ~b~%s~s~', + ['vehicle_sold_for'] = 'the ~b~%s~s~ has been ~y~sold~s~ for ~g~$%s~s~', + ['vehicle_sold_to'] = 'pojazd ~y~%s~s~ został sprzedany do ~b~%s~s~', + ['deposit_stock'] = 'deponuj przedmioty', + ['take_stock'] = 'wyciągnij przedmioty', + ['dealership_stock'] = 'zaopatrzenie salonu', + ['amount'] = 'suma', + ['quantity_invalid'] = 'nieprawidłowa ilość', + ['inventory'] = 'ekwipunek', + ['dealership'] = 'sprzedawca Aut', + ['dealer_customers'] = 'klienci salonu', + ['have_withdrawn'] = 'wyciągasz ~y~x%s~s~ ~b~%s~s~', + ['have_deposited'] = 'deponujesz ~y~x%s~s~ ~b~%s~s~', + ['boss_actions'] = 'akcje szefa', + ['invalid_vehicle'] = 'nieprawidłowy pojazd', + + -- sold vehicles + ['boss_sold'] = 'list of sold vehicles', + ['customer_client'] = 'customer name', + ['customer_model'] = 'car model', + ['customer_plate'] = 'car plate', + ['customer_soldby'] = 'sold by', + ['customer_date'] = 'date', +} diff --git a/_resources/esx_vehicleshop/locales/sv.lua b/_resources/esx_vehicleshop/locales/sv.lua new file mode 100644 index 00000000..59588ae9 --- /dev/null +++ b/_resources/esx_vehicleshop/locales/sv.lua @@ -0,0 +1,65 @@ +Locales['sv'] = { + -- global menus + ['not_enough_in_society'] = 'det finns inte tillräckligt många av ~r~det föremålet~s~ i förrådet!', + ['player_cannot_hold'] = 'du har ~r~inte~s~ tillräckligt mycket~y~plats~s~ på dig!', + ['vehicle_belongs'] = 'fordonet med reg numret ~y~%s~s~ tillhör nu ~b~dig~s~', + ['broke_company'] = 'det finns inte tillräckligt mycket pengar i företagskontot', + ['license_missing'] = 'du är inte behörig att köpa bilar, B-körkort krävs!', + ['buy_vehicle_shop'] = 'vill du köpa in %s för %s SEK?', + ['buy_vehicle'] = 'Köp in fordon', + ['car_dealer'] = 'bilförsäljare', + ['shop_awaiting_model'] = 'fordon laddas in, vänligen vänta', + ['create_bill'] = 'ge faktura', + ['dealer_boss'] = 'chefmeny', + ['delivered'] = 'fordonet har ~g~lämnats tillbaka~s~ till bilförsäljaren', + ['depop_vehicle'] = 'ställ tillbaka fordonet', + ['return_provider'] = 'sälj tillbaka fordon till leverantör', + ['get_rented_vehicles'] = 'uthyrda fordon', + ['no_current_vehicle'] = 'du har inget fordon ute till salu', + ['invalid_amount'] = 'ogiltigt belopp', + ['invoice_amount'] = 'belopp att betala', + ['no'] = 'nej', + ['yes'] = 'ja', + ['no_players'] = 'det finns ingen i närheten', + ['not_enough_money'] = 'du har inte tillräckligt mycket pengar', + ['not_rental'] = 'detta är inte ett ~r~uthyrt fordon~s~', + ['not_yours'] = 'det här fordonet tillhör inte dig', + ['paid_rental'] = 'du har betalat ~g~%s SEK~s~ för att hyra ett fordon med reg nummer ~y~%s~s~', + ['paid_rental_evicted'] = 'du hade ej råd att betala ~g~%s SEK~s~ för ditt hyrda fordon med reg nummer ~y~%s~s~, den har tagits av bilförsäljaren', + ['pop_vehicle'] = 'ställ ut fordon till salu', + ['rent_vehicle'] = 'bilförsäljare - fordon för uthyrning', + ['return_provider_menu'] = 'bilförsäljare - sälj tillbaka fordon till leverantör', + ['rental_amount'] = 'uthyrningsbelopp', + ['sell_menu'] = 'tryck ~INPUT_CONTEXT~ för att sälja ~y~%s~s~ för ~g~%s SEK~s~', + ['set_vehicle_owner_rent'] = 'hyr ut fordon', + ['set_vehicle_owner_sell'] = 'sälj fordon', + ['shop_menu'] = 'tryck ~INPUT_CONTEXT~ för öppna ~y~bilförsäljarsmenyn~s~.', + ['generic_shopitem'] = '%s SEK', + ['vehicle_dealer'] = 'bilförsäljare - fordon för visning', + ['vehicle_menu'] = 'tryck på ~INPUT_CONTEXT~ för att ~o~lämna tillbaka~s~ fordonet till bilförsäljaren.', + ['vehicle_purchased'] = 'du köpte fordonet', + ['vehicle_set_owned'] = 'fordonet ~y~%s~s~ har tilldelats till ~b~%s~s~', + ['vehicle_set_rented'] = 'fordonet ~y~%s~s~ har hyrts ut till ~b~%s~s~', + ['vehicle_sold_for'] = '~b~%s~s~ har ~y~sålts~s~ för ~g~%s SEK~s~', + ['vehicle_sold_to'] = '~y~%s~s~ har sålts till ~b~%s~s~', + ['deposit_stock'] = 'lägg in i förråd', + ['take_stock'] = 'ta ut ur förråd', + ['dealership_stock'] = 'bilförsäljares förråd', + ['amount'] = 'mängd', + ['quantity_invalid'] = 'ogiltig mängd', + ['inventory'] = 'förråd', + ['dealership'] = 'bilförsäljare', + ['dealer_customers'] = 'kund', + ['have_withdrawn'] = 'du har tagit ut ~y~x%s~s~ ~b~%s~s~', + ['have_deposited'] = 'du har lagt in ~y~x%s~s~ ~b~%s~s~', + ['boss_actions'] = 'chef handlingar', + ['invalid_vehicle'] = 'ogiltigt fordon', + + -- sold vehicles + ['boss_sold'] = 'lista av sålda fordon', + ['customer_client'] = 'kund', + ['customer_model'] = 'bil modell', + ['customer_plate'] = 'registreringsnummer', + ['customer_soldby'] = 'såld av', + ['customer_date'] = 'datum', +} diff --git a/_resources/esx_vehicleshop/localization/br_esx_vehicleshop.sql b/_resources/esx_vehicleshop/localization/br_esx_vehicleshop.sql new file mode 100644 index 00000000..b6b02ebe --- /dev/null +++ b/_resources/esx_vehicleshop/localization/br_esx_vehicleshop.sql @@ -0,0 +1,333 @@ +USE `es_extended`; + +INSERT INTO `addon_account` (name, label, shared) VALUES + ('society_cardealer','Vendedor de carros',1) +; + +INSERT INTO `addon_inventory` (name, label, shared) VALUES + ('society_cardealer','Vendedor de carros',1) +; + +INSERT INTO `jobs` (name, label) VALUES + ('cardealer','Vendedor de carros') +; + +INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES + ('cardealer',0,'recrutar','Recrutar',10,'{}','{}'), + ('cardealer',1,'novato','Novato',25,'{}','{}'), + ('cardealer',2,'experiente','Experiente',40,'{}','{}'), + ('cardealer',3,'chefe','Chefe',0,'{}','{}') +; + +CREATE TABLE `cardealer_vehicles` ( + `id` int NOT NULL AUTO_INCREMENT, + `vehicle` varchar(255) NOT NULL, + `price` int NOT NULL, + + PRIMARY KEY (`id`) +); + +CREATE TABLE `vehicle_sold` ( + `client` VARCHAR(50) NOT NULL, + `model` VARCHAR(50) NOT NULL, + `plate` VARCHAR(50) NOT NULL, + `soldby` VARCHAR(50) NOT NULL, + `date` VARCHAR(50) NOT NULL, + + PRIMARY KEY (`plate`) +); + +CREATE TABLE `owned_vehicles` ( + `owner` varchar(40) NOT NULL, + `plate` varchar(12) NOT NULL, + `vehicle` longtext, + `type` VARCHAR(20) NOT NULL DEFAULT 'car', + `job` VARCHAR(20) NULL DEFAULT NULL, + `stored` TINYINT NOT NULL DEFAULT '0', + + PRIMARY KEY (`plate`) +); + +CREATE TABLE `rented_vehicles` ( + `vehicle` varchar(60) NOT NULL, + `plate` varchar(12) NOT NULL, + `player_name` varchar(255) NOT NULL, + `base_price` int NOT NULL, + `rent_price` int NOT NULL, + `owner` varchar(22) NOT NULL, + + PRIMARY KEY (`plate`) +); + +CREATE TABLE `vehicle_categories` ( + `name` varchar(60) NOT NULL, + `label` varchar(60) NOT NULL, + + PRIMARY KEY (`name`) +); + +INSERT INTO `vehicle_categories` (name, label) VALUES + ('compacts','Compactos'), + ('coupes','Cupês'), + ('sedans','Sedans'), + ('sports','Esportes'), + ('sportsclassics','Clássicos Esportivos'), + ('super','Super'), + ('muscle','Músculo'), + ('offroad','Fora da estrada'), + ('suvs','SUVs'), + ('vans','Vans'), + ('motorcycles','Motos') +; + +CREATE TABLE `vehicles` ( + `name` varchar(60) NOT NULL, + `model` varchar(60) NOT NULL, + `price` int NOT NULL, + `category` varchar(60) DEFAULT NULL, + + PRIMARY KEY (`model`) +); + +INSERT INTO `vehicles` (name, model, price, category) VALUES + ('Blade','blade',15000,'muscle'), + ('Buccaneer','buccaneer',18000,'muscle'), + ('Buccaneer Rider','buccaneer2',24000,'muscle'), + ('Chino','chino',15000,'muscle'), + ('Chino Luxe','chino2',19000,'muscle'), + ('Coquette BlackFin','coquette3',55000,'muscle'), + ('Dominator','dominator',35000,'muscle'), + ('Dukes','dukes',28000,'muscle'), + ('Gauntlet','gauntlet',30000,'muscle'), + ('Hotknife','hotknife',125000,'muscle'), + ('Faction','faction',20000,'muscle'), + ('Faction Rider','faction2',30000,'muscle'), + ('Faction XL','faction3',40000,'muscle'), + ('Nightshade','nightshade',65000,'muscle'), + ('Phoenix','phoenix',12500,'muscle'), + ('Picador','picador',18000,'muscle'), + ('Sabre Turbo','sabregt',20000,'muscle'), + ('Sabre GT','sabregt2',25000,'muscle'), + ('Slam Van','slamvan3',11500,'muscle'), + ('Tampa','tampa',16000,'muscle'), + ('Virgo','virgo',14000,'muscle'), + ('Vigero','vigero',12500,'muscle'), + ('Voodoo','voodoo',7200,'muscle'), + ('Blista','blista',8000,'compacts'), + ('Brioso R/A','brioso',18000,'compacts'), + ('Issi','issi2',10000,'compacts'), + ('Panto','panto',10000,'compacts'), + ('Prairie','prairie',12000,'compacts'), + ('Bison','bison',45000,'vans'), + ('Bobcat XL','bobcatxl',32000,'vans'), + ('Burrito','burrito3',19000,'vans'), + ('Burrito','gburrito2',29000,'vans'), + ('Camper','camper',42000,'vans'), + ('Gang Burrito','gburrito',45000,'vans'), + ('Journey','journey',6500,'vans'), + ('Minivan','minivan',13000,'vans'), + ('Moonbeam','moonbeam',18000,'vans'), + ('Moonbeam Rider','moonbeam2',35000,'vans'), + ('Paradise','paradise',19000,'vans'), + ('Rumpo','rumpo',15000,'vans'), + ('Rumpo Trail','rumpo3',19500,'vans'), + ('Surfer','surfer',12000,'vans'), + ('Youga','youga',10800,'vans'), + ('Youga Luxuary','youga2',14500,'vans'), + ('Asea','asea',5500,'sedans'), + ('Cognoscenti','cognoscenti',55000,'sedans'), + ('Emperor','emperor',8500,'sedans'), + ('Fugitive','fugitive',12000,'sedans'), + ('Glendale','glendale',6500,'sedans'), + ('Intruder','intruder',7500,'sedans'), + ('Premier','premier',8000,'sedans'), + ('Primo Custom','primo2',14000,'sedans'), + ('Regina','regina',5000,'sedans'), + ('Schafter','schafter2',25000,'sedans'), + ('Stretch','stretch',90000,'sedans'), + ('Super Diamond','superd',130000,'sedans'), + ('Tailgater','tailgater',30000,'sedans'), + ('Warrener','warrener',4000,'sedans'), + ('Washington','washington',9000,'sedans'), + ('Baller','baller2',40000,'suvs'), + ('Baller Sport','baller3',60000,'suvs'), + ('Cavalcade','cavalcade2',55000,'suvs'), + ('Contender','contender',70000,'suvs'), + ('Dubsta','dubsta',45000,'suvs'), + ('Dubsta Luxuary','dubsta2',60000,'suvs'), + ('Fhantom','fq2',17000,'suvs'), + ('Grabger','granger',50000,'suvs'), + ('Gresley','gresley',47500,'suvs'), + ('Huntley S','huntley',40000,'suvs'), + ('Landstalker','landstalker',35000,'suvs'), + ('Mesa','mesa',16000,'suvs'), + ('Mesa Trail','mesa3',40000,'suvs'), + ('Patriot','patriot',55000,'suvs'), + ('Radius','radi',29000,'suvs'), + ('Rocoto','rocoto',45000,'suvs'), + ('Seminole','seminole',25000,'suvs'), + ('XLS','xls',32000,'suvs'), + ('Btype','btype',62000,'sportsclassics'), + ('Btype Luxe','btype3',85000,'sportsclassics'), + ('Btype Hotroad','btype2',155000,'sportsclassics'), + ('Casco','casco',30000,'sportsclassics'), + ('Coquette Classic','coquette2',40000,'sportsclassics'), + ('Manana','manana',12800,'sportsclassics'), + ('Monroe','monroe',55000,'sportsclassics'), + ('Pigalle','pigalle',20000,'sportsclassics'), + ('Stinger','stinger',80000,'sportsclassics'), + ('Stinger GT','stingergt',75000,'sportsclassics'), + ('Stirling GT','feltzer3',65000,'sportsclassics'), + ('Z-Type','ztype',220000,'sportsclassics'), + ('Bifta','bifta',12000,'offroad'), + ('Bf Injection','bfinjection',16000,'offroad'), + ('Blazer','blazer',6500,'offroad'), + ('Blazer Sport','blazer4',8500,'offroad'), + ('Brawler','brawler',45000,'offroad'), + ('Bubsta 6x6','dubsta3',120000,'offroad'), + ('Dune Buggy','dune',8000,'offroad'), + ('Guardian','guardian',45000,'offroad'), + ('Rebel','rebel2',35000,'offroad'), + ('Sandking','sandking',55000,'offroad'), + ('The Liberator','monster',210000,'offroad'), + ('Trophy Truck','trophytruck',60000,'offroad'), + ('Trophy Truck Limited','trophytruck2',80000,'offroad'), + ('Cognoscenti Cabrio','cogcabrio',55000,'coupes'), + ('Exemplar','exemplar',32000,'coupes'), + ('F620','f620',40000,'coupes'), + ('Felon','felon',42000,'coupes'), + ('Felon GT','felon2',55000,'coupes'), + ('Jackal','jackal',38000,'coupes'), + ('Oracle XS','oracle2',35000,'coupes'), + ('Sentinel','sentinel',32000,'coupes'), + ('Sentinel XS','sentinel2',40000,'coupes'), + ('Windsor','windsor',95000,'coupes'), + ('Windsor Drop','windsor2',125000,'coupes'), + ('Zion','zion',36000,'coupes'), + ('Zion Cabrio','zion2',45000,'coupes'), + ('9F','ninef',65000,'sports'), + ('9F Cabrio','ninef2',80000,'sports'), + ('Alpha','alpha',60000,'sports'), + ('Banshee','banshee',70000,'sports'), + ('Bestia GTS','bestiagts',55000,'sports'), + ('Buffalo','buffalo',12000,'sports'), + ('Buffalo S','buffalo2',20000,'sports'), + ('Carbonizzare','carbonizzare',75000,'sports'), + ('Comet','comet2',65000,'sports'), + ('Coquette','coquette',65000,'sports'), + ('Drift Tampa','tampa2',80000,'sports'), + ('Elegy','elegy2',38500,'sports'), + ('Feltzer','feltzer2',55000,'sports'), + ('Furore GT','furoregt',45000,'sports'), + ('Fusilade','fusilade',40000,'sports'), + ('Jester','jester',65000,'sports'), + ('Jester(Racecar)','jester2',135000,'sports'), + ('Khamelion','khamelion',38000,'sports'), + ('Kuruma','kuruma',30000,'sports'), + ('Lynx','lynx',40000,'sports'), + ('Mamba','mamba',70000,'sports'), + ('Massacro','massacro',65000,'sports'), + ('Massacro(Racecar)','massacro2',130000,'sports'), + ('Omnis','omnis',35000,'sports'), + ('Penumbra','penumbra',28000,'sports'), + ('Rapid GT','rapidgt',35000,'sports'), + ('Rapid GT Convertible','rapidgt2',45000,'sports'), + ('Schafter V12','schafter3',50000,'sports'), + ('Seven 70','seven70',39500,'sports'), + ('Sultan','sultan',15000,'sports'), + ('Surano','surano',50000,'sports'), + ('Tropos','tropos',40000,'sports'), + ('Verlierer','verlierer2',70000,'sports'), + ('Adder','adder',900000,'super'), + ('Banshee 900R','banshee2',255000,'super'), + ('Bullet','bullet',90000,'super'), + ('Cheetah','cheetah',375000,'super'), + ('Entity XF','entityxf',425000,'super'), + ('ETR1','sheava',220000,'super'), + ('FMJ','fmj',185000,'super'), + ('Infernus','infernus',180000,'super'), + ('Osiris','osiris',160000,'super'), + ('Pfister','pfister811',85000,'super'), + ('RE-7B','le7b',325000,'super'), + ('Reaper','reaper',150000,'super'), + ('Sultan RS','sultanrs',65000,'super'), + ('T20','t20',300000,'super'), + ('Turismo R','turismor',350000,'super'), + ('Tyrus','tyrus',600000,'super'), + ('Vacca','vacca',120000,'super'), + ('Voltic','voltic',90000,'super'), + ('X80 Proto','prototipo',2500000,'super'), + ('Zentorno','zentorno',1500000,'super'), + ('Akuma','AKUMA',7500,'motorcycles'), + ('Avarus','avarus',18000,'motorcycles'), + ('Bagger','bagger',13500,'motorcycles'), + ('Bati 801','bati',12000,'motorcycles'), + ('Bati 801RR','bati2',19000,'motorcycles'), + ('BF400','bf400',6500,'motorcycles'), + ('BMX (velo)','bmx',160,'motorcycles'), + ('Carbon RS','carbonrs',18000,'motorcycles'), + ('Chimera','chimera',38000,'motorcycles'), + ('Cliffhanger','cliffhanger',9500,'motorcycles'), + ('Cruiser (velo)','cruiser',510,'motorcycles'), + ('Daemon','daemon',11500,'motorcycles'), + ('Daemon High','daemon2',13500,'motorcycles'), + ('Defiler','defiler',9800,'motorcycles'), + ('Double T','double',28000,'motorcycles'), + ('Enduro','enduro',5500,'motorcycles'), + ('Esskey','esskey',4200,'motorcycles'), + ('Faggio','faggio',1900,'motorcycles'), + ('Vespa','faggio2',2800,'motorcycles'), + ('Fixter (velo)','fixter',225,'motorcycles'), + ('Gargoyle','gargoyle',16500,'motorcycles'), + ('Hakuchou','hakuchou',31000,'motorcycles'), + ('Hakuchou Sport','hakuchou2',55000,'motorcycles'), + ('Hexer','hexer',12000,'motorcycles'), + ('Innovation','innovation',23500,'motorcycles'), + ('Manchez','manchez',5300,'motorcycles'), + ('Nemesis','nemesis',5800,'motorcycles'), + ('Nightblade','nightblade',35000,'motorcycles'), + ('PCJ-600','pcj',6200,'motorcycles'), + ('Ruffian','ruffian',6800,'motorcycles'), + ('Sanchez','sanchez',5300,'motorcycles'), + ('Sanchez Sport','sanchez2',5300,'motorcycles'), + ('Sanctus','sanctus',25000,'motorcycles'), + ('Scorcher (velo)','scorcher',280,'motorcycles'), + ('Sovereign','sovereign',22000,'motorcycles'), + ('Shotaro Concept','shotaro',320000,'motorcycles'), + ('Thrust','thrust',24000,'motorcycles'), + ('Tri bike (velo)','tribike3',520,'motorcycles'), + ('Vader','vader',7200,'motorcycles'), + ('Vortex','vortex',9800,'motorcycles'), + ('Woflsbane','wolfsbane',9000,'motorcycles'), + ('Zombie','zombiea',9500,'motorcycles'), + ('Zombie Luxuary','zombieb',12000,'motorcycles'), + ('blazer5', 'blazer5', 1755600, 'offroad'), + ('Ruiner 2', 'ruiner2', 5745600, 'muscle'), + ('Voltic 2', 'voltic2', 3830400, 'super'), + ('Ardent', 'ardent', 1150000, 'sportsclassics'), + ('Oppressor', 'oppressor', 3524500, 'super'), + ('Visione', 'visione', 2250000, 'super'), + ('Retinue', 'retinue', 615000, 'sportsclassics'), + ('Cyclone', 'cyclone', 1890000, 'super'), + ('Rapid GT3', 'rapidgt3', 885000, 'sportsclassics'), + ('raiden', 'raiden', 1375000, 'sports'), + ('Yosemite', 'yosemite', 485000, 'muscle'), + ('Deluxo', 'deluxo', 4721500, 'sportsclassics'), + ('Pariah', 'pariah', 1420000, 'sports'), + ('Stromberg', 'stromberg', 3185350, 'sports'), + ('SC 1', 'sc1', 1603000, 'super'), + ('riata', 'riata', 380000, 'offroad'), + ('Hermes', 'hermes', 535000, 'muscle'), + ('Savestra', 'savestra', 990000, 'sportsclassics'), + ('Streiter', 'streiter', 500000, 'sports'), + ('Kamacho', 'kamacho', 345000, 'offroad'), + ('GT 500', 'gt500', 785000, 'sportsclassics'), + ('Z190', 'z190', 900000, 'sportsclassics'), + ('Viseris', 'viseris', 875000, 'sportsclassics'), + ('Autarch', 'autarch', 1955000, 'super'), + ('Comet 5', 'comet5', 1145000, 'sports'), + ('Neon', 'neon', 1500000, 'sports'), + ('Revolter', 'revolter', 1610000, 'sports'), + ('Sentinel3', 'sentinel3', 650000, 'sports'), + ('Hustler', 'hustler', 625000, 'muscle') +; diff --git a/_resources/esx_vehicleshop/localization/de_esx_vehicleshop.sql b/_resources/esx_vehicleshop/localization/de_esx_vehicleshop.sql new file mode 100644 index 00000000..f53fece4 --- /dev/null +++ b/_resources/esx_vehicleshop/localization/de_esx_vehicleshop.sql @@ -0,0 +1,333 @@ +USE `es_extended`; + +INSERT INTO `addon_account` (name, label, shared) VALUES + ('society_cardealer','Händler',1) +; + +INSERT INTO `addon_inventory` (name, label, shared) VALUES + ('society_cardealer','Händler',1) +; + +INSERT INTO `jobs` (name, label) VALUES + ('cardealer','Händler') +; + +INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES + ('cardealer',0,'recruit','Neuling',10,'{}','{}'), + ('cardealer',1,'novice','Verkäufer',25,'{}','{}'), + ('cardealer',2,'experienced','Verkaufsleiter',40,'{}','{}'), + ('cardealer',3,'boss','Boss',0,'{}','{}') +; + +CREATE TABLE `cardealer_vehicles` ( + `id` int NOT NULL AUTO_INCREMENT, + `vehicle` varchar(255) NOT NULL, + `price` int NOT NULL, + + PRIMARY KEY (`id`) +); + +CREATE TABLE `vehicle_sold` ( + `client` VARCHAR(50) NOT NULL, + `model` VARCHAR(50) NOT NULL, + `plate` VARCHAR(50) NOT NULL, + `soldby` VARCHAR(50) NOT NULL, + `date` VARCHAR(50) NOT NULL, + + PRIMARY KEY (`plate`) +); + +CREATE TABLE `owned_vehicles` ( + `owner` varchar(40) NOT NULL, + `plate` varchar(12) NOT NULL, + `vehicle` longtext, + `type` VARCHAR(20) NOT NULL DEFAULT 'car', + `job` VARCHAR(20) NULL DEFAULT NULL, + `stored` TINYINT NOT NULL DEFAULT '0', + + PRIMARY KEY (`plate`) +); + +CREATE TABLE `rented_vehicles` ( + `vehicle` varchar(60) NOT NULL, + `plate` varchar(12) NOT NULL, + `player_name` varchar(255) NOT NULL, + `base_price` int NOT NULL, + `rent_price` int NOT NULL, + `owner` varchar(22) NOT NULL, + + PRIMARY KEY (`plate`) +); + +CREATE TABLE `vehicle_categories` ( + `name` varchar(60) NOT NULL, + `label` varchar(60) NOT NULL, + + PRIMARY KEY (`name`) +); + +INSERT INTO `vehicle_categories` (name, label) VALUES + ('compacts','Compacts'), + ('coupes','Coupés'), + ('sedans','Sedans'), + ('sports','Sports'), + ('sportsclassics','Sports Classics'), + ('super','Super'), + ('muscle','Muscle'), + ('offroad','Off Road'), + ('suvs','SUVs'), + ('vans','Vans'), + ('motorcycles','Motos') +; + +CREATE TABLE `vehicles` ( + `name` varchar(60) NOT NULL, + `model` varchar(60) NOT NULL, + `price` int NOT NULL, + `category` varchar(60) DEFAULT NULL, + + PRIMARY KEY (`model`) +); + +INSERT INTO `vehicles` (name, model, price, category) VALUES + ('Blade','blade',15000,'muscle'), + ('Buccaneer','buccaneer',18000,'muscle'), + ('Buccaneer Rider','buccaneer2',24000,'muscle'), + ('Chino','chino',15000,'muscle'), + ('Chino Luxe','chino2',19000,'muscle'), + ('Coquette BlackFin','coquette3',55000,'muscle'), + ('Dominator','dominator',35000,'muscle'), + ('Dukes','dukes',28000,'muscle'), + ('Gauntlet','gauntlet',30000,'muscle'), + ('Hotknife','hotknife',125000,'muscle'), + ('Faction','faction',20000,'muscle'), + ('Faction Rider','faction2',30000,'muscle'), + ('Faction XL','faction3',40000,'muscle'), + ('Nightshade','nightshade',65000,'muscle'), + ('Phoenix','phoenix',12500,'muscle'), + ('Picador','picador',18000,'muscle'), + ('Sabre Turbo','sabregt',20000,'muscle'), + ('Sabre GT','sabregt2',25000,'muscle'), + ('Slam Van','slamvan3',11500,'muscle'), + ('Tampa','tampa',16000,'muscle'), + ('Virgo','virgo',14000,'muscle'), + ('Vigero','vigero',12500,'muscle'), + ('Voodoo','voodoo',7200,'muscle'), + ('Blista','blista',8000,'compacts'), + ('Brioso R/A','brioso',18000,'compacts'), + ('Issi','issi2',10000,'compacts'), + ('Panto','panto',10000,'compacts'), + ('Prairie','prairie',12000,'compacts'), + ('Bison','bison',45000,'vans'), + ('Bobcat XL','bobcatxl',32000,'vans'), + ('Burrito','burrito3',19000,'vans'), + ('Burrito','gburrito2',29000,'vans'), + ('Camper','camper',42000,'vans'), + ('Gang Burrito','gburrito',45000,'vans'), + ('Journey','journey',6500,'vans'), + ('Minivan','minivan',13000,'vans'), + ('Moonbeam','moonbeam',18000,'vans'), + ('Moonbeam Rider','moonbeam2',35000,'vans'), + ('Paradise','paradise',19000,'vans'), + ('Rumpo','rumpo',15000,'vans'), + ('Rumpo Trail','rumpo3',19500,'vans'), + ('Surfer','surfer',12000,'vans'), + ('Youga','youga',10800,'vans'), + ('Youga Luxuary','youga2',14500,'vans'), + ('Asea','asea',5500,'sedans'), + ('Cognoscenti','cognoscenti',55000,'sedans'), + ('Emperor','emperor',8500,'sedans'), + ('Fugitive','fugitive',12000,'sedans'), + ('Glendale','glendale',6500,'sedans'), + ('Intruder','intruder',7500,'sedans'), + ('Premier','premier',8000,'sedans'), + ('Primo Custom','primo2',14000,'sedans'), + ('Regina','regina',5000,'sedans'), + ('Schafter','schafter2',25000,'sedans'), + ('Stretch','stretch',90000,'sedans'), + ('Super Diamond','superd',130000,'sedans'), + ('Tailgater','tailgater',30000,'sedans'), + ('Warrener','warrener',4000,'sedans'), + ('Washington','washington',9000,'sedans'), + ('Baller','baller2',40000,'suvs'), + ('Baller Sport','baller3',60000,'suvs'), + ('Cavalcade','cavalcade2',55000,'suvs'), + ('Contender','contender',70000,'suvs'), + ('Dubsta','dubsta',45000,'suvs'), + ('Dubsta Luxuary','dubsta2',60000,'suvs'), + ('Fhantom','fq2',17000,'suvs'), + ('Grabger','granger',50000,'suvs'), + ('Gresley','gresley',47500,'suvs'), + ('Huntley S','huntley',40000,'suvs'), + ('Landstalker','landstalker',35000,'suvs'), + ('Mesa','mesa',16000,'suvs'), + ('Mesa Trail','mesa3',40000,'suvs'), + ('Patriot','patriot',55000,'suvs'), + ('Radius','radi',29000,'suvs'), + ('Rocoto','rocoto',45000,'suvs'), + ('Seminole','seminole',25000,'suvs'), + ('XLS','xls',32000,'suvs'), + ('Btype','btype',62000,'sportsclassics'), + ('Btype Luxe','btype3',85000,'sportsclassics'), + ('Btype Hotroad','btype2',155000,'sportsclassics'), + ('Casco','casco',30000,'sportsclassics'), + ('Coquette Classic','coquette2',40000,'sportsclassics'), + ('Manana','manana',12800,'sportsclassics'), + ('Monroe','monroe',55000,'sportsclassics'), + ('Pigalle','pigalle',20000,'sportsclassics'), + ('Stinger','stinger',80000,'sportsclassics'), + ('Stinger GT','stingergt',75000,'sportsclassics'), + ('Stirling GT','feltzer3',65000,'sportsclassics'), + ('Z-Type','ztype',220000,'sportsclassics'), + ('Bifta','bifta',12000,'offroad'), + ('Bf Injection','bfinjection',16000,'offroad'), + ('Blazer','blazer',6500,'offroad'), + ('Blazer Sport','blazer4',8500,'offroad'), + ('Brawler','brawler',45000,'offroad'), + ('Bubsta 6x6','dubsta3',120000,'offroad'), + ('Dune Buggy','dune',8000,'offroad'), + ('Guardian','guardian',45000,'offroad'), + ('Rebel','rebel2',35000,'offroad'), + ('Sandking','sandking',55000,'offroad'), + ('The Liberator','monster',210000,'offroad'), + ('Trophy Truck','trophytruck',60000,'offroad'), + ('Trophy Truck Limited','trophytruck2',80000,'offroad'), + ('Cognoscenti Cabrio','cogcabrio',55000,'coupes'), + ('Exemplar','exemplar',32000,'coupes'), + ('F620','f620',40000,'coupes'), + ('Felon','felon',42000,'coupes'), + ('Felon GT','felon2',55000,'coupes'), + ('Jackal','jackal',38000,'coupes'), + ('Oracle XS','oracle2',35000,'coupes'), + ('Sentinel','sentinel',32000,'coupes'), + ('Sentinel XS','sentinel2',40000,'coupes'), + ('Windsor','windsor',95000,'coupes'), + ('Windsor Drop','windsor2',125000,'coupes'), + ('Zion','zion',36000,'coupes'), + ('Zion Cabrio','zion2',45000,'coupes'), + ('9F','ninef',65000,'sports'), + ('9F Cabrio','ninef2',80000,'sports'), + ('Alpha','alpha',60000,'sports'), + ('Banshee','banshee',70000,'sports'), + ('Bestia GTS','bestiagts',55000,'sports'), + ('Buffalo','buffalo',12000,'sports'), + ('Buffalo S','buffalo2',20000,'sports'), + ('Carbonizzare','carbonizzare',75000,'sports'), + ('Comet','comet2',65000,'sports'), + ('Coquette','coquette',65000,'sports'), + ('Drift Tampa','tampa2',80000,'sports'), + ('Elegy','elegy2',38500,'sports'), + ('Feltzer','feltzer2',55000,'sports'), + ('Furore GT','furoregt',45000,'sports'), + ('Fusilade','fusilade',40000,'sports'), + ('Jester','jester',65000,'sports'), + ('Jester(Racecar)','jester2',135000,'sports'), + ('Khamelion','khamelion',38000,'sports'), + ('Kuruma','kuruma',30000,'sports'), + ('Lynx','lynx',40000,'sports'), + ('Mamba','mamba',70000,'sports'), + ('Massacro','massacro',65000,'sports'), + ('Massacro(Racecar)','massacro2',130000,'sports'), + ('Omnis','omnis',35000,'sports'), + ('Penumbra','penumbra',28000,'sports'), + ('Rapid GT','rapidgt',35000,'sports'), + ('Rapid GT Convertible','rapidgt2',45000,'sports'), + ('Schafter V12','schafter3',50000,'sports'), + ('Seven 70','seven70',39500,'sports'), + ('Sultan','sultan',15000,'sports'), + ('Surano','surano',50000,'sports'), + ('Tropos','tropos',40000,'sports'), + ('Verlierer','verlierer2',70000,'sports'), + ('Adder','adder',900000,'super'), + ('Banshee 900R','banshee2',255000,'super'), + ('Bullet','bullet',90000,'super'), + ('Cheetah','cheetah',375000,'super'), + ('Entity XF','entityxf',425000,'super'), + ('ETR1','sheava',220000,'super'), + ('FMJ','fmj',185000,'super'), + ('Infernus','infernus',180000,'super'), + ('Osiris','osiris',160000,'super'), + ('Pfister','pfister811',85000,'super'), + ('RE-7B','le7b',325000,'super'), + ('Reaper','reaper',150000,'super'), + ('Sultan RS','sultanrs',65000,'super'), + ('T20','t20',300000,'super'), + ('Turismo R','turismor',350000,'super'), + ('Tyrus','tyrus',600000,'super'), + ('Vacca','vacca',120000,'super'), + ('Voltic','voltic',90000,'super'), + ('X80 Proto','prototipo',2500000,'super'), + ('Zentorno','zentorno',1500000,'super'), + ('Akuma','AKUMA',7500,'motorcycles'), + ('Avarus','avarus',18000,'motorcycles'), + ('Bagger','bagger',13500,'motorcycles'), + ('Bati 801','bati',12000,'motorcycles'), + ('Bati 801RR','bati2',19000,'motorcycles'), + ('BF400','bf400',6500,'motorcycles'), + ('BMX (velo)','bmx',160,'motorcycles'), + ('Carbon RS','carbonrs',18000,'motorcycles'), + ('Chimera','chimera',38000,'motorcycles'), + ('Cliffhanger','cliffhanger',9500,'motorcycles'), + ('Cruiser (velo)','cruiser',510,'motorcycles'), + ('Daemon','daemon',11500,'motorcycles'), + ('Daemon High','daemon2',13500,'motorcycles'), + ('Defiler','defiler',9800,'motorcycles'), + ('Double T','double',28000,'motorcycles'), + ('Enduro','enduro',5500,'motorcycles'), + ('Esskey','esskey',4200,'motorcycles'), + ('Faggio','faggio',1900,'motorcycles'), + ('Vespa','faggio2',2800,'motorcycles'), + ('Fixter (velo)','fixter',225,'motorcycles'), + ('Gargoyle','gargoyle',16500,'motorcycles'), + ('Hakuchou','hakuchou',31000,'motorcycles'), + ('Hakuchou Sport','hakuchou2',55000,'motorcycles'), + ('Hexer','hexer',12000,'motorcycles'), + ('Innovation','innovation',23500,'motorcycles'), + ('Manchez','manchez',5300,'motorcycles'), + ('Nemesis','nemesis',5800,'motorcycles'), + ('Nightblade','nightblade',35000,'motorcycles'), + ('PCJ-600','pcj',6200,'motorcycles'), + ('Ruffian','ruffian',6800,'motorcycles'), + ('Sanchez','sanchez',5300,'motorcycles'), + ('Sanchez Sport','sanchez2',5300,'motorcycles'), + ('Sanctus','sanctus',25000,'motorcycles'), + ('Scorcher (velo)','scorcher',280,'motorcycles'), + ('Sovereign','sovereign',22000,'motorcycles'), + ('Shotaro Concept','shotaro',320000,'motorcycles'), + ('Thrust','thrust',24000,'motorcycles'), + ('Tri bike (velo)','tribike3',520,'motorcycles'), + ('Vader','vader',7200,'motorcycles'), + ('Vortex','vortex',9800,'motorcycles'), + ('Woflsbane','wolfsbane',9000,'motorcycles'), + ('Zombie','zombiea',9500,'motorcycles'), + ('Zombie Luxuary','zombieb',12000,'motorcycles'), + ('blazer5', 'blazer5', 1755600, 'offroad'), + ('Ruiner 2', 'ruiner2', 5745600, 'muscle'), + ('Voltic 2', 'voltic2', 3830400, 'super'), + ('Ardent', 'ardent', 1150000, 'sportsclassics'), + ('Oppressor', 'oppressor', 3524500, 'super'), + ('Visione', 'visione', 2250000, 'super'), + ('Retinue', 'retinue', 615000, 'sportsclassics'), + ('Cyclone', 'cyclone', 1890000, 'super'), + ('Rapid GT3', 'rapidgt3', 885000, 'sportsclassics'), + ('raiden', 'raiden', 1375000, 'sports'), + ('Yosemite', 'yosemite', 485000, 'muscle'), + ('Deluxo', 'deluxo', 4721500, 'sportsclassics'), + ('Pariah', 'pariah', 1420000, 'sports'), + ('Stromberg', 'stromberg', 3185350, 'sports'), + ('SC 1', 'sc1', 1603000, 'super'), + ('riata', 'riata', 380000, 'offroad'), + ('Hermes', 'hermes', 535000, 'muscle'), + ('Savestra', 'savestra', 990000, 'sportsclassics'), + ('Streiter', 'streiter', 500000, 'sports'), + ('Kamacho', 'kamacho', 345000, 'offroad'), + ('GT 500', 'gt500', 785000, 'sportsclassics'), + ('Z190', 'z190', 900000, 'sportsclassics'), + ('Viseris', 'viseris', 875000, 'sportsclassics'), + ('Autarch', 'autarch', 1955000, 'super'), + ('Comet 5', 'comet5', 1145000, 'sports'), + ('Neon', 'neon', 1500000, 'sports'), + ('Revolter', 'revolter', 1610000, 'sports'), + ('Sentinel3', 'sentinel3', 650000, 'sports'), + ('Hustler', 'hustler', 625000, 'muscle') +; diff --git a/_resources/esx_vehicleshop/localization/en_esx_vehicleshop.sql b/_resources/esx_vehicleshop/localization/en_esx_vehicleshop.sql new file mode 100644 index 00000000..c06bb956 --- /dev/null +++ b/_resources/esx_vehicleshop/localization/en_esx_vehicleshop.sql @@ -0,0 +1,333 @@ +USE `es_extended`; + +INSERT INTO `addon_account` (name, label, shared) VALUES + ('society_cardealer','Cardealer',1) +; + +INSERT INTO `addon_inventory` (name, label, shared) VALUES + ('society_cardealer','Cardealer',1) +; + +INSERT INTO `jobs` (name, label) VALUES + ('cardealer','Cardealer') +; + +INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES + ('cardealer',0,'recruit','Recruit',10,'{}','{}'), + ('cardealer',1,'novice','Novice',25,'{}','{}'), + ('cardealer',2,'experienced','Experienced',40,'{}','{}'), + ('cardealer',3,'boss','Boss',0,'{}','{}') +; + +CREATE TABLE `cardealer_vehicles` ( + `id` int NOT NULL AUTO_INCREMENT, + `vehicle` varchar(255) NOT NULL, + `price` int NOT NULL, + + PRIMARY KEY (`id`) +); + +CREATE TABLE `vehicle_sold` ( + `client` VARCHAR(50) NOT NULL, + `model` VARCHAR(50) NOT NULL, + `plate` VARCHAR(50) NOT NULL, + `soldby` VARCHAR(50) NOT NULL, + `date` VARCHAR(50) NOT NULL, + + PRIMARY KEY (`plate`) +); + +CREATE TABLE `owned_vehicles` ( + `owner` varchar(40) NOT NULL, + `plate` varchar(12) NOT NULL, + `vehicle` longtext, + `type` VARCHAR(20) NOT NULL DEFAULT 'car', + `job` VARCHAR(20) NULL DEFAULT NULL, + `stored` TINYINT NOT NULL DEFAULT '0', + + PRIMARY KEY (`plate`) +); + +CREATE TABLE `rented_vehicles` ( + `vehicle` varchar(60) NOT NULL, + `plate` varchar(12) NOT NULL, + `player_name` varchar(255) NOT NULL, + `base_price` int NOT NULL, + `rent_price` int NOT NULL, + `owner` varchar(22) NOT NULL, + + PRIMARY KEY (`plate`) +); + +CREATE TABLE `vehicle_categories` ( + `name` varchar(60) NOT NULL, + `label` varchar(60) NOT NULL, + + PRIMARY KEY (`name`) +); + +INSERT INTO `vehicle_categories` (name, label) VALUES + ('compacts','Compacts'), + ('coupes','Coupes'), + ('sedans','Sedans'), + ('sports','Sports'), + ('sportsclassics','Sports Classics'), + ('super','Super'), + ('muscle','Muscle'), + ('offroad','Off Road'), + ('suvs','SUVs'), + ('vans','Vans'), + ('motorcycles','Motos') +; + +CREATE TABLE `vehicles` ( + `name` varchar(60) NOT NULL, + `model` varchar(60) NOT NULL, + `price` int NOT NULL, + `category` varchar(60) DEFAULT NULL, + + PRIMARY KEY (`model`) +); + +INSERT INTO `vehicles` (name, model, price, category) VALUES + ('Blade','blade',15000,'muscle'), + ('Buccaneer','buccaneer',18000,'muscle'), + ('Buccaneer Rider','buccaneer2',24000,'muscle'), + ('Chino','chino',15000,'muscle'), + ('Chino Luxe','chino2',19000,'muscle'), + ('Coquette BlackFin','coquette3',55000,'muscle'), + ('Dominator','dominator',35000,'muscle'), + ('Dukes','dukes',28000,'muscle'), + ('Gauntlet','gauntlet',30000,'muscle'), + ('Hotknife','hotknife',125000,'muscle'), + ('Faction','faction',20000,'muscle'), + ('Faction Rider','faction2',30000,'muscle'), + ('Faction XL','faction3',40000,'muscle'), + ('Nightshade','nightshade',65000,'muscle'), + ('Phoenix','phoenix',12500,'muscle'), + ('Picador','picador',18000,'muscle'), + ('Sabre Turbo','sabregt',20000,'muscle'), + ('Sabre GT','sabregt2',25000,'muscle'), + ('Slam Van','slamvan3',11500,'muscle'), + ('Tampa','tampa',16000,'muscle'), + ('Virgo','virgo',14000,'muscle'), + ('Vigero','vigero',12500,'muscle'), + ('Voodoo','voodoo',7200,'muscle'), + ('Blista','blista',8000,'compacts'), + ('Brioso R/A','brioso',18000,'compacts'), + ('Issi','issi2',10000,'compacts'), + ('Panto','panto',10000,'compacts'), + ('Prairie','prairie',12000,'compacts'), + ('Bison','bison',45000,'vans'), + ('Bobcat XL','bobcatxl',32000,'vans'), + ('Burrito','burrito3',19000,'vans'), + ('Burrito','gburrito2',29000,'vans'), + ('Camper','camper',42000,'vans'), + ('Gang Burrito','gburrito',45000,'vans'), + ('Journey','journey',6500,'vans'), + ('Minivan','minivan',13000,'vans'), + ('Moonbeam','moonbeam',18000,'vans'), + ('Moonbeam Rider','moonbeam2',35000,'vans'), + ('Paradise','paradise',19000,'vans'), + ('Rumpo','rumpo',15000,'vans'), + ('Rumpo Trail','rumpo3',19500,'vans'), + ('Surfer','surfer',12000,'vans'), + ('Youga','youga',10800,'vans'), + ('Youga Luxuary','youga2',14500,'vans'), + ('Asea','asea',5500,'sedans'), + ('Cognoscenti','cognoscenti',55000,'sedans'), + ('Emperor','emperor',8500,'sedans'), + ('Fugitive','fugitive',12000,'sedans'), + ('Glendale','glendale',6500,'sedans'), + ('Intruder','intruder',7500,'sedans'), + ('Premier','premier',8000,'sedans'), + ('Primo Custom','primo2',14000,'sedans'), + ('Regina','regina',5000,'sedans'), + ('Schafter','schafter2',25000,'sedans'), + ('Stretch','stretch',90000,'sedans'), + ('Super Diamond','superd',130000,'sedans'), + ('Tailgater','tailgater',30000,'sedans'), + ('Warrener','warrener',4000,'sedans'), + ('Washington','washington',9000,'sedans'), + ('Baller','baller2',40000,'suvs'), + ('Baller Sport','baller3',60000,'suvs'), + ('Cavalcade','cavalcade2',55000,'suvs'), + ('Contender','contender',70000,'suvs'), + ('Dubsta','dubsta',45000,'suvs'), + ('Dubsta Luxuary','dubsta2',60000,'suvs'), + ('Fhantom','fq2',17000,'suvs'), + ('Grabger','granger',50000,'suvs'), + ('Gresley','gresley',47500,'suvs'), + ('Huntley S','huntley',40000,'suvs'), + ('Landstalker','landstalker',35000,'suvs'), + ('Mesa','mesa',16000,'suvs'), + ('Mesa Trail','mesa3',40000,'suvs'), + ('Patriot','patriot',55000,'suvs'), + ('Radius','radi',29000,'suvs'), + ('Rocoto','rocoto',45000,'suvs'), + ('Seminole','seminole',25000,'suvs'), + ('XLS','xls',32000,'suvs'), + ('Btype','btype',62000,'sportsclassics'), + ('Btype Luxe','btype3',85000,'sportsclassics'), + ('Btype Hotroad','btype2',155000,'sportsclassics'), + ('Casco','casco',30000,'sportsclassics'), + ('Coquette Classic','coquette2',40000,'sportsclassics'), + ('Manana','manana',12800,'sportsclassics'), + ('Monroe','monroe',55000,'sportsclassics'), + ('Pigalle','pigalle',20000,'sportsclassics'), + ('Stinger','stinger',80000,'sportsclassics'), + ('Stinger GT','stingergt',75000,'sportsclassics'), + ('Stirling GT','feltzer3',65000,'sportsclassics'), + ('Z-Type','ztype',220000,'sportsclassics'), + ('Bifta','bifta',12000,'offroad'), + ('Bf Injection','bfinjection',16000,'offroad'), + ('Blazer','blazer',6500,'offroad'), + ('Blazer Sport','blazer4',8500,'offroad'), + ('Brawler','brawler',45000,'offroad'), + ('Bubsta 6x6','dubsta3',120000,'offroad'), + ('Dune Buggy','dune',8000,'offroad'), + ('Guardian','guardian',45000,'offroad'), + ('Rebel','rebel2',35000,'offroad'), + ('Sandking','sandking',55000,'offroad'), + ('The Liberator','monster',210000,'offroad'), + ('Trophy Truck','trophytruck',60000,'offroad'), + ('Trophy Truck Limited','trophytruck2',80000,'offroad'), + ('Cognoscenti Cabrio','cogcabrio',55000,'coupes'), + ('Exemplar','exemplar',32000,'coupes'), + ('F620','f620',40000,'coupes'), + ('Felon','felon',42000,'coupes'), + ('Felon GT','felon2',55000,'coupes'), + ('Jackal','jackal',38000,'coupes'), + ('Oracle XS','oracle2',35000,'coupes'), + ('Sentinel','sentinel',32000,'coupes'), + ('Sentinel XS','sentinel2',40000,'coupes'), + ('Windsor','windsor',95000,'coupes'), + ('Windsor Drop','windsor2',125000,'coupes'), + ('Zion','zion',36000,'coupes'), + ('Zion Cabrio','zion2',45000,'coupes'), + ('9F','ninef',65000,'sports'), + ('9F Cabrio','ninef2',80000,'sports'), + ('Alpha','alpha',60000,'sports'), + ('Banshee','banshee',70000,'sports'), + ('Bestia GTS','bestiagts',55000,'sports'), + ('Buffalo','buffalo',12000,'sports'), + ('Buffalo S','buffalo2',20000,'sports'), + ('Carbonizzare','carbonizzare',75000,'sports'), + ('Comet','comet2',65000,'sports'), + ('Coquette','coquette',65000,'sports'), + ('Drift Tampa','tampa2',80000,'sports'), + ('Elegy','elegy2',38500,'sports'), + ('Feltzer','feltzer2',55000,'sports'), + ('Furore GT','furoregt',45000,'sports'), + ('Fusilade','fusilade',40000,'sports'), + ('Jester','jester',65000,'sports'), + ('Jester(Racecar)','jester2',135000,'sports'), + ('Khamelion','khamelion',38000,'sports'), + ('Kuruma','kuruma',30000,'sports'), + ('Lynx','lynx',40000,'sports'), + ('Mamba','mamba',70000,'sports'), + ('Massacro','massacro',65000,'sports'), + ('Massacro(Racecar)','massacro2',130000,'sports'), + ('Omnis','omnis',35000,'sports'), + ('Penumbra','penumbra',28000,'sports'), + ('Rapid GT','rapidgt',35000,'sports'), + ('Rapid GT Convertible','rapidgt2',45000,'sports'), + ('Schafter V12','schafter3',50000,'sports'), + ('Seven 70','seven70',39500,'sports'), + ('Sultan','sultan',15000,'sports'), + ('Surano','surano',50000,'sports'), + ('Tropos','tropos',40000,'sports'), + ('Verlierer','verlierer2',70000,'sports'), + ('Adder','adder',900000,'super'), + ('Banshee 900R','banshee2',255000,'super'), + ('Bullet','bullet',90000,'super'), + ('Cheetah','cheetah',375000,'super'), + ('Entity XF','entityxf',425000,'super'), + ('ETR1','sheava',220000,'super'), + ('FMJ','fmj',185000,'super'), + ('Infernus','infernus',180000,'super'), + ('Osiris','osiris',160000,'super'), + ('Pfister','pfister811',85000,'super'), + ('RE-7B','le7b',325000,'super'), + ('Reaper','reaper',150000,'super'), + ('Sultan RS','sultanrs',65000,'super'), + ('T20','t20',300000,'super'), + ('Turismo R','turismor',350000,'super'), + ('Tyrus','tyrus',600000,'super'), + ('Vacca','vacca',120000,'super'), + ('Voltic','voltic',90000,'super'), + ('X80 Proto','prototipo',2500000,'super'), + ('Zentorno','zentorno',1500000,'super'), + ('Akuma','AKUMA',7500,'motorcycles'), + ('Avarus','avarus',18000,'motorcycles'), + ('Bagger','bagger',13500,'motorcycles'), + ('Bati 801','bati',12000,'motorcycles'), + ('Bati 801RR','bati2',19000,'motorcycles'), + ('BF400','bf400',6500,'motorcycles'), + ('BMX (velo)','bmx',160,'motorcycles'), + ('Carbon RS','carbonrs',18000,'motorcycles'), + ('Chimera','chimera',38000,'motorcycles'), + ('Cliffhanger','cliffhanger',9500,'motorcycles'), + ('Cruiser (velo)','cruiser',510,'motorcycles'), + ('Daemon','daemon',11500,'motorcycles'), + ('Daemon High','daemon2',13500,'motorcycles'), + ('Defiler','defiler',9800,'motorcycles'), + ('Double T','double',28000,'motorcycles'), + ('Enduro','enduro',5500,'motorcycles'), + ('Esskey','esskey',4200,'motorcycles'), + ('Faggio','faggio',1900,'motorcycles'), + ('Vespa','faggio2',2800,'motorcycles'), + ('Fixter (velo)','fixter',225,'motorcycles'), + ('Gargoyle','gargoyle',16500,'motorcycles'), + ('Hakuchou','hakuchou',31000,'motorcycles'), + ('Hakuchou Sport','hakuchou2',55000,'motorcycles'), + ('Hexer','hexer',12000,'motorcycles'), + ('Innovation','innovation',23500,'motorcycles'), + ('Manchez','manchez',5300,'motorcycles'), + ('Nemesis','nemesis',5800,'motorcycles'), + ('Nightblade','nightblade',35000,'motorcycles'), + ('PCJ-600','pcj',6200,'motorcycles'), + ('Ruffian','ruffian',6800,'motorcycles'), + ('Sanchez','sanchez',5300,'motorcycles'), + ('Sanchez Sport','sanchez2',5300,'motorcycles'), + ('Sanctus','sanctus',25000,'motorcycles'), + ('Scorcher (velo)','scorcher',280,'motorcycles'), + ('Sovereign','sovereign',22000,'motorcycles'), + ('Shotaro Concept','shotaro',320000,'motorcycles'), + ('Thrust','thrust',24000,'motorcycles'), + ('Tri bike (velo)','tribike3',520,'motorcycles'), + ('Vader','vader',7200,'motorcycles'), + ('Vortex','vortex',9800,'motorcycles'), + ('Woflsbane','wolfsbane',9000,'motorcycles'), + ('Zombie','zombiea',9500,'motorcycles'), + ('Zombie Luxuary','zombieb',12000,'motorcycles'), + ('blazer5', 'blazer5', 1755600, 'offroad'), + ('Ruiner 2', 'ruiner2', 5745600, 'muscle'), + ('Voltic 2', 'voltic2', 3830400, 'super'), + ('Ardent', 'ardent', 1150000, 'sportsclassics'), + ('Oppressor', 'oppressor', 3524500, 'super'), + ('Visione', 'visione', 2250000, 'super'), + ('Retinue', 'retinue', 615000, 'sportsclassics'), + ('Cyclone', 'cyclone', 1890000, 'super'), + ('Rapid GT3', 'rapidgt3', 885000, 'sportsclassics'), + ('raiden', 'raiden', 1375000, 'sports'), + ('Yosemite', 'yosemite', 485000, 'muscle'), + ('Deluxo', 'deluxo', 4721500, 'sportsclassics'), + ('Pariah', 'pariah', 1420000, 'sports'), + ('Stromberg', 'stromberg', 3185350, 'sports'), + ('SC 1', 'sc1', 1603000, 'super'), + ('riata', 'riata', 380000, 'offroad'), + ('Hermes', 'hermes', 535000, 'muscle'), + ('Savestra', 'savestra', 990000, 'sportsclassics'), + ('Streiter', 'streiter', 500000, 'sports'), + ('Kamacho', 'kamacho', 345000, 'offroad'), + ('GT 500', 'gt500', 785000, 'sportsclassics'), + ('Z190', 'z190', 900000, 'sportsclassics'), + ('Viseris', 'viseris', 875000, 'sportsclassics'), + ('Autarch', 'autarch', 1955000, 'super'), + ('Comet 5', 'comet5', 1145000, 'sports'), + ('Neon', 'neon', 1500000, 'sports'), + ('Revolter', 'revolter', 1610000, 'sports'), + ('Sentinel3', 'sentinel3', 650000, 'sports'), + ('Hustler', 'hustler', 625000, 'muscle') +; diff --git a/_resources/esx_vehicleshop/localization/fi_esx_vehicleshop.sql b/_resources/esx_vehicleshop/localization/fi_esx_vehicleshop.sql new file mode 100644 index 00000000..0d6c5295 --- /dev/null +++ b/_resources/esx_vehicleshop/localization/fi_esx_vehicleshop.sql @@ -0,0 +1,333 @@ +USE `es_extended`; + +INSERT INTO `addon_account` (name, label, shared) VALUES + ('society_cardealer','Autokauppa',1) +; + +INSERT INTO `addon_inventory` (name, label, shared) VALUES + ('society_cardealer','Autokauppa',1) +; + +INSERT INTO `jobs` (name, label) VALUES + ('cardealer','Autokauppa') +; + +INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES + ('cardealer',0,'recruit','Harjoittelija',10,'{}','{}'), + ('cardealer',1,'novice','Aloittelija',25,'{}','{}'), + ('cardealer',2,'experienced','Kokenut',40,'{}','{}'), + ('cardealer',3,'boss','Pomo',0,'{}','{}') +; + +CREATE TABLE `cardealer_vehicles` ( + `id` int NOT NULL AUTO_INCREMENT, + `vehicle` varchar(255) NOT NULL, + `price` int NOT NULL, + + PRIMARY KEY (`id`) +); + +CREATE TABLE `vehicle_sold` ( + `client` VARCHAR(50) NOT NULL, + `model` VARCHAR(50) NOT NULL, + `plate` VARCHAR(50) NOT NULL, + `soldby` VARCHAR(50) NOT NULL, + `date` VARCHAR(50) NOT NULL, + + PRIMARY KEY (`plate`) +); + +CREATE TABLE `owned_vehicles` ( + `owner` varchar(40) NOT NULL, + `plate` varchar(12) NOT NULL, + `vehicle` longtext, + `type` VARCHAR(20) NOT NULL DEFAULT 'car', + `job` VARCHAR(20) NULL DEFAULT NULL, + `stored` TINYINT NOT NULL DEFAULT '0', + + PRIMARY KEY (`plate`) +); + +CREATE TABLE `rented_vehicles` ( + `vehicle` varchar(60) NOT NULL, + `plate` varchar(12) NOT NULL, + `player_name` varchar(255) NOT NULL, + `base_price` int NOT NULL, + `rent_price` int NOT NULL, + `owner` varchar(22) NOT NULL, + + PRIMARY KEY (`plate`) +); + +CREATE TABLE `vehicle_categories` ( + `name` varchar(60) NOT NULL, + `label` varchar(60) NOT NULL, + + PRIMARY KEY (`name`) +); + +INSERT INTO `vehicle_categories` (name, label) VALUES + ('compacts','Compacts'), + ('coupes','Coupés'), + ('sedans','Sedans'), + ('sports','Sports'), + ('sportsclassics','Sports Classics'), + ('super','Super'), + ('muscle','Muscle'), + ('offroad','Off Road'), + ('suvs','SUVs'), + ('vans','Vans'), + ('motorcycles','Motos') +; + +CREATE TABLE `vehicles` ( + `name` varchar(60) NOT NULL, + `model` varchar(60) NOT NULL, + `price` int NOT NULL, + `category` varchar(60) DEFAULT NULL, + + PRIMARY KEY (`model`) +); + +INSERT INTO `vehicles` (name, model, price, category) VALUES + ('Blade','blade',15000,'muscle'), + ('Buccaneer','buccaneer',18000,'muscle'), + ('Buccaneer Rider','buccaneer2',24000,'muscle'), + ('Chino','chino',15000,'muscle'), + ('Chino Luxe','chino2',19000,'muscle'), + ('Coquette BlackFin','coquette3',55000,'muscle'), + ('Dominator','dominator',35000,'muscle'), + ('Dukes','dukes',28000,'muscle'), + ('Gauntlet','gauntlet',30000,'muscle'), + ('Hotknife','hotknife',125000,'muscle'), + ('Faction','faction',20000,'muscle'), + ('Faction Rider','faction2',30000,'muscle'), + ('Faction XL','faction3',40000,'muscle'), + ('Nightshade','nightshade',65000,'muscle'), + ('Phoenix','phoenix',12500,'muscle'), + ('Picador','picador',18000,'muscle'), + ('Sabre Turbo','sabregt',20000,'muscle'), + ('Sabre GT','sabregt2',25000,'muscle'), + ('Slam Van','slamvan3',11500,'muscle'), + ('Tampa','tampa',16000,'muscle'), + ('Virgo','virgo',14000,'muscle'), + ('Vigero','vigero',12500,'muscle'), + ('Voodoo','voodoo',7200,'muscle'), + ('Blista','blista',8000,'compacts'), + ('Brioso R/A','brioso',18000,'compacts'), + ('Issi','issi2',10000,'compacts'), + ('Panto','panto',10000,'compacts'), + ('Prairie','prairie',12000,'compacts'), + ('Bison','bison',45000,'vans'), + ('Bobcat XL','bobcatxl',32000,'vans'), + ('Burrito','burrito3',19000,'vans'), + ('Burrito','gburrito2',29000,'vans'), + ('Camper','camper',42000,'vans'), + ('Gang Burrito','gburrito',45000,'vans'), + ('Journey','journey',6500,'vans'), + ('Minivan','minivan',13000,'vans'), + ('Moonbeam','moonbeam',18000,'vans'), + ('Moonbeam Rider','moonbeam2',35000,'vans'), + ('Paradise','paradise',19000,'vans'), + ('Rumpo','rumpo',15000,'vans'), + ('Rumpo Trail','rumpo3',19500,'vans'), + ('Surfer','surfer',12000,'vans'), + ('Youga','youga',10800,'vans'), + ('Youga Luxuary','youga2',14500,'vans'), + ('Asea','asea',5500,'sedans'), + ('Cognoscenti','cognoscenti',55000,'sedans'), + ('Emperor','emperor',8500,'sedans'), + ('Fugitive','fugitive',12000,'sedans'), + ('Glendale','glendale',6500,'sedans'), + ('Intruder','intruder',7500,'sedans'), + ('Premier','premier',8000,'sedans'), + ('Primo Custom','primo2',14000,'sedans'), + ('Regina','regina',5000,'sedans'), + ('Schafter','schafter2',25000,'sedans'), + ('Stretch','stretch',90000,'sedans'), + ('Super Diamond','superd',130000,'sedans'), + ('Tailgater','tailgater',30000,'sedans'), + ('Warrener','warrener',4000,'sedans'), + ('Washington','washington',9000,'sedans'), + ('Baller','baller2',40000,'suvs'), + ('Baller Sport','baller3',60000,'suvs'), + ('Cavalcade','cavalcade2',55000,'suvs'), + ('Contender','contender',70000,'suvs'), + ('Dubsta','dubsta',45000,'suvs'), + ('Dubsta Luxuary','dubsta2',60000,'suvs'), + ('Fhantom','fq2',17000,'suvs'), + ('Grabger','granger',50000,'suvs'), + ('Gresley','gresley',47500,'suvs'), + ('Huntley S','huntley',40000,'suvs'), + ('Landstalker','landstalker',35000,'suvs'), + ('Mesa','mesa',16000,'suvs'), + ('Mesa Trail','mesa3',40000,'suvs'), + ('Patriot','patriot',55000,'suvs'), + ('Radius','radi',29000,'suvs'), + ('Rocoto','rocoto',45000,'suvs'), + ('Seminole','seminole',25000,'suvs'), + ('XLS','xls',32000,'suvs'), + ('Btype','btype',62000,'sportsclassics'), + ('Btype Luxe','btype3',85000,'sportsclassics'), + ('Btype Hotroad','btype2',155000,'sportsclassics'), + ('Casco','casco',30000,'sportsclassics'), + ('Coquette Classic','coquette2',40000,'sportsclassics'), + ('Manana','manana',12800,'sportsclassics'), + ('Monroe','monroe',55000,'sportsclassics'), + ('Pigalle','pigalle',20000,'sportsclassics'), + ('Stinger','stinger',80000,'sportsclassics'), + ('Stinger GT','stingergt',75000,'sportsclassics'), + ('Stirling GT','feltzer3',65000,'sportsclassics'), + ('Z-Type','ztype',220000,'sportsclassics'), + ('Bifta','bifta',12000,'offroad'), + ('Bf Injection','bfinjection',16000,'offroad'), + ('Blazer','blazer',6500,'offroad'), + ('Blazer Sport','blazer4',8500,'offroad'), + ('Brawler','brawler',45000,'offroad'), + ('Bubsta 6x6','dubsta3',120000,'offroad'), + ('Dune Buggy','dune',8000,'offroad'), + ('Guardian','guardian',45000,'offroad'), + ('Rebel','rebel2',35000,'offroad'), + ('Sandking','sandking',55000,'offroad'), + ('The Liberator','monster',210000,'offroad'), + ('Trophy Truck','trophytruck',60000,'offroad'), + ('Trophy Truck Limited','trophytruck2',80000,'offroad'), + ('Cognoscenti Cabrio','cogcabrio',55000,'coupes'), + ('Exemplar','exemplar',32000,'coupes'), + ('F620','f620',40000,'coupes'), + ('Felon','felon',42000,'coupes'), + ('Felon GT','felon2',55000,'coupes'), + ('Jackal','jackal',38000,'coupes'), + ('Oracle XS','oracle2',35000,'coupes'), + ('Sentinel','sentinel',32000,'coupes'), + ('Sentinel XS','sentinel2',40000,'coupes'), + ('Windsor','windsor',95000,'coupes'), + ('Windsor Drop','windsor2',125000,'coupes'), + ('Zion','zion',36000,'coupes'), + ('Zion Cabrio','zion2',45000,'coupes'), + ('9F','ninef',65000,'sports'), + ('9F Cabrio','ninef2',80000,'sports'), + ('Alpha','alpha',60000,'sports'), + ('Banshee','banshee',70000,'sports'), + ('Bestia GTS','bestiagts',55000,'sports'), + ('Buffalo','buffalo',12000,'sports'), + ('Buffalo S','buffalo2',20000,'sports'), + ('Carbonizzare','carbonizzare',75000,'sports'), + ('Comet','comet2',65000,'sports'), + ('Coquette','coquette',65000,'sports'), + ('Drift Tampa','tampa2',80000,'sports'), + ('Elegy','elegy2',38500,'sports'), + ('Feltzer','feltzer2',55000,'sports'), + ('Furore GT','furoregt',45000,'sports'), + ('Fusilade','fusilade',40000,'sports'), + ('Jester','jester',65000,'sports'), + ('Jester(Racecar)','jester2',135000,'sports'), + ('Khamelion','khamelion',38000,'sports'), + ('Kuruma','kuruma',30000,'sports'), + ('Lynx','lynx',40000,'sports'), + ('Mamba','mamba',70000,'sports'), + ('Massacro','massacro',65000,'sports'), + ('Massacro(Racecar)','massacro2',130000,'sports'), + ('Omnis','omnis',35000,'sports'), + ('Penumbra','penumbra',28000,'sports'), + ('Rapid GT','rapidgt',35000,'sports'), + ('Rapid GT Convertible','rapidgt2',45000,'sports'), + ('Schafter V12','schafter3',50000,'sports'), + ('Seven 70','seven70',39500,'sports'), + ('Sultan','sultan',15000,'sports'), + ('Surano','surano',50000,'sports'), + ('Tropos','tropos',40000,'sports'), + ('Verlierer','verlierer2',70000,'sports'), + ('Adder','adder',900000,'super'), + ('Banshee 900R','banshee2',255000,'super'), + ('Bullet','bullet',90000,'super'), + ('Cheetah','cheetah',375000,'super'), + ('Entity XF','entityxf',425000,'super'), + ('ETR1','sheava',220000,'super'), + ('FMJ','fmj',185000,'super'), + ('Infernus','infernus',180000,'super'), + ('Osiris','osiris',160000,'super'), + ('Pfister','pfister811',85000,'super'), + ('RE-7B','le7b',325000,'super'), + ('Reaper','reaper',150000,'super'), + ('Sultan RS','sultanrs',65000,'super'), + ('T20','t20',300000,'super'), + ('Turismo R','turismor',350000,'super'), + ('Tyrus','tyrus',600000,'super'), + ('Vacca','vacca',120000,'super'), + ('Voltic','voltic',90000,'super'), + ('X80 Proto','prototipo',2500000,'super'), + ('Zentorno','zentorno',1500000,'super'), + ('Akuma','AKUMA',7500,'motorcycles'), + ('Avarus','avarus',18000,'motorcycles'), + ('Bagger','bagger',13500,'motorcycles'), + ('Bati 801','bati',12000,'motorcycles'), + ('Bati 801RR','bati2',19000,'motorcycles'), + ('BF400','bf400',6500,'motorcycles'), + ('BMX (velo)','bmx',160,'motorcycles'), + ('Carbon RS','carbonrs',18000,'motorcycles'), + ('Chimera','chimera',38000,'motorcycles'), + ('Cliffhanger','cliffhanger',9500,'motorcycles'), + ('Cruiser (velo)','cruiser',510,'motorcycles'), + ('Daemon','daemon',11500,'motorcycles'), + ('Daemon High','daemon2',13500,'motorcycles'), + ('Defiler','defiler',9800,'motorcycles'), + ('Double T','double',28000,'motorcycles'), + ('Enduro','enduro',5500,'motorcycles'), + ('Esskey','esskey',4200,'motorcycles'), + ('Faggio','faggio',1900,'motorcycles'), + ('Vespa','faggio2',2800,'motorcycles'), + ('Fixter (velo)','fixter',225,'motorcycles'), + ('Gargoyle','gargoyle',16500,'motorcycles'), + ('Hakuchou','hakuchou',31000,'motorcycles'), + ('Hakuchou Sport','hakuchou2',55000,'motorcycles'), + ('Hexer','hexer',12000,'motorcycles'), + ('Innovation','innovation',23500,'motorcycles'), + ('Manchez','manchez',5300,'motorcycles'), + ('Nemesis','nemesis',5800,'motorcycles'), + ('Nightblade','nightblade',35000,'motorcycles'), + ('PCJ-600','pcj',6200,'motorcycles'), + ('Ruffian','ruffian',6800,'motorcycles'), + ('Sanchez','sanchez',5300,'motorcycles'), + ('Sanchez Sport','sanchez2',5300,'motorcycles'), + ('Sanctus','sanctus',25000,'motorcycles'), + ('Scorcher (velo)','scorcher',280,'motorcycles'), + ('Sovereign','sovereign',22000,'motorcycles'), + ('Shotaro Concept','shotaro',320000,'motorcycles'), + ('Thrust','thrust',24000,'motorcycles'), + ('Tri bike (velo)','tribike3',520,'motorcycles'), + ('Vader','vader',7200,'motorcycles'), + ('Vortex','vortex',9800,'motorcycles'), + ('Woflsbane','wolfsbane',9000,'motorcycles'), + ('Zombie','zombiea',9500,'motorcycles'), + ('Zombie Luxuary','zombieb',12000,'motorcycles'), + ('blazer5', 'blazer5', 1755600, 'offroad'), + ('Ruiner 2', 'ruiner2', 5745600, 'muscle'), + ('Voltic 2', 'voltic2', 3830400, 'super'), + ('Ardent', 'ardent', 1150000, 'sportsclassics'), + ('Oppressor', 'oppressor', 3524500, 'super'), + ('Visione', 'visione', 2250000, 'super'), + ('Retinue', 'retinue', 615000, 'sportsclassics'), + ('Cyclone', 'cyclone', 1890000, 'super'), + ('Rapid GT3', 'rapidgt3', 885000, 'sportsclassics'), + ('raiden', 'raiden', 1375000, 'sports'), + ('Yosemite', 'yosemite', 485000, 'muscle'), + ('Deluxo', 'deluxo', 4721500, 'sportsclassics'), + ('Pariah', 'pariah', 1420000, 'sports'), + ('Stromberg', 'stromberg', 3185350, 'sports'), + ('SC 1', 'sc1', 1603000, 'super'), + ('riata', 'riata', 380000, 'offroad'), + ('Hermes', 'hermes', 535000, 'muscle'), + ('Savestra', 'savestra', 990000, 'sportsclassics'), + ('Streiter', 'streiter', 500000, 'sports'), + ('Kamacho', 'kamacho', 345000, 'offroad'), + ('GT 500', 'gt500', 785000, 'sportsclassics'), + ('Z190', 'z190', 900000, 'sportsclassics'), + ('Viseris', 'viseris', 875000, 'sportsclassics'), + ('Autarch', 'autarch', 1955000, 'super'), + ('Comet 5', 'comet5', 1145000, 'sports'), + ('Neon', 'neon', 1500000, 'sports'), + ('Revolter', 'revolter', 1610000, 'sports'), + ('Sentinel3', 'sentinel3', 650000, 'sports'), + ('Hustler', 'hustler', 625000, 'muscle') +; diff --git a/_resources/esx_vehicleshop/localization/pl_esx_vehicleshop.sql b/_resources/esx_vehicleshop/localization/pl_esx_vehicleshop.sql new file mode 100644 index 00000000..380c6237 --- /dev/null +++ b/_resources/esx_vehicleshop/localization/pl_esx_vehicleshop.sql @@ -0,0 +1,334 @@ +USE `es_extended`; + +INSERT INTO `addon_account` (name, label, shared) VALUES + ('society_cardealer','Sprzedawca aut',1) +; + +INSERT INTO `addon_inventory` (name, label, shared) VALUES + ('society_cardealer','Sprzedawca aut',1) +; + +INSERT INTO `jobs` (name, label) VALUES + ('cardealer','Sprzedawca aut') +; + +INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES + ('cardealer',0,'recruit','Praktykant',10,'{}','{}'), + ('cardealer',1,'novice','Doświadczony',25,'{}','{}'), + ('cardealer',2,'experienced','Kierownik',40,'{}','{}'), + ('cardealer',3,'boss','Szef',0,'{}','{}') +; + +CREATE TABLE `cardealer_vehicles` ( + `id` int NOT NULL AUTO_INCREMENT, + `vehicle` varchar(255) NOT NULL, + `price` int NOT NULL, + + PRIMARY KEY (`id`) +); + +CREATE TABLE `vehicle_sold` ( + `client` VARCHAR(50) NOT NULL, + `model` VARCHAR(50) NOT NULL, + `plate` VARCHAR(50) NOT NULL, + `soldby` VARCHAR(50) NOT NULL, + `date` VARCHAR(50) NOT NULL, + + PRIMARY KEY (`plate`) +); + +CREATE TABLE `owned_vehicles` ( + `owner` varchar(40) NOT NULL, + `plate` varchar(12) NOT NULL, + `vehicle` longtext, + `type` VARCHAR(20) NOT NULL DEFAULT 'car', + `job` VARCHAR(20) NULL DEFAULT NULL, + `stored` TINYINT NOT NULL DEFAULT '0', + + PRIMARY KEY (`plate`) +); + +CREATE TABLE `rented_vehicles` ( + `vehicle` varchar(60) NOT NULL, + `plate` varchar(12) NOT NULL, + `player_name` varchar(255) NOT NULL, + `base_price` int NOT NULL, + `rent_price` int NOT NULL, + `owner` varchar(22) NOT NULL, + + PRIMARY KEY (`plate`) +); + +CREATE TABLE `vehicle_categories` ( + `id` int NOT NULL AUTO_INCREMENT, + `name` varchar(60) NOT NULL, + `label` varchar(60) NOT NULL, + + PRIMARY KEY (`id`) +); + +INSERT INTO `vehicle_categories` (name, label) VALUES + ('compacts','Compacts'), + ('coupes','Coupés'), + ('sedans','Sedans'), + ('sports','Sports'), + ('sportsclassics','Sports Classics'), + ('super','Supercars'), + ('muscle','Muscle'), + ('offroad','Off Road'), + ('suvs','SUVs'), + ('vans','Vans'), + ('motorcycles','Motorcycles') +; + +CREATE TABLE `vehicles` ( + `name` varchar(60) NOT NULL, + `model` varchar(60) NOT NULL, + `price` int NOT NULL, + `category` varchar(60) DEFAULT NULL, + + PRIMARY KEY (`model`) +); + +INSERT INTO `vehicles` (name, model, price, category) VALUES + ('Blade','blade',15000,'muscle'), + ('Buccaneer','buccaneer',18000,'muscle'), + ('Buccaneer Rider','buccaneer2',24000,'muscle'), + ('Chino','chino',15000,'muscle'), + ('Chino Luxe','chino2',19000,'muscle'), + ('Coquette BlackFin','coquette3',55000,'muscle'), + ('Dominator','dominator',35000,'muscle'), + ('Dukes','dukes',28000,'muscle'), + ('Gauntlet','gauntlet',30000,'muscle'), + ('Hotknife','hotknife',125000,'muscle'), + ('Faction','faction',20000,'muscle'), + ('Faction Rider','faction2',30000,'muscle'), + ('Faction XL','faction3',40000,'muscle'), + ('Nightshade','nightshade',65000,'muscle'), + ('Phoenix','phoenix',12500,'muscle'), + ('Picador','picador',18000,'muscle'), + ('Sabre Turbo','sabregt',20000,'muscle'), + ('Sabre GT','sabregt2',25000,'muscle'), + ('Slam Van','slamvan3',11500,'muscle'), + ('Tampa','tampa',16000,'muscle'), + ('Virgo','virgo',14000,'muscle'), + ('Vigero','vigero',12500,'muscle'), + ('Voodoo','voodoo',7200,'muscle'), + ('Blista','blista',8000,'compacts'), + ('Brioso R/A','brioso',18000,'compacts'), + ('Issi','issi2',10000,'compacts'), + ('Panto','panto',10000,'compacts'), + ('Prairie','prairie',12000,'compacts'), + ('Bison','bison',45000,'vans'), + ('Bobcat XL','bobcatxl',32000,'vans'), + ('Burrito','burrito3',19000,'vans'), + ('Burrito','gburrito2',29000,'vans'), + ('Camper','camper',42000,'vans'), + ('Gang Burrito','gburrito',45000,'vans'), + ('Journey','journey',6500,'vans'), + ('Minivan','minivan',13000,'vans'), + ('Moonbeam','moonbeam',18000,'vans'), + ('Moonbeam Rider','moonbeam2',35000,'vans'), + ('Paradise','paradise',19000,'vans'), + ('Rumpo','rumpo',15000,'vans'), + ('Rumpo Trail','rumpo3',19500,'vans'), + ('Surfer','surfer',12000,'vans'), + ('Youga','youga',10800,'vans'), + ('Youga Luxuary','youga2',14500,'vans'), + ('Asea','asea',5500,'sedans'), + ('Cognoscenti','cognoscenti',55000,'sedans'), + ('Emperor','emperor',8500,'sedans'), + ('Fugitive','fugitive',12000,'sedans'), + ('Glendale','glendale',6500,'sedans'), + ('Intruder','intruder',7500,'sedans'), + ('Premier','premier',8000,'sedans'), + ('Primo Custom','primo2',14000,'sedans'), + ('Regina','regina',5000,'sedans'), + ('Schafter','schafter2',25000,'sedans'), + ('Stretch','stretch',90000,'sedans'), + ('Super Diamond','superd',130000,'sedans'), + ('Tailgater','tailgater',30000,'sedans'), + ('Warrener','warrener',4000,'sedans'), + ('Washington','washington',9000,'sedans'), + ('Baller','baller2',40000,'suvs'), + ('Baller Sport','baller3',60000,'suvs'), + ('Cavalcade','cavalcade2',55000,'suvs'), + ('Contender','contender',70000,'suvs'), + ('Dubsta','dubsta',45000,'suvs'), + ('Dubsta Luxuary','dubsta2',60000,'suvs'), + ('Fhantom','fq2',17000,'suvs'), + ('Grabger','granger',50000,'suvs'), + ('Gresley','gresley',47500,'suvs'), + ('Huntley S','huntley',40000,'suvs'), + ('Landstalker','landstalker',35000,'suvs'), + ('Mesa','mesa',16000,'suvs'), + ('Mesa Trail','mesa3',40000,'suvs'), + ('Patriot','patriot',55000,'suvs'), + ('Radius','radi',29000,'suvs'), + ('Rocoto','rocoto',45000,'suvs'), + ('Seminole','seminole',25000,'suvs'), + ('XLS','xls',32000,'suvs'), + ('Btype','btype',62000,'sportsclassics'), + ('Btype Luxe','btype3',85000,'sportsclassics'), + ('Btype Hotroad','btype2',155000,'sportsclassics'), + ('Casco','casco',30000,'sportsclassics'), + ('Coquette Classic','coquette2',40000,'sportsclassics'), + ('Manana','manana',12800,'sportsclassics'), + ('Monroe','monroe',55000,'sportsclassics'), + ('Pigalle','pigalle',20000,'sportsclassics'), + ('Stinger','stinger',80000,'sportsclassics'), + ('Stinger GT','stingergt',75000,'sportsclassics'), + ('Stirling GT','feltzer3',65000,'sportsclassics'), + ('Z-Type','ztype',220000,'sportsclassics'), + ('Bifta','bifta',12000,'offroad'), + ('Bf Injection','bfinjection',16000,'offroad'), + ('Blazer','blazer',6500,'offroad'), + ('Blazer Sport','blazer4',8500,'offroad'), + ('Brawler','brawler',45000,'offroad'), + ('Bubsta 6x6','dubsta3',120000,'offroad'), + ('Dune Buggy','dune',8000,'offroad'), + ('Guardian','guardian',45000,'offroad'), + ('Rebel','rebel2',35000,'offroad'), + ('Sandking','sandking',55000,'offroad'), + ('The Liberator','monster',210000,'offroad'), + ('Trophy Truck','trophytruck',60000,'offroad'), + ('Trophy Truck Limited','trophytruck2',80000,'offroad'), + ('Cognoscenti Cabrio','cogcabrio',55000,'coupes'), + ('Exemplar','exemplar',32000,'coupes'), + ('F620','f620',40000,'coupes'), + ('Felon','felon',42000,'coupes'), + ('Felon GT','felon2',55000,'coupes'), + ('Jackal','jackal',38000,'coupes'), + ('Oracle XS','oracle2',35000,'coupes'), + ('Sentinel','sentinel',32000,'coupes'), + ('Sentinel XS','sentinel2',40000,'coupes'), + ('Windsor','windsor',95000,'coupes'), + ('Windsor Drop','windsor2',125000,'coupes'), + ('Zion','zion',36000,'coupes'), + ('Zion Cabrio','zion2',45000,'coupes'), + ('9F','ninef',65000,'sports'), + ('9F Cabrio','ninef2',80000,'sports'), + ('Alpha','alpha',60000,'sports'), + ('Banshee','banshee',70000,'sports'), + ('Bestia GTS','bestiagts',55000,'sports'), + ('Buffalo','buffalo',12000,'sports'), + ('Buffalo S','buffalo2',20000,'sports'), + ('Carbonizzare','carbonizzare',75000,'sports'), + ('Comet','comet2',65000,'sports'), + ('Coquette','coquette',65000,'sports'), + ('Drift Tampa','tampa2',80000,'sports'), + ('Elegy','elegy2',38500,'sports'), + ('Feltzer','feltzer2',55000,'sports'), + ('Furore GT','furoregt',45000,'sports'), + ('Fusilade','fusilade',40000,'sports'), + ('Jester','jester',65000,'sports'), + ('Jester(Racecar)','jester2',135000,'sports'), + ('Khamelion','khamelion',38000,'sports'), + ('Kuruma','kuruma',30000,'sports'), + ('Lynx','lynx',40000,'sports'), + ('Mamba','mamba',70000,'sports'), + ('Massacro','massacro',65000,'sports'), + ('Massacro(Racecar)','massacro2',130000,'sports'), + ('Omnis','omnis',35000,'sports'), + ('Penumbra','penumbra',28000,'sports'), + ('Rapid GT','rapidgt',35000,'sports'), + ('Rapid GT Convertible','rapidgt2',45000,'sports'), + ('Schafter V12','schafter3',50000,'sports'), + ('Seven 70','seven70',39500,'sports'), + ('Sultan','sultan',15000,'sports'), + ('Surano','surano',50000,'sports'), + ('Tropos','tropos',40000,'sports'), + ('Verlierer','verlierer2',70000,'sports'), + ('Adder','adder',900000,'super'), + ('Banshee 900R','banshee2',255000,'super'), + ('Bullet','bullet',90000,'super'), + ('Cheetah','cheetah',375000,'super'), + ('Entity XF','entityxf',425000,'super'), + ('ETR1','sheava',220000,'super'), + ('FMJ','fmj',185000,'super'), + ('Infernus','infernus',180000,'super'), + ('Osiris','osiris',160000,'super'), + ('Pfister','pfister811',85000,'super'), + ('RE-7B','le7b',325000,'super'), + ('Reaper','reaper',150000,'super'), + ('Sultan RS','sultanrs',65000,'super'), + ('T20','t20',300000,'super'), + ('Turismo R','turismor',350000,'super'), + ('Tyrus','tyrus',600000,'super'), + ('Vacca','vacca',120000,'super'), + ('Voltic','voltic',90000,'super'), + ('X80 Proto','prototipo',2500000,'super'), + ('Zentorno','zentorno',1500000,'super'), + ('Akuma','AKUMA',7500,'motorcycles'), + ('Avarus','avarus',18000,'motorcycles'), + ('Bagger','bagger',13500,'motorcycles'), + ('Bati 801','bati',12000,'motorcycles'), + ('Bati 801RR','bati2',19000,'motorcycles'), + ('BF400','bf400',6500,'motorcycles'), + ('BMX (velo)','bmx',160,'motorcycles'), + ('Carbon RS','carbonrs',18000,'motorcycles'), + ('Chimera','chimera',38000,'motorcycles'), + ('Cliffhanger','cliffhanger',9500,'motorcycles'), + ('Cruiser (velo)','cruiser',510,'motorcycles'), + ('Daemon','daemon',11500,'motorcycles'), + ('Daemon High','daemon2',13500,'motorcycles'), + ('Defiler','defiler',9800,'motorcycles'), + ('Double T','double',28000,'motorcycles'), + ('Enduro','enduro',5500,'motorcycles'), + ('Esskey','esskey',4200,'motorcycles'), + ('Faggio','faggio',1900,'motorcycles'), + ('Vespa','faggio2',2800,'motorcycles'), + ('Fixter (velo)','fixter',225,'motorcycles'), + ('Gargoyle','gargoyle',16500,'motorcycles'), + ('Hakuchou','hakuchou',31000,'motorcycles'), + ('Hakuchou Sport','hakuchou2',55000,'motorcycles'), + ('Hexer','hexer',12000,'motorcycles'), + ('Innovation','innovation',23500,'motorcycles'), + ('Manchez','manchez',5300,'motorcycles'), + ('Nemesis','nemesis',5800,'motorcycles'), + ('Nightblade','nightblade',35000,'motorcycles'), + ('PCJ-600','pcj',6200,'motorcycles'), + ('Ruffian','ruffian',6800,'motorcycles'), + ('Sanchez','sanchez',5300,'motorcycles'), + ('Sanchez Sport','sanchez2',5300,'motorcycles'), + ('Sanctus','sanctus',25000,'motorcycles'), + ('Scorcher (velo)','scorcher',280,'motorcycles'), + ('Sovereign','sovereign',22000,'motorcycles'), + ('Shotaro Concept','shotaro',320000,'motorcycles'), + ('Thrust','thrust',24000,'motorcycles'), + ('Tri bike (velo)','tribike3',520,'motorcycles'), + ('Vader','vader',7200,'motorcycles'), + ('Vortex','vortex',9800,'motorcycles'), + ('Woflsbane','wolfsbane',9000,'motorcycles'), + ('Zombie','zombiea',9500,'motorcycles'), + ('Zombie Luxuary','zombieb',12000,'motorcycles'), + ('blazer5', 'blazer5', 1755600, 'offroad'), + ('Ruiner 2', 'ruiner2', 5745600, 'muscle'), + ('Voltic 2', 'voltic2', 3830400, 'super'), + ('Ardent', 'ardent', 1150000, 'sportsclassics'), + ('Oppressor', 'oppressor', 3524500, 'super'), + ('Visione', 'visione', 2250000, 'super'), + ('Retinue', 'retinue', 615000, 'sportsclassics'), + ('Cyclone', 'cyclone', 1890000, 'super'), + ('Rapid GT3', 'rapidgt3', 885000, 'sportsclassics'), + ('raiden', 'raiden', 1375000, 'sports'), + ('Yosemite', 'yosemite', 485000, 'muscle'), + ('Deluxo', 'deluxo', 4721500, 'sportsclassics'), + ('Pariah', 'pariah', 1420000, 'sports'), + ('Stromberg', 'stromberg', 3185350, 'sports'), + ('SC 1', 'sc1', 1603000, 'super'), + ('riata', 'riata', 380000, 'offroad'), + ('Hermes', 'hermes', 535000, 'muscle'), + ('Savestra', 'savestra', 990000, 'sportsclassics'), + ('Streiter', 'streiter', 500000, 'sports'), + ('Kamacho', 'kamacho', 345000, 'offroad'), + ('GT 500', 'gt500', 785000, 'sportsclassics'), + ('Z190', 'z190', 900000, 'sportsclassics'), + ('Viseris', 'viseris', 875000, 'sportsclassics'), + ('Autarch', 'autarch', 1955000, 'super'), + ('Comet 5', 'comet5', 1145000, 'sports'), + ('Neon', 'neon', 1500000, 'sports'), + ('Revolter', 'revolter', 1610000, 'sports'), + ('Sentinel3', 'sentinel3', 650000, 'sports'), + ('Hustler', 'hustler', 625000, 'muscle') +; diff --git a/_resources/esx_vehicleshop/localization/sv_esx_vehicleshop.sql b/_resources/esx_vehicleshop/localization/sv_esx_vehicleshop.sql new file mode 100644 index 00000000..975db2e6 --- /dev/null +++ b/_resources/esx_vehicleshop/localization/sv_esx_vehicleshop.sql @@ -0,0 +1,333 @@ +USE `es_extended`; + +INSERT INTO `addon_account` (name, label, shared) VALUES + ('society_cardealer','Bilförsäljare',1) +; + +INSERT INTO `addon_inventory` (name, label, shared) VALUES + ('society_cardealer','Bilförsäljare',1) +; + +INSERT INTO `jobs` (name, label) VALUES + ('cardealer','Bilförsäljare') +; + +INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES + ('cardealer',0,'recruit','Nyanställd',10,'{}','{}'), + ('cardealer',1,'novice','Nybörjare',25,'{}','{}'), + ('cardealer',2,'experienced','Erfaren',40,'{}','{}'), + ('cardealer',3,'boss','Chef',0,'{}','{}') +; + +CREATE TABLE `cardealer_vehicles` ( + `id` int NOT NULL AUTO_INCREMENT, + `vehicle` varchar(255) NOT NULL, + `price` int NOT NULL, + + PRIMARY KEY (`id`) +); + +CREATE TABLE `vehicle_sold` ( + `client` VARCHAR(50) NOT NULL, + `model` VARCHAR(50) NOT NULL, + `plate` VARCHAR(50) NOT NULL, + `soldby` VARCHAR(50) NOT NULL, + `date` VARCHAR(50) NOT NULL, + + PRIMARY KEY (`plate`) +); + +CREATE TABLE `owned_vehicles` ( + `owner` varchar(40) NOT NULL, + `plate` varchar(12) NOT NULL, + `vehicle` longtext, + `type` VARCHAR(20) NOT NULL DEFAULT 'car', + `job` VARCHAR(20) NULL DEFAULT NULL, + `stored` TINYINT NOT NULL DEFAULT '0', + + PRIMARY KEY (`plate`) +); + +CREATE TABLE `rented_vehicles` ( + `vehicle` varchar(60) NOT NULL, + `plate` varchar(12) NOT NULL, + `player_name` varchar(255) NOT NULL, + `base_price` int NOT NULL, + `rent_price` int NOT NULL, + `owner` varchar(22) NOT NULL, + + PRIMARY KEY (`plate`) +); + +CREATE TABLE `vehicle_categories` ( + `name` varchar(60) NOT NULL, + `label` varchar(60) NOT NULL, + + PRIMARY KEY (`name`) +); + +INSERT INTO `vehicle_categories` (name, label) VALUES + ('compacts','Småbil'), + ('coupes','Coupés'), + ('sedans','Sedans'), + ('sports','Sportbil'), + ('sportsclassics','Klassik sportbil'), + ('super','Super'), + ('muscle','Muskel'), + ('offroad','Off Road'), + ('suvs','SUVs'), + ('vans','Vans'), + ('motorcycles','Motorcykel') +; + +CREATE TABLE `vehicles` ( + `name` varchar(60) NOT NULL, + `model` varchar(60) NOT NULL, + `price` int NOT NULL, + `category` varchar(60) DEFAULT NULL, + + PRIMARY KEY (`model`) +); + +INSERT INTO `vehicles` (name, model, price, category) VALUES + ('Blade','blade',15000,'muscle'), + ('Buccaneer','buccaneer',18000,'muscle'), + ('Buccaneer Rider','buccaneer2',24000,'muscle'), + ('Chino','chino',15000,'muscle'), + ('Chino Luxe','chino2',19000,'muscle'), + ('Coquette BlackFin','coquette3',55000,'muscle'), + ('Dominator','dominator',35000,'muscle'), + ('Dukes','dukes',28000,'muscle'), + ('Gauntlet','gauntlet',30000,'muscle'), + ('Hotknife','hotknife',125000,'muscle'), + ('Faction','faction',20000,'muscle'), + ('Faction Rider','faction2',30000,'muscle'), + ('Faction XL','faction3',40000,'muscle'), + ('Nightshade','nightshade',65000,'muscle'), + ('Phoenix','phoenix',12500,'muscle'), + ('Picador','picador',18000,'muscle'), + ('Sabre Turbo','sabregt',20000,'muscle'), + ('Sabre GT','sabregt2',25000,'muscle'), + ('Slam Van','slamvan3',11500,'muscle'), + ('Tampa','tampa',16000,'muscle'), + ('Virgo','virgo',14000,'muscle'), + ('Vigero','vigero',12500,'muscle'), + ('Voodoo','voodoo',7200,'muscle'), + ('Blista','blista',8000,'compacts'), + ('Brioso R/A','brioso',18000,'compacts'), + ('Issi','issi2',10000,'compacts'), + ('Panto','panto',10000,'compacts'), + ('Prairie','prairie',12000,'compacts'), + ('Bison','bison',45000,'vans'), + ('Bobcat XL','bobcatxl',32000,'vans'), + ('Burrito','burrito3',19000,'vans'), + ('Burrito','gburrito2',29000,'vans'), + ('Camper','camper',42000,'vans'), + ('Gang Burrito','gburrito',45000,'vans'), + ('Journey','journey',6500,'vans'), + ('Minivan','minivan',13000,'vans'), + ('Moonbeam','moonbeam',18000,'vans'), + ('Moonbeam Rider','moonbeam2',35000,'vans'), + ('Paradise','paradise',19000,'vans'), + ('Rumpo','rumpo',15000,'vans'), + ('Rumpo Trail','rumpo3',19500,'vans'), + ('Surfer','surfer',12000,'vans'), + ('Youga','youga',10800,'vans'), + ('Youga Luxuary','youga2',14500,'vans'), + ('Asea','asea',5500,'sedans'), + ('Cognoscenti','cognoscenti',55000,'sedans'), + ('Emperor','emperor',8500,'sedans'), + ('Fugitive','fugitive',12000,'sedans'), + ('Glendale','glendale',6500,'sedans'), + ('Intruder','intruder',7500,'sedans'), + ('Premier','premier',8000,'sedans'), + ('Primo Custom','primo2',14000,'sedans'), + ('Regina','regina',5000,'sedans'), + ('Schafter','schafter2',25000,'sedans'), + ('Stretch','stretch',90000,'sedans'), + ('Super Diamond','superd',130000,'sedans'), + ('Tailgater','tailgater',30000,'sedans'), + ('Warrener','warrener',4000,'sedans'), + ('Washington','washington',9000,'sedans'), + ('Baller','baller2',40000,'suvs'), + ('Baller Sport','baller3',60000,'suvs'), + ('Cavalcade','cavalcade2',55000,'suvs'), + ('Contender','contender',70000,'suvs'), + ('Dubsta','dubsta',45000,'suvs'), + ('Dubsta Luxuary','dubsta2',60000,'suvs'), + ('Fhantom','fq2',17000,'suvs'), + ('Grabger','granger',50000,'suvs'), + ('Gresley','gresley',47500,'suvs'), + ('Huntley S','huntley',40000,'suvs'), + ('Landstalker','landstalker',35000,'suvs'), + ('Mesa','mesa',16000,'suvs'), + ('Mesa Trail','mesa3',40000,'suvs'), + ('Patriot','patriot',55000,'suvs'), + ('Radius','radi',29000,'suvs'), + ('Rocoto','rocoto',45000,'suvs'), + ('Seminole','seminole',25000,'suvs'), + ('XLS','xls',32000,'suvs'), + ('Btype','btype',62000,'sportsclassics'), + ('Btype Luxe','btype3',85000,'sportsclassics'), + ('Btype Hotroad','btype2',155000,'sportsclassics'), + ('Casco','casco',30000,'sportsclassics'), + ('Coquette Classic','coquette2',40000,'sportsclassics'), + ('Manana','manana',12800,'sportsclassics'), + ('Monroe','monroe',55000,'sportsclassics'), + ('Pigalle','pigalle',20000,'sportsclassics'), + ('Stinger','stinger',80000,'sportsclassics'), + ('Stinger GT','stingergt',75000,'sportsclassics'), + ('Stirling GT','feltzer3',65000,'sportsclassics'), + ('Z-Type','ztype',220000,'sportsclassics'), + ('Bifta','bifta',12000,'offroad'), + ('Bf Injection','bfinjection',16000,'offroad'), + ('Blazer','blazer',6500,'offroad'), + ('Blazer Sport','blazer4',8500,'offroad'), + ('Brawler','brawler',45000,'offroad'), + ('Bubsta 6x6','dubsta3',120000,'offroad'), + ('Dune Buggy','dune',8000,'offroad'), + ('Guardian','guardian',45000,'offroad'), + ('Rebel','rebel2',35000,'offroad'), + ('Sandking','sandking',55000,'offroad'), + ('The Liberator','monster',210000,'offroad'), + ('Trophy Truck','trophytruck',60000,'offroad'), + ('Trophy Truck Limited','trophytruck2',80000,'offroad'), + ('Cognoscenti Cabrio','cogcabrio',55000,'coupes'), + ('Exemplar','exemplar',32000,'coupes'), + ('F620','f620',40000,'coupes'), + ('Felon','felon',42000,'coupes'), + ('Felon GT','felon2',55000,'coupes'), + ('Jackal','jackal',38000,'coupes'), + ('Oracle XS','oracle2',35000,'coupes'), + ('Sentinel','sentinel',32000,'coupes'), + ('Sentinel XS','sentinel2',40000,'coupes'), + ('Windsor','windsor',95000,'coupes'), + ('Windsor Drop','windsor2',125000,'coupes'), + ('Zion','zion',36000,'coupes'), + ('Zion Cabrio','zion2',45000,'coupes'), + ('9F','ninef',65000,'sports'), + ('9F Cabrio','ninef2',80000,'sports'), + ('Alpha','alpha',60000,'sports'), + ('Banshee','banshee',70000,'sports'), + ('Bestia GTS','bestiagts',55000,'sports'), + ('Buffalo','buffalo',12000,'sports'), + ('Buffalo S','buffalo2',20000,'sports'), + ('Carbonizzare','carbonizzare',75000,'sports'), + ('Comet','comet2',65000,'sports'), + ('Coquette','coquette',65000,'sports'), + ('Drift Tampa','tampa2',80000,'sports'), + ('Elegy','elegy2',38500,'sports'), + ('Feltzer','feltzer2',55000,'sports'), + ('Furore GT','furoregt',45000,'sports'), + ('Fusilade','fusilade',40000,'sports'), + ('Jester','jester',65000,'sports'), + ('Jester(Racecar)','jester2',135000,'sports'), + ('Khamelion','khamelion',38000,'sports'), + ('Kuruma','kuruma',30000,'sports'), + ('Lynx','lynx',40000,'sports'), + ('Mamba','mamba',70000,'sports'), + ('Massacro','massacro',65000,'sports'), + ('Massacro(Racecar)','massacro2',130000,'sports'), + ('Omnis','omnis',35000,'sports'), + ('Penumbra','penumbra',28000,'sports'), + ('Rapid GT','rapidgt',35000,'sports'), + ('Rapid GT Convertible','rapidgt2',45000,'sports'), + ('Schafter V12','schafter3',50000,'sports'), + ('Seven 70','seven70',39500,'sports'), + ('Sultan','sultan',15000,'sports'), + ('Surano','surano',50000,'sports'), + ('Tropos','tropos',40000,'sports'), + ('Verlierer','verlierer2',70000,'sports'), + ('Adder','adder',900000,'super'), + ('Banshee 900R','banshee2',255000,'super'), + ('Bullet','bullet',90000,'super'), + ('Cheetah','cheetah',375000,'super'), + ('Entity XF','entityxf',425000,'super'), + ('ETR1','sheava',220000,'super'), + ('FMJ','fmj',185000,'super'), + ('Infernus','infernus',180000,'super'), + ('Osiris','osiris',160000,'super'), + ('Pfister','pfister811',85000,'super'), + ('RE-7B','le7b',325000,'super'), + ('Reaper','reaper',150000,'super'), + ('Sultan RS','sultanrs',65000,'super'), + ('T20','t20',300000,'super'), + ('Turismo R','turismor',350000,'super'), + ('Tyrus','tyrus',600000,'super'), + ('Vacca','vacca',120000,'super'), + ('Voltic','voltic',90000,'super'), + ('X80 Proto','prototipo',2500000,'super'), + ('Zentorno','zentorno',1500000,'super'), + ('Akuma','AKUMA',7500,'motorcycles'), + ('Avarus','avarus',18000,'motorcycles'), + ('Bagger','bagger',13500,'motorcycles'), + ('Bati 801','bati',12000,'motorcycles'), + ('Bati 801RR','bati2',19000,'motorcycles'), + ('BF400','bf400',6500,'motorcycles'), + ('BMX (velo)','bmx',160,'motorcycles'), + ('Carbon RS','carbonrs',18000,'motorcycles'), + ('Chimera','chimera',38000,'motorcycles'), + ('Cliffhanger','cliffhanger',9500,'motorcycles'), + ('Cruiser (velo)','cruiser',510,'motorcycles'), + ('Daemon','daemon',11500,'motorcycles'), + ('Daemon High','daemon2',13500,'motorcycles'), + ('Defiler','defiler',9800,'motorcycles'), + ('Double T','double',28000,'motorcycles'), + ('Enduro','enduro',5500,'motorcycles'), + ('Esskey','esskey',4200,'motorcycles'), + ('Faggio','faggio',1900,'motorcycles'), + ('Vespa','faggio2',2800,'motorcycles'), + ('Fixter (velo)','fixter',225,'motorcycles'), + ('Gargoyle','gargoyle',16500,'motorcycles'), + ('Hakuchou','hakuchou',31000,'motorcycles'), + ('Hakuchou Sport','hakuchou2',55000,'motorcycles'), + ('Hexer','hexer',12000,'motorcycles'), + ('Innovation','innovation',23500,'motorcycles'), + ('Manchez','manchez',5300,'motorcycles'), + ('Nemesis','nemesis',5800,'motorcycles'), + ('Nightblade','nightblade',35000,'motorcycles'), + ('PCJ-600','pcj',6200,'motorcycles'), + ('Ruffian','ruffian',6800,'motorcycles'), + ('Sanchez','sanchez',5300,'motorcycles'), + ('Sanchez Sport','sanchez2',5300,'motorcycles'), + ('Sanctus','sanctus',25000,'motorcycles'), + ('Scorcher (velo)','scorcher',280,'motorcycles'), + ('Sovereign','sovereign',22000,'motorcycles'), + ('Shotaro Concept','shotaro',320000,'motorcycles'), + ('Thrust','thrust',24000,'motorcycles'), + ('Tri bike (velo)','tribike3',520,'motorcycles'), + ('Vader','vader',7200,'motorcycles'), + ('Vortex','vortex',9800,'motorcycles'), + ('Woflsbane','wolfsbane',9000,'motorcycles'), + ('Zombie','zombiea',9500,'motorcycles'), + ('Zombie Luxuary','zombieb',12000,'motorcycles'), + ('blazer5', 'blazer5', 1755600, 'offroad'), + ('Ruiner 2', 'ruiner2', 5745600, 'muscle'), + ('Voltic 2', 'voltic2', 3830400, 'super'), + ('Ardent', 'ardent', 1150000, 'sportsclassics'), + ('Oppressor', 'oppressor', 3524500, 'super'), + ('Visione', 'visione', 2250000, 'super'), + ('Retinue', 'retinue', 615000, 'sportsclassics'), + ('Cyclone', 'cyclone', 1890000, 'super'), + ('Rapid GT3', 'rapidgt3', 885000, 'sportsclassics'), + ('raiden', 'raiden', 1375000, 'sports'), + ('Yosemite', 'yosemite', 485000, 'muscle'), + ('Deluxo', 'deluxo', 4721500, 'sportsclassics'), + ('Pariah', 'pariah', 1420000, 'sports'), + ('Stromberg', 'stromberg', 3185350, 'sports'), + ('SC 1', 'sc1', 1603000, 'super'), + ('riata', 'riata', 380000, 'offroad'), + ('Hermes', 'hermes', 535000, 'muscle'), + ('Savestra', 'savestra', 990000, 'sportsclassics'), + ('Streiter', 'streiter', 500000, 'sports'), + ('Kamacho', 'kamacho', 345000, 'offroad'), + ('GT 500', 'gt500', 785000, 'sportsclassics'), + ('Z190', 'z190', 900000, 'sportsclassics'), + ('Viseris', 'viseris', 875000, 'sportsclassics'), + ('Autarch', 'autarch', 1955000, 'super'), + ('Comet 5', 'comet5', 1145000, 'sports'), + ('Neon', 'neon', 1500000, 'sports'), + ('Revolter', 'revolter', 1610000, 'sports'), + ('Sentinel3', 'sentinel3', 650000, 'sports'), + ('Hustler', 'hustler', 625000, 'muscle') +; diff --git a/_resources/esx_vehicleshop/server/main.lua b/_resources/esx_vehicleshop/server/main.lua new file mode 100644 index 00000000..1b9d5e3e --- /dev/null +++ b/_resources/esx_vehicleshop/server/main.lua @@ -0,0 +1,495 @@ +ESX = nil +local categories, vehicles = {}, {} + +TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end) + +TriggerEvent('esx_phone:registerNumber', 'cardealer', _U('dealer_customers'), false, false) +TriggerEvent('esx_society:registerSociety', 'cardealer', _U('car_dealer'), 'society_cardealer', 'society_cardealer', 'society_cardealer', {type = 'private'}) + +Citizen.CreateThread(function() + local char = Config.PlateLetters + char = char + Config.PlateNumbers + if Config.PlateUseSpace then char = char + 1 end + + if char > 8 then + print(('[esx_vehicleshop] [^3WARNING^7] Plate character count reached, %s/8 characters!'):format(char)) + end +end) + +function RemoveOwnedVehicle(plate) + MySQL.Async.execute('DELETE FROM owned_vehicles WHERE plate = @plate', { + ['@plate'] = plate + }) +end + +AddEventHandler('onResourceStart', function(resourceName) + if resourceName == GetCurrentResourceName() then + MySQL.ready(function() SQLVehiclesAndCategories() end) + end +end) + +function SQLVehiclesAndCategories() + MySQL.Async.fetchAll('SELECT * FROM `vehicle_categories`', {}, function(_categories) + categories = _categories + + MySQL.Async.fetchAll('SELECT * FROM `vehicles`', {}, function(_vehicles) + vehicles = _vehicles + + GetVehiclesAndCategories(categories, vehicles) + end) + + end) +end + +function GetVehiclesAndCategories(categories, vehicles) + for k,v in ipairs(vehicles) do + for k2,v2 in ipairs(categories) do + if v2.name == v.category then + vehicles[k].categoryLabel = v2.label + break + end + end + end + + -- send information after db has loaded, making sure everyone gets vehicle information + TriggerClientEvent('esx_vehicleshop:sendCategories', -1, categories) + TriggerClientEvent('esx_vehicleshop:sendVehicles', -1, vehicles) +end + +function getVehicleLabelFromModel(model) + for k,v in ipairs(vehicles) do + if v.model == model then + return v.name + end + end + + return +end + +RegisterNetEvent('esx_vehicleshop:setVehicleOwnedPlayerId') +AddEventHandler('esx_vehicleshop:setVehicleOwnedPlayerId', function(playerId, vehicleProps, model, label) + local xPlayer, xTarget = ESX.GetPlayerFromId(source), ESX.GetPlayerFromId(playerId) + + if xPlayer.job.name == 'cardealer' and xTarget then + MySQL.Async.fetchAll('SELECT id FROM cardealer_vehicles WHERE vehicle = @vehicle LIMIT 1', { + ['@vehicle'] = model + }, function(result) + if result[1] then + local id = result[1].id + + MySQL.Async.execute('DELETE FROM cardealer_vehicles WHERE id = @id', { + ['@id'] = id + }, function(rowsChanged) + if rowsChanged == 1 then + MySQL.Async.execute('INSERT INTO owned_vehicles (owner, plate, vehicle) VALUES (@owner, @plate, @vehicle)', { + ['@owner'] = xTarget.identifier, + ['@plate'] = vehicleProps.plate, + ['@vehicle'] = json.encode(vehicleProps) + }, function(rowsChanged) + xPlayer.showNotification(_U('vehicle_set_owned', vehicleProps.plate, xTarget.getName())) + xTarget.showNotification(_U('vehicle_belongs', vehicleProps.plate)) + end) + + local dateNow = os.date('%Y-%m-%d %H:%M') + + MySQL.Async.execute('INSERT INTO vehicle_sold (client, model, plate, soldby, date) VALUES (@client, @model, @plate, @soldby, @date)', { + ['@client'] = xTarget.getName(), + ['@model'] = label, + ['@plate'] = vehicleProps.plate, + ['@soldby'] = xPlayer.getName(), + ['@date'] = dateNow + }) + end + end) + end + end) + end +end) + +ESX.RegisterServerCallback('esx_vehicleshop:getSoldVehicles', function(source, cb) + MySQL.Async.fetchAll('SELECT client, model, plate, soldby, date FROM vehicle_sold', {}, function(result) + cb(result) + end) +end) + +RegisterNetEvent('esx_vehicleshop:rentVehicle') +AddEventHandler('esx_vehicleshop:rentVehicle', function(vehicle, plate, rentPrice, playerId) + local xPlayer, xTarget = ESX.GetPlayerFromId(source), ESX.GetPlayerFromId(playerId) + + if xPlayer.job.name == 'cardealer' and xTarget then + MySQL.Async.fetchAll('SELECT id, price FROM cardealer_vehicles WHERE vehicle = @vehicle LIMIT 1', { + ['@vehicle'] = vehicle + }, function(result) + if result[1] then + local price = result[1].price + + MySQL.Async.execute('DELETE FROM cardealer_vehicles WHERE id = @id', { + ['@id'] = result[1].id + }, function(rowsChanged) + if rowsChanged == 1 then + MySQL.Async.execute('INSERT INTO rented_vehicles (vehicle, plate, player_name, base_price, rent_price, owner) VALUES (@vehicle, @plate, @player_name, @base_price, @rent_price, @owner)', { + ['@vehicle'] = vehicle, + ['@plate'] = plate, + ['@player_name'] = xTarget.getName(), + ['@base_price'] = price, + ['@rent_price'] = rentPrice, + ['@owner'] = xTarget.identifier + }, function(rowsChanged2) + xPlayer.showNotification(_U('vehicle_set_rented', plate, xTarget.getName())) + end) + end + end) + end + end) + end +end) + +RegisterNetEvent('esx_vehicleshop:getStockItem') +AddEventHandler('esx_vehicleshop:getStockItem', function(itemName, count) + local _source = source + local xPlayer = ESX.GetPlayerFromId(_source) + + TriggerEvent('esx_addoninventory:getSharedInventory', 'society_cardealer', function(inventory) + local item = inventory.getItem(itemName) + + -- is there enough in the society? + if count > 0 and item.count >= count then + + -- can the player carry the said amount of x item? + if xPlayer.canCarryItem(itemName, count) then + inventory.removeItem(itemName, count) + xPlayer.addInventoryItem(itemName, count) + xPlayer.showNotification(_U('have_withdrawn', count, item.label)) + else + xPlayer.showNotification(_U('player_cannot_hold')) + end + else + xPlayer.showNotification(_U('not_enough_in_society')) + end + end) +end) + +RegisterNetEvent('esx_vehicleshop:putStockItems') +AddEventHandler('esx_vehicleshop:putStockItems', function(itemName, count) + local _source = source + local xPlayer = ESX.GetPlayerFromId(_source) + + TriggerEvent('esx_addoninventory:getSharedInventory', 'society_cardealer', function(inventory) + local item = inventory.getItem(itemName) + + if item.count >= 0 then + xPlayer.removeInventoryItem(itemName, count) + inventory.addItem(itemName, count) + xPlayer.showNotification(_U('have_deposited', count, item.label)) + else + xPlayer.showNotification(_U('invalid_amount')) + end + end) +end) + +ESX.RegisterServerCallback('esx_vehicleshop:getCategories', function(source, cb) + cb(categories) +end) + +ESX.RegisterServerCallback('esx_vehicleshop:getVehicles', function(source, cb) + cb(vehicles) +end) + +ESX.RegisterServerCallback('esx_vehicleshop:buyVehicle', function(source, cb, model, plate) + local xPlayer = ESX.GetPlayerFromId(source) + local modelPrice + + for k,v in ipairs(vehicles) do + if model == v.model then + modelPrice = v.price + break + end + end + + if modelPrice and xPlayer.getMoney() >= modelPrice then + xPlayer.removeMoney(modelPrice) + + MySQL.Async.execute('INSERT INTO owned_vehicles (owner, plate, vehicle) VALUES (@owner, @plate, @vehicle)', { + ['@owner'] = xPlayer.identifier, + ['@plate'] = plate, + ['@vehicle'] = json.encode({model = GetHashKey(model), plate = plate}) + }, function(rowsChanged) + xPlayer.showNotification(_U('vehicle_belongs', plate)) + cb(true) + end) + else + cb(false) + end +end) + +ESX.RegisterServerCallback('esx_vehicleshop:getCommercialVehicles', function(source, cb) + MySQL.Async.fetchAll('SELECT price, vehicle FROM cardealer_vehicles ORDER BY vehicle ASC', {}, function(result) + cb(result) + end) +end) + +ESX.RegisterServerCallback('esx_vehicleshop:buyCarDealerVehicle', function(source, cb, model) + local xPlayer = ESX.GetPlayerFromId(source) + + if xPlayer.job.name == 'cardealer' then + local modelPrice + + for k,v in ipairs(vehicles) do + if model == v.model then + modelPrice = v.price + break + end + end + + if modelPrice then + TriggerEvent('esx_addonaccount:getSharedAccount', 'society_cardealer', function(account) + if account.money >= modelPrice then + account.removeMoney(modelPrice) + + MySQL.Async.execute('INSERT INTO cardealer_vehicles (vehicle, price) VALUES (@vehicle, @price)', { + ['@vehicle'] = model, + ['@price'] = modelPrice + }, function(rowsChanged) + cb(true) + end) + else + cb(false) + end + end) + end + end +end) + +RegisterNetEvent('esx_vehicleshop:returnProvider') +AddEventHandler('esx_vehicleshop:returnProvider', function(vehicleModel) + local xPlayer = ESX.GetPlayerFromId(source) + + if xPlayer.job.name == 'cardealer' then + MySQL.Async.fetchAll('SELECT id, price FROM cardealer_vehicles WHERE vehicle = @vehicle LIMIT 1', { + ['@vehicle'] = vehicleModel + }, function(result) + if result[1] then + local id = result[1].id + + MySQL.Async.execute('DELETE FROM cardealer_vehicles WHERE id = @id', { + ['@id'] = id + }, function(rowsChanged) + if rowsChanged == 1 then + TriggerEvent('esx_addonaccount:getSharedAccount', 'society_cardealer', function(account) + local price = ESX.Math.Round(result[1].price * 0.75) + local vehicleLabel = getVehicleLabelFromModel(vehicleModel) + + account.addMoney(price) + xPlayer.showNotification(_U('vehicle_sold_for', vehicleLabel, ESX.Math.GroupDigits(price))) + end) + end + end) + else + print(('[esx_vehicleshop] [^3WARNING^7] %s attempted selling an invalid vehicle!'):format(xPlayer.identifier)) + end + end) + end +end) + +ESX.RegisterServerCallback('esx_vehicleshop:getRentedVehicles', function(source, cb) + MySQL.Async.fetchAll('SELECT * FROM rented_vehicles ORDER BY player_name ASC', {}, function(result) + local vehicles = {} + + for i=1, #result, 1 do + table.insert(vehicles, { + name = result[i].vehicle, + plate = result[i].plate, + playerName = result[i].player_name + }) + end + + cb(vehicles) + end) +end) + +ESX.RegisterServerCallback('esx_vehicleshop:giveBackVehicle', function(source, cb, plate) + MySQL.Async.fetchAll('SELECT base_price, vehicle FROM rented_vehicles WHERE plate = @plate', { + ['@plate'] = plate + }, function(result) + if result[1] then + local vehicle = result[1].vehicle + local basePrice = result[1].base_price + + MySQL.Async.execute('DELETE FROM rented_vehicles WHERE plate = @plate', { + ['@plate'] = plate + }, function(rowsChanged) + MySQL.Async.execute('INSERT INTO cardealer_vehicles (vehicle, price) VALUES (@vehicle, @price)', { + ['@vehicle'] = vehicle, + ['@price'] = basePrice + }) + + RemoveOwnedVehicle(plate) + cb(true) + end) + else + cb(false) + end + end) +end) + +ESX.RegisterServerCallback('esx_vehicleshop:resellVehicle', function(source, cb, plate, model) + local xPlayer, resellPrice = ESX.GetPlayerFromId(source) + + if xPlayer.job.name == 'cardealer' or not Config.EnablePlayerManagement then + -- calculate the resell price + for i=1, #vehicles, 1 do + if GetHashKey(vehicles[i].model) == model then + resellPrice = ESX.Math.Round(vehicles[i].price / 100 * Config.ResellPercentage) + break + end + end + + if not resellPrice then + print(('[esx_vehicleshop] [^3WARNING^7] %s attempted to sell an unknown vehicle!'):format(xPlayer.identifier)) + cb(false) + else + MySQL.Async.fetchAll('SELECT * FROM rented_vehicles WHERE plate = @plate', { + ['@plate'] = plate + }, function(result) + if result[1] then -- is it a rented vehicle? + cb(false) -- it is, don't let the player sell it since he doesn't own it + else + MySQL.Async.fetchAll('SELECT * FROM owned_vehicles WHERE owner = @owner AND @plate = plate', { + ['@owner'] = xPlayer.identifier, + ['@plate'] = plate + }, function(result) + if result[1] then -- does the owner match? + local vehicle = json.decode(result[1].vehicle) + + if vehicle.model == model then + if vehicle.plate == plate then + xPlayer.addMoney(resellPrice) + RemoveOwnedVehicle(plate) + cb(true) + else + print(('[esx_vehicleshop] [^3WARNING^7] %s attempted to sell an vehicle with plate mismatch!'):format(xPlayer.identifier)) + cb(false) + end + else + print(('[esx_vehicleshop] [^3WARNING^7] %s attempted to sell an vehicle with model mismatch!'):format(xPlayer.identifier)) + cb(false) + end + end + end) + end + end) + end + end +end) + +ESX.RegisterServerCallback('esx_vehicleshop:getStockItems', function(source, cb) + TriggerEvent('esx_addoninventory:getSharedInventory', 'society_cardealer', function(inventory) + cb(inventory.items) + end) +end) + +ESX.RegisterServerCallback('esx_vehicleshop:getPlayerInventory', function(source, cb) + local xPlayer = ESX.GetPlayerFromId(source) + local items = xPlayer.inventory + + cb({items = items}) +end) + +ESX.RegisterServerCallback('esx_vehicleshop:isPlateTaken', function(source, cb, plate) + MySQL.Async.fetchAll('SELECT 1 FROM owned_vehicles WHERE plate = @plate', { + ['@plate'] = plate + }, function(result) + cb(result[1] ~= nil) + end) +end) + +ESX.RegisterServerCallback('esx_vehicleshop:retrieveJobVehicles', function(source, cb, type) + local xPlayer = ESX.GetPlayerFromId(source) + + MySQL.Async.fetchAll('SELECT * FROM owned_vehicles WHERE owner = @owner AND type = @type AND job = @job', { + ['@owner'] = xPlayer.identifier, + ['@type'] = type, + ['@job'] = xPlayer.job.name + }, function(result) + cb(result) + end) +end) + +RegisterNetEvent('esx_vehicleshop:setJobVehicleState') +AddEventHandler('esx_vehicleshop:setJobVehicleState', function(plate, state) + local xPlayer = ESX.GetPlayerFromId(source) + + MySQL.Async.execute('UPDATE owned_vehicles SET `stored` = @stored WHERE plate = @plate AND job = @job', { + ['@stored'] = state, + ['@plate'] = plate, + ['@job'] = xPlayer.job.name + }, function(rowsChanged) + if rowsChanged == 0 then + print(('[esx_vehicleshop] [^3WARNING^7] %s exploited the garage!'):format(xPlayer.identifier)) + end + end) +end) + +function UnrentVehicleAsync(identifier, plate) + MySQL.Async.execute('DELETE FROM rented_vehicles WHERE identifier = @identifier AND plate = @plate', { + ['@identifier'] = identifier, + ['@plate'] = plate + }) +end + +function PayRent(d, h, m) + local tasks, timeStart = {}, os.clock() + print('[esx_vehicleshop] [^2INFO^7] Paying rent cron job started') + + MySQL.Async.fetchAll('SELECT owner, rent_price, plate FROM rented_vehicles', {}, function(result) + for k,v in ipairs(result) do + table.insert(tasks, function(cb) + local xPlayer = ESX.GetPlayerFromIdentifier(v.owner) + + if xPlayer then + if xPlayer.getAccount('bank').money >= v.rent_price then + xPlayer.removeAccountMoney('bank', v.rent_price) + xPlayer.showNotification(_U('paid_rental', ESX.Math.GroupDigits(v.rent_price), v.plate)) + else + xPlayer.showNotification(_U('paid_rental_evicted', ESX.Math.GroupDigits(v.rent_price), v.plate)) + UnrentVehicleAsync(v.owner, v.plate) + end + else + MySQL.Async.fetchScalar('SELECT accounts FROM users WHERE identifier = @identifier', { + ['@identifier'] = v.owner + }, function(accounts) + if accounts then + local playerAccounts = json.decode(accounts) + + if playerAccounts and playerAccounts.bank then + if playerAccounts.bank >= v.price then + playerAccounts.bank = playerAccounts.bank - v.price + + MySQL.Async.execute('UPDATE users SET accounts = @accounts WHERE identifier = @identifier', { + ['@identifier'] = v.owner, + ['@accounts'] = json.encode(playerAccounts) + }) + else + UnrentVehicleAsync(v.owner, v.plate) + end + end + end + end) + end + + TriggerEvent('esx_addonaccount:getSharedAccount', 'society_cardealer', function(account) + account.addMoney(result[i].rent_price) + end) + + cb() + end) + end + + Async.parallelLimit(tasks, 5, function(results) end) + + local elapsedTime = os.clock() - timeStart + print(('[esx_vehicleshop] [^2INFO^7] Paying rent cron job took %s seconds'):format(elapsedTime)) + end) +end + +TriggerEvent('cron:runAt', 22, 00, PayRent)