├── .gitattributes ├── .gitignore ├── License.md ├── README.md ├── backups └── BACKUPS HERE.txt ├── client ├── client.lua ├── players.lua └── resources.lua ├── fxmanifest.lua ├── html ├── index.css ├── index.html └── index.js ├── server ├── config.lua ├── players.lua ├── resources.lua └── server.lua ├── shared └── lib.lua └── ui ├── .gitignore ├── README.md ├── index.html ├── package-lock.json ├── package.json ├── pnpm-lock.yaml ├── postcss.config.js ├── src ├── App.svelte ├── Components │ ├── DebugBrowser.svelte │ ├── LuaExec.svelte │ ├── MovableWin.svelte │ ├── Output.svelte │ ├── Players.svelte │ ├── Playertabs │ │ ├── PActions.svelte │ │ └── PInfo.svelte │ ├── Resources.svelte │ └── Settings.svelte ├── Tailwind.css ├── components │ ├── Drawer.svelte │ └── QuickFunc.svelte ├── main.ts ├── providers │ ├── BackdropFix.svelte │ └── VisibilityProvider.svelte ├── store │ └── stores.ts ├── utils │ ├── Defaults.js │ ├── ReceiveNUI.ts │ ├── SendNUI.ts │ ├── debugData.ts │ ├── luaHandler.ts │ ├── misc.ts │ └── tooltip.js └── vite-env.d.ts ├── svelte.config.js ├── tailwind.config.cjs ├── tsconfig.json └── vite.config.js /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | .DS_Store 3 | -------------------------------------------------------------------------------- /License.md: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # XV-DEV 2 | ## Development menu for FiveM 3 | 4 | Removes the need to make temporary commands to test out some code, or however you test scripts. 5 | 6 | [Preview Video](https://streamable.com/fdsqis) 7 | 8 | [Resource Manager Preview Video](https://streamable.com/ygan7k) 9 | 10 | [Code Editor Themes](https://imgur.com/a/5EBCj8f) 11 | 12 | ## Note 13 | `StrictResEdit` is `true` by default. This means the player must have atleast 1 valid identifier set. If false, anyone allowed to use the menu will be edit resources. 14 | 15 | ## Features 16 | - Execute any code using the Lua Executor 17 | - Execute commonly used natives through the Quick Functions tab. 18 | - Declare variables to be passed in to the functions 19 | - Search through a predefined list of functions 20 | - See all global variables that was declared 21 | - Configure by adding/removing/editing functions 22 | - Console to show if code was executed or returned an error 23 | - Debug to show code that was executed 24 | - Auto Detection for QBCore/ESX/Ox_lib 25 | - Customisable Editor theme 26 | - Advanced Discord Webhooks 27 | - Advanced Resource Manager 28 | - Start/Stop/Restart Resources 29 | - Edit Files on the go with built-in Editor 30 | - Makes Backups in dedicated backups folder 31 | - Advanced Player Manager 32 | - Teleport to them 33 | - Teleport them to you 34 | - Teleport them to a coordinate 35 | - Freeze them 36 | - Unfreeze them 37 | - Spawn them a vehicle 38 | - Delete their vehicle 39 | - Execute code directly to their client 40 | 41 | 42 | ## Future Features 43 | - Section for Player for quick Player Options 44 | - Section for Vehicle for quick Vehicle Options 45 | - Vehicle section is also planned to have a Vehicle Meta changer built in 46 | 47 | ## Installation 48 | Drag'N'Drop 49 | 50 | ## DO NOT 51 | 52 | Do not do `while true do` 53 | Instead declare a global variable to true and use that. 54 | Example: 55 | ```lua 56 | runWhile = true 57 | 58 | while runWhile do 59 | --run something 60 | end 61 | ``` 62 | To turn it off 63 | ```lua 64 | runWhile = false 65 | ``` 66 | 67 | ## DO 68 | 69 | To return a value to the Output tab, you must return outside a function. This is because of a hacky solution to be able to execute the lua code. 70 | 71 | ```lua 72 | return "This would be returned to the Output Tab" 73 | ``` 74 | 75 | ## License 76 | 77 | GNU General Public License 78 | 79 | -------------------------------------------------------------------------------- /backups/BACKUPS HERE.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ImXirvin/xv-dev/228b582e64229face182139dab13c6811920e54d/backups/BACKUPS HERE.txt -------------------------------------------------------------------------------- /client/client.lua: -------------------------------------------------------------------------------- 1 | QBCore = nil 2 | ESX = nil 3 | 4 | CreateThread(function() 5 | --get resource state of qb-core 6 | if GetResourceState("qb-core") == "started" then 7 | QBCore = exports["qb-core"]:GetCoreObject() 8 | end 9 | --get resource state of esx 10 | if GetResourceState("es_extended") == "started" then 11 | ESX = exports["es_extended"]:getSharedObject() 12 | end 13 | end) 14 | 15 | local initial = false 16 | 17 | RegisterCommand("dev", function() 18 | if not initial then 19 | TriggerServerEvent("xv-dev:server:updateResourceList") 20 | initial = true 21 | end 22 | 23 | TriggerServerEvent("xv-dev:server:verifyExec") 24 | end, false) 25 | 26 | local inMenu = false 27 | RegisterNetEvent("openDevMenu", function() 28 | local bool = not inMenu 29 | SendNUIMessage({ 30 | action = "DevMenu", 31 | data = { 32 | show = bool, 33 | }, 34 | }) 35 | SetNuiFocus(bool, bool) 36 | end) 37 | 38 | RegisterNUICallback("hideUI", function(data, cb) 39 | SendNUIMessage({ 40 | action = "DevMenu", 41 | data = { 42 | show = false, 43 | }, 44 | }) 45 | SetNuiFocus(false, false) 46 | cb(1) 47 | end) 48 | 49 | RegisterNetEvent("xv-dev:client:updateOutput", function(output, eventType, red) 50 | SendNUIMessage({ 51 | action = "updateOutput", 52 | data = { 53 | output = output, 54 | eventType = eventType, 55 | red = red, 56 | }, 57 | }) 58 | end) 59 | 60 | RegisterNetEvent("xv-dev:client:ExecLua", function(code) 61 | local func, err = load("return " .. code, "@xv-dev") 62 | local red = false 63 | local output = "" 64 | if func then 65 | local status, result = pcall(func, "@xv-dev") 66 | if status then 67 | output = tostring(result or "Executed") 68 | red = false 69 | else 70 | output = "Error: " .. (result or "Unknown") 71 | end 72 | else 73 | output = "Error: " .. err 74 | red = true 75 | end 76 | TriggerEvent("xv-dev:client:updateOutput", output, "client", red) 77 | end) 78 | 79 | RegisterNUICallback("ExecuteLua", function(data, cb) 80 | local code = data.code 81 | local eventType = data.eventType 82 | local selectedSrc = data.source 83 | TriggerServerEvent("xv-dev:server:verifyExec", code, eventType, selectedSrc) 84 | cb(1) 85 | end) 86 | -------------------------------------------------------------------------------- /client/players.lua: -------------------------------------------------------------------------------- 1 | local players = {} 2 | local inspectPlayer = false 3 | local targetID = nil 4 | 5 | local function updatePlayerList() 6 | players = {} 7 | local activePlayers = GetActivePlayers() 8 | local playerCount = #activePlayers 9 | for i = 1, playerCount do 10 | local id = GetPlayerServerId(activePlayers[i]) 11 | local name = GetPlayerName(activePlayers[i]) 12 | print(id, name) 13 | players[#players + 1] = {id = id, name = name} 14 | end 15 | end 16 | 17 | RegisterNetEvent('xv:client:updatePlayerList', function() 18 | updatePlayerList() 19 | SendNUIMessage({ 20 | action = "UpdatePlayerList", 21 | data = { 22 | players = players 23 | } 24 | }) 25 | end) 26 | 27 | RegisterNUICallback('GetPlayers', function(data, cb) 28 | TriggerEvent('xv:client:updatePlayerList') 29 | cb(1) 30 | end) 31 | 32 | local function RetrievePlyInfo(id) 33 | local id = id 34 | local player = GetPlayerFromServerId(id) 35 | local identifiers = nil 36 | TriggerServerEvent('xv-dev:server:identifierCallback', id) 37 | RegisterNetEvent('xv-dev:client:identifierCallback', function(data) 38 | identifiers = data 39 | end) 40 | while identifiers == nil do 41 | Wait(0) 42 | end 43 | print(json.encode(identifiers)) 44 | local initial = false 45 | CreateThread(function() 46 | local name = GetPlayerName(player) 47 | while targetID == id do 48 | local ped = GetPlayerPed(player) 49 | local coords = GetEntityCoords(ped) 50 | local heading = GetEntityHeading(ped) 51 | local health = GetEntityHealth(ped) 52 | local armour = GetPedArmour(ped) 53 | local model = GetLabelText(GetHashKey(GetEntityModel(ped))) 54 | local inVehicle = IsPedInAnyVehicle(ped, false) 55 | local vehicle = nil 56 | local vehicleName = nil 57 | if inVehicle then 58 | vehicle = GetVehiclePedIsIn(ped, false) 59 | vehicleName = GetDisplayNameFromVehicleModel(GetEntityModel(vehicle)) 60 | end 61 | local data = { 62 | id = id, 63 | name = name, 64 | coords = coords, 65 | heading = heading, 66 | health = health, 67 | armour = armour, 68 | model = model, 69 | inVehicle = inVehicle, 70 | vehicleName = vehicleName, 71 | identifiers = identifiers, 72 | } --Ceebs splitting permanent data from dynamic data 73 | SendNUIMessage({ 74 | action = "updatePlayerData", 75 | data = data 76 | }) 77 | Wait(1000) 78 | end 79 | end) 80 | 81 | 82 | end 83 | 84 | 85 | RegisterNUICallback('startGetPlayerData', function(data, cb) 86 | local id = data.id 87 | targetID = id 88 | inspectPlayer = true 89 | RetrievePlyInfo(id) 90 | cb(1) 91 | end) 92 | 93 | RegisterNUICallback('stopGetPlayerData', function(data, cb) 94 | targetID = nil 95 | cb(1) 96 | end) 97 | 98 | RegisterNUICallback('playerAction', function(data, cb) 99 | TriggerServerEvent('xv-dev:server:playerAction', data) 100 | cb(1) 101 | end) 102 | 103 | RegisterNUICallback('kickPlayer', function(data, cb) 104 | local id = data.id 105 | local reason = data.reason 106 | TriggerServerEvent('xv-dev:server:kickPlayer', id, reason) 107 | cb(1) 108 | end) 109 | 110 | RegisterNUICallback('banPlayer', function(data, cb) 111 | local id = data.id 112 | local reason = data.reason 113 | TriggerServerEvent('xv-dev:server:banPlayer', id, reason) 114 | cb(1) 115 | end) 116 | 117 | 118 | ------------------------------------------------------------ 119 | 120 | RegisterNetEvent('xv-dev:client:teleport', function(data) 121 | local ped = PlayerPedId() 122 | local action = data.action 123 | if action == "tpToPlayer" then 124 | local id = data.id 125 | local player = GetPlayerFromServerId(id) 126 | local coords = GetEntityCoords(GetPlayerPed(player)) 127 | SetPedCoordsKeepVehicle(ped, coords.x, coords.y, coords.z) 128 | elseif action == "tpToCoords" then 129 | local coords = data.coords 130 | local coords = '['..data.coords..']' 131 | coords = json.decode(coords) 132 | coords = vector3(coords[1], coords[2], coords[3]) 133 | SetPedCoordsKeepVehicle(ped, coords.x, coords.y, coords.z) 134 | end 135 | end) 136 | 137 | RegisterNetEvent('xv-dev:client:spawnVehicle', function(model) 138 | local ped = PlayerPedId() 139 | local coords = GetEntityCoords(ped) 140 | local heading = GetEntityHeading(ped) 141 | local vehicle = CreateVehicle(GetHashKey(model), coords.x, coords.y, coords.z, heading, true, false) 142 | SetPedIntoVehicle(ped, vehicle, -1) 143 | end) 144 | 145 | RegisterNetEvent('xv-dev:client:deleteVehicle', function() 146 | local ped = PlayerPedId() 147 | local vehicle = GetVehiclePedIsIn(ped, false) 148 | DeleteVehicle(vehicle) 149 | end) 150 | 151 | RegisterNetEvent('xv-dev:client:freezePlayer', function(bool) 152 | local ped = PlayerPedId() 153 | FreezeEntityPosition(ped, bool) 154 | end) 155 | -------------------------------------------------------------------------------- /client/resources.lua: -------------------------------------------------------------------------------- 1 | RegisterNUICallback('UpdateResourceList', function(data, cb) 2 | -- print('Updating Resource List') 3 | TriggerServerEvent('xv-dev:server:updateResourceList') 4 | cb(1) 5 | end) 6 | 7 | RegisterNetEvent('xv-dev:client:updateResourceList', function(resources) 8 | -- print('Updating Resource List Event') 9 | SendNUIMessage({ 10 | action = "updateResourceList", 11 | data = { 12 | resources = resources, 13 | } 14 | }) 15 | end) 16 | 17 | RegisterNUICallback('ManageResource', function(data, cb) 18 | -- print('Managing Resource') 19 | local action = data.action 20 | local resource = data.resource 21 | TriggerServerEvent('xv-dev:server:manageResource', resource, action) 22 | cb(1) 23 | end) 24 | 25 | RegisterNUICallback('SaveResource', function(data, cb) --Saves the edited file to the new resource 26 | -- print('Save Resource') 27 | local resource = data.resource 28 | local route = data.route 29 | local content = data.content 30 | local autoRestart = data.autoRestart 31 | TriggerServerEvent('xv-dev:server:saveResource', resource, route, content, autoRestart) 32 | cb(1) 33 | end) 34 | 35 | RegisterNUICallback('clickEdit', function(data, cb) 36 | -- print('Click Edit') 37 | local resource = data.resource 38 | TriggerServerEvent('xv-dev:server:editResource', resource) 39 | cb(1) 40 | end) 41 | 42 | RegisterNetEvent('xv-dev:client:sendData', function(resource, route, data) --Sends the data of the file to the UI 43 | -- print(resource, route, data, 'sendData') 44 | SendNUIMessage({ 45 | action = "LoadData", 46 | data = { 47 | resource = resource, 48 | route = route, 49 | data = data, 50 | } 51 | }) 52 | end) 53 | 54 | RegisterNetEvent('xv-dev:client:openEdit', function(resourceFiles) --Sends the files list for the resource to the UI 55 | -- print('openEdit') 56 | SendNUIMessage({ 57 | action = 'LoadFiles', 58 | data = { 59 | resourceFiles = resourceFiles, 60 | }, 61 | }) 62 | end) 63 | 64 | 65 | RegisterNUICallback('getFileData', function(data, cb) --Gets the data of the file 66 | -- print('getFileData') 67 | local resource = data.resource 68 | local route = data.route 69 | -- print(resource, route) 70 | TriggerServerEvent('xv-dev:server:getData', resource, route) 71 | cb(1) 72 | end) -------------------------------------------------------------------------------- /fxmanifest.lua: -------------------------------------------------------------------------------- 1 | fx_version "cerulean" 2 | 3 | game "gta5" 4 | 5 | name "xv-dev" 6 | author "Xirvin#0985" 7 | description "FiveM Development Menu." 8 | version "2.2.6" 9 | repository "https://github.com/ImXirvin/xv-dev" 10 | 11 | ui_page "html/index.html" 12 | 13 | shared_scripts { 14 | "@ox_lib/init.lua", 15 | "shared/lib.lua", 16 | } 17 | 18 | client_script { 19 | "client/client.lua", 20 | "client/resources.lua", 21 | "client/players.lua", 22 | } 23 | server_script { 24 | "server/config.lua", 25 | "server/server.lua", 26 | "server/resources.lua", 27 | "server/players.lua", 28 | } 29 | files { 30 | "html/index.html", 31 | "html/index.js", 32 | "html/index.css", 33 | } 34 | 35 | lua54 "yes" 36 | -------------------------------------------------------------------------------- /html/index.css: -------------------------------------------------------------------------------- 1 | .tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;white-space:normal;outline:0;transition-property:transform,visibility,opacity}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{width:16px;height:16px;color:#333}.tippy-arrow:before{content:"";position:absolute;border-color:transparent;border-style:solid}.tippy-content{position:relative;padding:5px 9px;z-index:1}.navbar.svelte-smrwlx.svelte-smrwlx::-webkit-scrollbar{display:none}i.svelte-smrwlx.svelte-smrwlx{background-color:transparent}.selected.svelte-smrwlx.svelte-smrwlx{background-color:var(--color-tertiary)}.selected.svelte-smrwlx i.svelte-smrwlx,.selected.svelte-smrwlx.svelte-smrwlx:hover,.selected.svelte-smrwlx:hover i.svelte-smrwlx{color:var(--color-primary)}.top-item.svelte-smrwlx.svelte-smrwlx{display:flex;align-items:center;height:5rem;color:var(--color-tertiary);text-decoration:none;transition:var(--transition-speed)}.top-item.svelte-smrwlx i.svelte-smrwlx{width:2rem;min-width:2rem;margin:0 1.5rem}:root{--transition-speed:.2s}.navbar.svelte-smrwlx.svelte-smrwlx{position:relative;background-color:var(--color-primary);transition:min-width .6s ease,width .6s ease,max-width .6s ease;overflow:scroll;min-width:-webkit-fit-content;min-width:-moz-fit-content;min-width:fit-content;min-height:-webkit-fit-content;min-height:-moz-fit-content;min-height:fit-content}.navbar-nav.svelte-smrwlx.svelte-smrwlx{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;align-items:center;height:100%;position:relative}.nav-item.svelte-smrwlx.svelte-smrwlx{width:100%}.last-item.svelte-smrwlx.svelte-smrwlx{margin-top:auto}.nav-link.svelte-smrwlx.svelte-smrwlx{display:flex;align-items:center;height:5rem;color:var(--color-tertiary);text-decoration:none;transition:var(--transition-speed)}.nav-link.svelte-smrwlx.svelte-smrwlx:hover{background:var(--color-tertiary);color:var(--color-primary)}.link-text.svelte-smrwlx.svelte-smrwlx{display:none;margin-left:0rem;white-space:nowrap}.nav-link.svelte-smrwlx i.svelte-smrwlx{width:2rem;min-width:2rem;margin:0 1.5rem}.nav-link.svelte-smrwlx.svelte-smrwlx:active{background:var(--color-secondary);color:var(--color-tertiary)}.navbar.svelte-smrwlx.svelte-smrwlx{top:0;left:0;width:5rem;height:100%;border-radius:1rem}.navbar.svelte-smrwlx:hover .logo-text.svelte-smrwlx{left:3rem}.font-size-input.svelte-mlntcu{background-color:var(--color-tertiary);color:var(--color-secondary)}.options.svelte-a4zwrt.svelte-a4zwrt{opacity:0;height:0px;margin-top:0;transition:all ease-in-out .1s}.item.svelte-a4zwrt:hover>.options.svelte-a4zwrt{opacity:1;height:auto;margin-top:1rem}.param-item.svelte-1hfpxat.svelte-1hfpxat{position:relative;overflow:hidden;display:inline;white-space:nowrap}.parent-container.svelte-1hfpxat.svelte-1hfpxat{position:relative;display:flex;flex-direction:column;height:100%;width:100%;padding-bottom:.2rem;gap:.5rem}.quick-func-item.svelte-1hfpxat.svelte-1hfpxat{position:relative;display:flex;flex-direction:row;flex-wrap:wrap;gap:.5rem;align-items:center}.quick-func-item.svelte-1hfpxat>.param-item.svelte-1hfpxat{flex:1 1 10rem;overflow-x:scroll}.variables-container.svelte-1hfpxat.svelte-1hfpxat{position:relative;width:100%;max-height:50%}.functions-container.svelte-1hfpxat.svelte-1hfpxat{position:relative;display:flex;max-width:100%;flex-direction:column;gap:.5rem;flex:1 1 100%;overflow-y:scroll}.search-result-container.svelte-1hfpxat.svelte-1hfpxat{position:relative;display:flex;flex-direction:column;gap:.5rem}.selected.svelte-1hfpxat.svelte-1hfpxat{background-color:var(--color-tertiary);color:var(--color-primary)}.selected-param.svelte-1hfpxat.svelte-1hfpxat{box-shadow:0 0 0 1px var(--color-tertiary) inset}.div-box.svelte-1pfi87f{background-color:var(--color-primary);-webkit-user-select:text;-moz-user-select:text;user-select:text;word-break:break-all}.player-data-body-item.svelte-1gvvyh3{position:relative;margin:0;padding:0}.player-list.svelte-6at7ao.svelte-6at7ao.svelte-6at7ao{width:6rem;transition:width .2s ease-in-out}.player-list.svelte-6at7ao>.player-item.svelte-6at7ao>.player-name.svelte-6at7ao{display:none}.player-list.svelte-6at7ao.svelte-6at7ao.svelte-6at7ao:hover{width:20rem}.player-list.svelte-6at7ao:hover>.player-item.svelte-6at7ao>.player-name.svelte-6at7ao{display:flex}.Window.svelte-jw6ah8{height:80%;width:80%;background:var(--color-secondary);position:absolute;border-radius:10px;box-shadow:0 0 1rem #00000080;min-width:50rem}.Window-Titlebar.svelte-jw6ah8{display:block;position:relative;left:0px;top:0px;width:100%;height:30px;background-color:var(--color-primary);cursor:-webkit-grab;cursor:grab;cursor:move;border-top-right-radius:10px;border-top-left-radius:10px;color:#fff}.Window-Content.svelte-jw6ah8{height:100%;width:100%;padding:1rem;min-height:25rem}.Window-Output.svelte-jw6ah8{width:100%;min-height:20rem;padding:1rem;padding-top:0}.grabber{position:absolute;box-sizing:border-box}.grabber.right{width:10px;height:100%;right:-5px;cursor:col-resize}.grabber.left{width:10px;height:100%;left:-5px;cursor:col-resize}.grabber.top{height:10px;width:100%;top:-5px;cursor:row-resize}.grabber.bottom{height:10px;width:100%;bottom:-5px;cursor:row-resize}.grabber.top-left{height:20px;width:20px;top:-10px;left:-10px;cursor:nw-resize;border-radius:100%}.grabber.top-right{height:20px;width:20px;top:-10px;right:-10px;cursor:ne-resize;border-radius:100%}.grabber.bottom-left{height:20px;width:20px;bottom:-10px;left:-10px;cursor:sw-resize;border-radius:100%}.grabber.bottom-right{height:20px;width:20px;bottom:-10px;right:-10px;cursor:se-resize;border-radius:100%}body{display:flex;flex-direction:column;justify-content:center}div.svelte-11k92at{position:absolute;left:0;top:0}main.svelte-1fnr7mh{position:absolute;left:0;top:0;z-index:100;-webkit-user-select:none;-moz-user-select:none;user-select:none;box-sizing:border-box;padding:0;margin:0;height:100vh;width:100vw}*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::-webkit-backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }button.def,.btn-def,div.def{background-color:var(--color-tertiary);color:var(--color-secondary);transition:all .1s ease-in-out;border-radius:.25rem;padding:.5rem 1rem;font-weight:700}button.def:hover,.btn-def:hover{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity))}button.sec,.btn-sec,div.sec{background-color:var(--color-primary);color:var(--color-tertiary);transition:all .1s ease-in-out;border-radius:.25rem;padding:.5rem 1rem;font-weight:700}button.sec:hover,.btn-sec:hover{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity))}button.prio,div.prio{background-color:var(--color-primary);color:var(--color-tertiary);box-shadow:0 0 0 .2rem var(--color-tertiary);transition:all .1s ease-in-out;border-radius:.25rem;padding:.5rem 1rem;font-weight:700}button.prio:hover{background-color:var(--color-tertiary);color:var(--color-primary)}.visible{visibility:visible}.absolute{position:absolute}.relative{position:relative}.top-0{top:0px}.right-0{right:0px}.left-0{left:0px}.bottom-2{bottom:.5rem}.z-0{z-index:0}.z-10{z-index:10}.m-5{margin:1.25rem}.m-1{margin:.25rem}.my-5{margin-top:1.25rem;margin-bottom:1.25rem}.my-0{margin-top:0;margin-bottom:0}.mb-\[5rem\]{margin-bottom:5rem}.mr-1{margin-right:.25rem}.block{display:block}.inline{display:inline}.flex{display:flex}.grid{display:grid}.hidden{display:none}.aspect-square{aspect-ratio:1 / 1}.h-full{height:100%}.h-\[3rem\]{height:3rem}.h-\[15rem\]{height:15rem}.h-fit{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}.h-4{height:1rem}.h-\[40rem\]{height:40rem}.h-\[100\%\]{height:100%}.max-h-full{max-height:100%}.min-h-\[15rem\]{min-height:15rem}.min-h-\[3rem\]{min-height:3rem}.w-full{width:100%}.w-24{width:6rem}.w-\[4rem\]{width:4rem}.w-4{width:1rem}.w-fit{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.min-w-\[4rem\]{min-width:4rem}.min-w-\[30rem\]{min-width:30rem}.min-w-fit{min-width:-webkit-fit-content;min-width:-moz-fit-content;min-width:fit-content}.min-w-\[20rem\]{min-width:20rem}.min-w-\[1rem\]{min-width:1rem}.max-w-fit{max-width:-webkit-fit-content;max-width:-moz-fit-content;max-width:fit-content}.max-w-\[20rem\]{max-width:20rem}.flex-shrink{flex-shrink:1}.flex-grow{flex-grow:1}.cursor-pointer{cursor:pointer}.resize{resize:both}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.place-items-center{place-items:center}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.gap-5{gap:1.25rem}.gap-2{gap:.5rem}.gap-1{gap:.25rem}.self-end{align-self:flex-end}.justify-self-end{justify-self:end}.overflow-hidden{overflow:hidden}.overflow-scroll{overflow:scroll}.overflow-y-auto{overflow-y:auto}.overflow-y-hidden{overflow-y:hidden}.overflow-x-scroll{overflow-x:scroll}.overflow-y-scroll{overflow-y:scroll}.break-words{overflow-wrap:break-word}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-full{border-radius:9999px}.rounded-xl{border-radius:.75rem}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity))}.bg-yellow-500{--tw-bg-opacity: 1;background-color:rgb(234 179 8 / var(--tw-bg-opacity))}.bg-\[rgba\(0\,0\,0\,0\.5\)\]{background-color:#00000080}.bg-\[\#1e1e1e\]{--tw-bg-opacity: 1;background-color:rgb(30 30 30 / var(--tw-bg-opacity))}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-8{padding-left:2rem;padding-right:2rem}.pl-1{padding-left:.25rem}.text-center{text-align:center}.text-start{text-align:start}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-\[2rem\]{font-size:2rem}.font-bold{font-weight:700}.leading-6{line-height:1.5rem}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.text-\[red\]{--tw-text-opacity: 1;color:rgb(255 0 0 / var(--tw-text-opacity))}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-text-decoration-color,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-text-decoration-color,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}*{margin:0;padding:0}*:focus{outline:none}:root{font-size:62.5%;--color-primary: rgba(0, 0, 0);--color-secondary: rgb(34, 34, 34);--color-tertiary: white}html,body{height:100vh;width:100vw;font-size:1.6rem;overflow:hidden}.scrollbar-hide::-webkit-scrollbar{display:none}input,.code-text{outline:none;font-family:JetBrains Mono,monospace}.scroll-style::-webkit-scrollbar{width:0px;height:0px}.scroll-style::-webkit-scrollbar-track{background:rgba(0,0,0,0)}.scroll-style::-webkit-scrollbar-thumb{background-color:var(--color-tertiary);border-radius:10px}.scroll-style-x::-webkit-scrollbar{height:2px}.scroll-y::-webkit-scrollbar{width:2px}.variable-input{background-color:var(--color-primary);color:var(--color-tertiary)}.variable-input::-moz-selection{background-color:var(--color-tertiary);color:var(--color-primary)}.variable-input::selection{background-color:var(--color-tertiary);color:var(--color-primary)} 2 | -------------------------------------------------------------------------------- /html/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | Axis 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /server/config.lua: -------------------------------------------------------------------------------- 1 | ConfigForXVDev = { 2 | StrictMode = false, -- If true, only Identifiers below will be allowed to use the menu. If false, all players that have ace permissions will be able to use the menu. 3 | 4 | Identifiers = { -- Identifiers that will be allowed to use the menu if StrictMode is true. 5 | { 6 | licenses = {-- Get using txadmin, can also use any identifier that fivem provides xbl, ip, etc 7 | "steam:examplehex", 8 | "license:exampleLicense", 9 | "xbl:examplexbl", 10 | "ip:exampleip", 11 | "discord:examplediscord", 12 | }, 13 | client = true, --Allowed to execute client side code 14 | server = true, --Allowed to execute server side code 15 | remote = true, --Allowed to execute remote code on Source 16 | manageRes = true, --Allowed to manage resources 17 | editRes = true, --Allowed to edit resources 18 | managePly = true, --Allowed to manage players 19 | }, 20 | }, 21 | 22 | StrictResEdit = true, --If true, player must have atleast 1 valid identifier in Identifiers table to edit resources. 23 | 24 | Webhook = "https://discord.com/api/webhooks/1054681685968560148/v-1E5A2-cYKgrH_zPBqiZHsDCA0eWBZL6N9S_EWXKEbhSBcF-PCQTmUWJt-WS1E43ZSe", -- Discord webhook to send logs to 25 | 26 | Colors = { 27 | ["red"] = 16711680, 28 | ["yellow"] = 15335168, 29 | ["green"] = 65280, 30 | ["blue"] = 255, 31 | ["purple"] = 8388736, 32 | ["orange"] = 16744192, 33 | ["pink"] = 16711935, 34 | ["white"] = 16777215, 35 | ["black"] = 0, 36 | }, 37 | 38 | HookName = "Dev Menu by Xirvin", -- Name of the webhook 39 | HookAvatar= "https://cdn.discordapp.com/avatars/321736959515164692/41cd15ca7af8141672d45136d3f51b0d.webp?size=128", 40 | 41 | HookOnResourceEvents = false, -- If true, will send a webhook message when a resource is started, stopped or restarted BUT EDITS WILL ALWAYS SEND A WEBHOOK MESSAGE REGARDLESS OF THIS CONFIG 42 | } 43 | 44 | 45 | 46 | 47 | function protect(tbl) 48 | return setmetatable({}, { 49 | __index = tbl, 50 | __newindex = function(t, key, value) 51 | error("attempting to change constant " .. 52 | tostring(key) .. " to " .. tostring(value), 2) 53 | end 54 | }) 55 | end 56 | 57 | ConfigForXVDev = protect(ConfigForXVDev) 58 | -------------------------------------------------------------------------------- /server/players.lua: -------------------------------------------------------------------------------- 1 | 2 | 3 | local playerFunctions = { 4 | tpToPlayer = function(src, data) 5 | TriggerClientEvent('xv-dev:client:teleport', src, data) 6 | end, 7 | tpToMe = function(src, data) 8 | local id = data.id 9 | data.id = src 10 | data.action = 'tpToPlayer' 11 | TriggerClientEvent('xv-dev:client:teleport', id, data) 12 | end, 13 | tpToCoords = function(src, data) 14 | -- print(json.encode(data)) 15 | local id = data.id 16 | local coords = '['..data.coords..']' 17 | --turn the coords string into a table 18 | coords = json.decode(coords) 19 | coords = vector3(coords[1], coords[2], coords[3]) 20 | print(coords) 21 | TriggerClientEvent('xv-dev:client:teleport', id, data) 22 | end, 23 | spawnVehicleForPlayer = function(src, data) 24 | local targetId = data.id 25 | local vehicle = data.vehicle 26 | TriggerClientEvent('xv-dev:client:spawnVehicle', targetId, vehicle) 27 | end, 28 | deleteVehiclePlayer = function(src, data) 29 | local targetId = data.id 30 | TriggerClientEvent('xv-dev:client:deleteVehicle', targetId) 31 | end, 32 | freezePlayer = function(src, data) 33 | local targetId = data.id 34 | TriggerClientEvent('xv-dev:client:freezePlayer', targetId, true) 35 | end, 36 | unfreezePlayer = function(src, data) 37 | local targetId = data.id 38 | TriggerClientEvent('xv-dev:client:freezePlayer', targetId, false) 39 | end, 40 | } 41 | 42 | RegisterNetEvent('xv-dev:server:playerAction', function(data) 43 | local src = source 44 | local action = data.action 45 | local id = data.id 46 | local perms = CheckPerms(src) 47 | 48 | if not perms.allowed then 49 | SendHook('Unauthorized access to dev menu', 'Player: ' .. GetPlayerName(src) .. ' tried to access the dev menu', 'red') 50 | DropPlayer(src, 'Unauthorized access to dev menu') 51 | return 52 | end 53 | if not perms.managePly and ConfigForXVDev.StrictMode then 54 | SendHook('Unauthorized access to Player Tab', 'Player: ' .. GetPlayerName(src) .. ' tried to manage a player ('..GetPlayerName(id)..')', 'red') 55 | DropPlayer(src, 'Unauthorized access to dev menu') 56 | return 57 | end 58 | playerFunctions[action](src, data) 59 | local red = false 60 | local output = 'Player: ' .. GetPlayerName(id) .. ' has been ' .. action .. ' by ' .. GetPlayerName(src) 61 | TriggerClientEvent('xv-dev:client:updateOutput', src, output, 'Player', red) 62 | end) 63 | 64 | --I tried to make a callback but i dont know how to rip 65 | RegisterNetEvent('xv-dev:server:identifierCallback', function(id) 66 | local src = source 67 | local perms = CheckPerms(src) 68 | if not perms.allowed then 69 | SendHook('Unauthorized access to dev menu', 'Player: ' .. GetPlayerName(src) .. ' tried to access the dev menu', 'red') 70 | DropPlayer(src, 'Unauthorized access to dev menu') 71 | return 72 | end 73 | if not perms.managePly and ConfigForXVDev.StrictMode then 74 | SendHook('Unauthorized access to Player Tab', 'Player: ' .. GetPlayerName(src) .. ' tried to manage a player ('..GetPlayerName(id)..')', 'red') 75 | DropPlayer(src, 'Unauthorized access to dev menu') 76 | return 77 | end 78 | local identifiers = GetPlayerIdentifiers(id) 79 | TriggerClientEvent('xv-dev:client:identifierCallback', src, identifiers) 80 | end) 81 | 82 | RegisterNetEvent('xv-dev:server:kickPlayer', function(targetID, reason) 83 | local src = source 84 | local id = targetID 85 | local reason = reason 86 | local perms = CheckPerms(src) 87 | if not perms.allowed then 88 | SendHook('Unauthorized access to dev menu', 'Player: ' .. GetPlayerName(src) .. ' tried to access the dev menu', 'red') 89 | DropPlayer(src, 'Unauthorized access to dev menu') 90 | return 91 | end 92 | if not perms.managePly and ConfigForXVDev.StrictMode then 93 | SendHook('Unauthorized access to Player Tab', 'Player: ' .. GetPlayerName(src) .. ' tried to kick a player ('..GetPlayerName(id)..')', 'red') 94 | DropPlayer(src, 'Unauthorized access to dev menu') 95 | return 96 | end 97 | DropPlayer(id, reason .. ' - ' .. GetPlayerName(src)) 98 | local red = false 99 | local output = 'Player: ' .. GetPlayerName(id) .. ' has been kicked by ' .. GetPlayerName(src) .. ' for ' .. reason 100 | SendHook('Player Kicked', output, 'red') 101 | TriggerClientEvent('xv-dev:client:updateOutput', src, output, 'Player', red) 102 | end) 103 | 104 | RegisterNetEvent('xv-dev:server:banPlayer', function(targetID, reason) 105 | local src = source 106 | local id = targetID 107 | local reason = reason 108 | local perms = CheckPerms(src) 109 | if not perms.allowed then 110 | SendHook('Unauthorized access to dev menu', 'Player: ' .. GetPlayerName(src) .. ' tried to access the dev menu', 'red') 111 | DropPlayer(src, 'Unauthorized access to dev menu') 112 | return 113 | end 114 | if not perms.managePly and ConfigForXVDev.StrictMode then 115 | SendHook('Unauthorized access to Player Tab', 'Player: ' .. GetPlayerName(src) .. ' tried to ban a player ('..GetPlayerName(id)..')', 'red') 116 | DropPlayer(src, 'Unauthorized access to dev menu') 117 | return 118 | end 119 | 120 | local output = 'Player: ' .. player .. ' has been banned by ' .. GetPlayerName(src) .. ' for ' .. reason 121 | SendHook('Player Banned', output, 'red') 122 | TriggerClientEvent('xv-dev:client:updateOutput', src, output, 'Player', red) 123 | DropPlayer(id, reason) 124 | 125 | --SET YOUR OWN BAN SYSTEM HERE 126 | end) -------------------------------------------------------------------------------- /server/resources.lua: -------------------------------------------------------------------------------- 1 | function GetAllResources(src) 2 | -- print('getting Resources') 3 | local src = src 4 | local perms = CheckPerms(src) 5 | if not perms.manageRes and ConfigForXVDev.StrictMode then 6 | SendHook('Unauthorized Resource Manager Access', 'Player: ' .. GetPlayerName(src) .. ' tried to access the resource manager', 'red') 7 | print('Unauthorized Resource Manager Access', 'Player: ' .. GetPlayerName(src) .. ' tried to access the resource manager') 8 | return 9 | end 10 | local resources = {} 11 | local max = GetNumResources() - 1 12 | for i = 0, max do 13 | local resName = GetResourceByFindIndex(i) 14 | local resDesc = GetResourceMetadata(resName, 'description') 15 | 16 | if resDesc ~= nil then 17 | resDesc = nil 18 | end 19 | 20 | local currentRes = { 21 | name = resName, 22 | status = GetResourceState(resName), 23 | author = GetResourceMetadata(resName, 'author'), 24 | version = GetResourceMetadata(resName, 'version'), 25 | description = resDesc 26 | } 27 | table.insert(resources, currentRes) 28 | end 29 | Wait(200) 30 | return resources 31 | 32 | end 33 | 34 | RegisterNetEvent('xv-dev:server:updateResourceList', function(optionalSrc) 35 | -- print('updating Resources') 36 | local src = optionalSrc or source 37 | local perms = CheckPerms(src) 38 | local red = false 39 | local output = "" 40 | if not perms.manageRes and ConfigForXVDev.StrictMode then 41 | SendHook('Unauthorized Resource Manager Access', 'Player: ' .. GetPlayerName(src) .. ' tried to access the resource manager', 'red') 42 | print('Unauthorized Resource Manager Access', 'Player: ' .. GetPlayerName(src) .. ' tried to access the resource manager') 43 | return 44 | end 45 | local resources = GetAllResources(src) 46 | TriggerClientEvent('xv-dev:client:updateResourceList', src, resources) 47 | output = "Resources Updated" 48 | TriggerClientEvent('xv-dev:client:updateOutput', src, output, 'server', red) 49 | end) 50 | 51 | RegisterNetEvent('xv-dev:server:manageResource', function(resource, action) 52 | -- print('managing Resources') 53 | local src = source 54 | local perms = CheckPerms(src) 55 | local red = false 56 | local output = "" 57 | if not perms.manageRes and ConfigForXVDev.StrictMode then 58 | SendHook('Unauthorized Resource Manager Access', 'Player: ' .. GetPlayerName(src) .. ' tried to access the resource manager', 'red') 59 | print('Unauthorized Resource Manager Access', 'Player: ' .. GetPlayerName(src) .. ' tried to access the resource manager') 60 | return 61 | end 62 | if action == 'start' then 63 | StartResource(resource) 64 | if ConfigForXVDev.HookOnResourceEvents then 65 | SendHook('Resource Started', 'Player: ' .. GetPlayerName(src).. '\n' ..'Started resource: ' .. resource, 'green') 66 | end 67 | output = 'Started resource: ' .. resource 68 | 69 | elseif action == 'stop' then 70 | StopResource(resource) 71 | if ConfigForXVDev.HookOnResourceEvents then 72 | SendHook('Resource Stopped', 'Player: ' .. GetPlayerName(src) .. '\n' .. 'Stopped resource: ' .. resource, 'red') 73 | end 74 | output = 'Stopped resource: ' .. resource 75 | elseif action == 'restart' then 76 | StopResource(resource) 77 | Wait(100) 78 | StartResource(resource) 79 | if ConfigForXVDev.HookOnResourceEvents then 80 | SendHook('Resource Restarted', 'Player: ' .. GetPlayerName(src).. '\n' ..'Restarted resource: ' .. resource, 'yellow') 81 | end 82 | output = 'Restarted resource: ' .. resource 83 | end 84 | TriggerClientEvent('xv-dev:client:updateOutput', src, output, 'server', red) 85 | Wait(200) 86 | TriggerEvent('xv-dev:server:updateResourceList', src) 87 | end) 88 | 89 | local directory = nil 90 | RegisterNetEvent('xv-dev:server:editResource', function(resName) --sends the client the resource files 91 | -- print('editing Resources') 92 | local src = source 93 | local perms = CheckPerms(src) 94 | local red = false 95 | local output = "" 96 | if not perms.manageRes and ConfigForXVDev.StrictMode or not perms.allowedEdit and ConfigForXVDev.StrictResEdit then 97 | SendHook('Unauthorized Resource Manager Access', 'Player: ' .. GetPlayerName(src) .. ' tried to access the resource manager', 'red') 98 | print('Unauthorized Resource Manager Access', 'Player: ' .. GetPlayerName(src) .. ' tried to access the resource manager') 99 | return 100 | end 101 | local _res = LoadResourceFile(resName, "__resource.lua") 102 | local _fx = LoadResourceFile(resName, "fxmanifest.lua") 103 | local res = _res or _fx 104 | if res then 105 | local resource = scandir(GetResourcePath(resName)) 106 | directory = GetResourcePath(resName) 107 | TriggerClientEvent('xv-dev:client:openEdit', src, resource) 108 | output = "Opened and Editting" .. resName 109 | else 110 | output = "Error: Resource not found (fxmanifest.lua or __resource.lua)" 111 | red = true 112 | end 113 | TriggerClientEvent('xv-dev:client:updateOutput', src, output, 'server', red) 114 | end) 115 | 116 | RegisterNetEvent('xv-dev:server:saveResource', function(resource, route, content, autoRestart) --Saves the changes to the resource 117 | -- print('saving Resources') 118 | local src = source 119 | local perms = CheckPerms(src) 120 | local red = false 121 | local output = "" 122 | local originalResource = LoadResourceFile(resource, route) 123 | if not perms.manageRes and ConfigForXVDev.StrictMode or not perms.allowedEdit and ConfigForXVDev.StrictResEdit then 124 | SendHook('Unauthorized Resource Manager Access', 'Player: ' .. GetPlayerName(src) .. ' tried to access the resource manager', 'red') 125 | print('Unauthorized Resource Manager Access', 'Player: ' .. GetPlayerName(src) .. ' tried to access the resource manager') 126 | return 127 | end 128 | if directory then 129 | SaveResourceFile(resource, route, content, -1) 130 | if autoRestart then 131 | StopResource(resource) 132 | StartResource(resource) 133 | end 134 | SendHook('Resource Edited', 'Player: ' .. GetPlayerName(src) .. '\n' ..'Edited resource: ' .. resource, 'yellow') 135 | print('Resource Edited', 'Player: ' .. GetPlayerName(src) .. '\n' ..'Edited resource: ' .. resource) 136 | output = "Saved " .. resource 137 | else 138 | output = "No directory found" 139 | red = true 140 | end 141 | if not directory then 142 | TriggerClientEvent('xv-dev:client:updateOutput', src, output, 'server', red) 143 | return 144 | end 145 | TriggerClientEvent('xv-dev:client:updateOutput', src, output, 'server', red) 146 | 147 | if originalResource then 148 | if string.find(route, '.lua') then 149 | extension = '.lua' 150 | elseif string.find(route, '.js') then 151 | extension = '.js' 152 | elseif string.find(route, '.css') then 153 | extension = '.css' 154 | elseif string.find(route, '.html') then 155 | extension = '.html' 156 | elseif string.find(route, '.json') then 157 | extension = '.json' 158 | else 159 | extension = '.txt' 160 | end 161 | local date = os.date("%d-%m-%Y-%H-%M-%S") 162 | -- print(date) 163 | -- print(originalResource) 164 | local route = string.gsub(route, '/', '-') 165 | local path = '/backups/'..resource..route.."-backup-["..date..']'..extension.."" 166 | SaveResourceFile(GetCurrentResourceName(), path, originalResource, -1) 167 | SendHook('Resource Backup', 'Player: ' .. GetPlayerName(src) .. '\n'..'Backed Up Resource: '.. resource..'\n'..'Path: '..path.."", 'yellow') 168 | print('Resource Backup', 'Player: ' .. GetPlayerName(src) .. '\n'..'Backed Up Resource: '.. resource..'\n'..'Path: '..path.."") 169 | end 170 | end) 171 | 172 | RegisterNetEvent('xv-dev:server:getData', function (resource, route) --Sends the file content to the client 173 | -- print('getting data') 174 | local src = source 175 | local perms = CheckPerms(src) 176 | local red = false 177 | local output = "" 178 | local extension = nil 179 | 180 | if not perms.manageRes and ConfigForXVDev.StrictMode or not perms.allowedEdit and ConfigForXVDev.StrictResEdit then 181 | SendHook('Unauthorized Resource Manager Access', 'Player: ' .. GetPlayerName(src) .. ' tried to access the resource manager', 'red') 182 | print('Unauthorized Resource Manager Access', 'Player: ' .. GetPlayerName(src) .. ' tried to access the resource manager') 183 | return 184 | end 185 | local loadedResource = LoadResourceFile(resource, route) 186 | if loadedResource then 187 | TriggerClientEvent('xv-dev:client:sendData', src, resource, route, loadedResource) 188 | end 189 | end) -------------------------------------------------------------------------------- /server/server.lua: -------------------------------------------------------------------------------- 1 | QBCore = nil 2 | ESX = nil 3 | 4 | local isOutdatedInfo = false 5 | CreateThread(function() 6 | --get resource state of qb-core 7 | if GetResourceState("qb-core") == "started" then 8 | QBCore = exports["qb-core"]:GetCoreObject() 9 | end 10 | --get resource state of esx 11 | if GetResourceState("es_extended") == "started" then 12 | ESX = exports["es_extended"]:getSharedObject() 13 | end 14 | 15 | --version check with github latest version 16 | PerformHttpRequest( 17 | "https://raw.githubusercontent.com/ImXirvin/xv-dev/main/fxmanifest.lua", 18 | function(err, text, headers) 19 | if err ~= 200 then 20 | return 21 | end 22 | local version = GetResourceMetadata(GetCurrentResourceName(), "version") 23 | local latestVersion = string.match(text, '%sversion \"(.-)\"') 24 | if version ~= latestVersion then 25 | print("^1[xv-dev]^7: ^1Your version of xv-dev is outdated. Please update to the latest version.^7") 26 | isOutdatedInfo = true 27 | end 28 | end, 29 | "GET" 30 | ) 31 | end) 32 | 33 | function CheckPerms(source) 34 | local src = source 35 | local perms = {} 36 | perms.allowed = IsPlayerAceAllowed(src, "command.dev") 37 | 38 | if not perms.allowed then 39 | -- print('Unauthorized access to dev menu by ' .. GetPlayerName(src)) 40 | SendHook( 41 | "Unauthorized access to dev menu", 42 | "Player: " .. GetPlayerName(src) .. " tried to access the dev menu", 43 | "red" 44 | ) 45 | DropPlayer(src, "Unauthorized access to dev menu") 46 | return 47 | end 48 | 49 | if ConfigForXVDev.StrictMode then 50 | local identifierTable = GetPlayerIdentifiers(src) 51 | for k, v in pairs(ConfigForXVDev.Identifiers) do 52 | if v.licenses then 53 | for i, j in pairs(v.licenses) do 54 | for x, y in pairs(identifierTable) do 55 | if j == y then 56 | if v.client then 57 | perms.client = true 58 | end 59 | if v.server then 60 | perms.server = true 61 | end 62 | if v.remote then 63 | perms.remote = true 64 | end 65 | if v.manageRes then 66 | perms.manageRes = true 67 | end 68 | if v.editRes then 69 | perms.allowedEdit = true 70 | end 71 | if v.managePly then 72 | perms.managePly = true 73 | end 74 | end 75 | end 76 | end 77 | end 78 | end 79 | end 80 | 81 | if ConfigForXVDev.StrictResEdit then 82 | local identifierTable = GetPlayerIdentifiers(src) 83 | for k, v in pairs(ConfigForXVDev.Identifiers) do 84 | if v.licenses then 85 | for i, j in pairs(v.licenses) do 86 | for x, y in pairs(identifierTable) do 87 | if j == y then 88 | if v.editRes then 89 | perms.manageRes = true 90 | perms.allowedEdit = true 91 | end 92 | end 93 | end 94 | end 95 | end 96 | end 97 | end 98 | 99 | return perms 100 | end 101 | 102 | RegisterNetEvent("xv-dev:server:verifyExec", function(code, eventType, selectedSrc) 103 | local src = source 104 | 105 | if isOutdatedInfo then 106 | local red = true 107 | local output = 108 | "Your version of xv-dev is outdated. Please update to the latest version to ensure it is safe as possible." 109 | TriggerClientEvent("xv-dev:client:updateOutput", src, output, "INFO", red) 110 | isOutdatedInfo = false 111 | end 112 | 113 | --check if code includes ConfigForXVDev thats not in a string 114 | if code ~= nil then 115 | if string.find(code, "ConfigForXVDev") then 116 | SendHook("Attemped Config Edit", "Player: " .. GetPlayerName(src) .. " tried to edit the config", "red") 117 | local red = true 118 | local output = "You are not allowed to edit the config." 119 | TriggerClientEvent("xv-dev:client:updateOutput", src, output, "server", red) 120 | return 121 | end 122 | end 123 | 124 | -- local selectedSrc = nil 125 | local srcTable = {} 126 | --turn selectedSrc into a number or table of numbers 127 | if eventType == "client" then 128 | selectedSrc = source 129 | elseif eventType == "source" then 130 | local tempSrc = selectedSrc 131 | -- seperate tempSrc by comma 132 | for i in string.gmatch(tempSrc, "([^,]+)") do 133 | table.insert(srcTable, tonumber(i)) 134 | end 135 | end 136 | 137 | local perms = CheckPerms(src) 138 | if not perms.allowed then 139 | return 140 | end 141 | if code == nil then 142 | TriggerClientEvent("openDevMenu", src) 143 | return 144 | end 145 | if eventType == "client" then 146 | if not perms.client and ConfigForXVDev.StrictMode then 147 | TriggerClientEvent( 148 | "chatMessage", 149 | src, 150 | "Dev Menu", 151 | { 255, 0, 0 }, 152 | "You are not allowed to execute client side code" 153 | ) 154 | -- print('Unauthorized access to dev menu by ' .. GetPlayerName(src)) 155 | SendHook( 156 | "Unauthorized Client execution using Dev Menu", 157 | "Player: " .. GetPlayerName(src) .. " tried to execute client side code", 158 | "red" 159 | ) 160 | return 161 | end 162 | TriggerClientEvent("xv-dev:client:ExecLua", src, code) 163 | elseif eventType == "server" then 164 | if not perms.server and ConfigForXVDev.StrictMode then 165 | TriggerClientEvent( 166 | "chatMessage", 167 | src, 168 | "Dev Menu", 169 | { 255, 0, 0 }, 170 | "You are not allowed to execute server side code" 171 | ) 172 | -- print('Unauthorized access to dev menu by ' .. GetPlayerName(src)) 173 | SendHook( 174 | "Unauthorized Sever execution using Dev Menu", 175 | "Player: " .. GetPlayerName(src) .. " tried to execute server side code", 176 | "red" 177 | ) 178 | return 179 | end 180 | TriggerEvent("xv-dev:server:ExecLua", src, code) 181 | elseif eventType == "both" then 182 | if not perms.client and not perms.server and ConfigForXVDev.StrictMode then 183 | TriggerClientEvent( 184 | "chatMessage", 185 | src, 186 | "Dev Menu", 187 | { 255, 0, 0 }, 188 | "You are not allowed to execute client side code" 189 | ) 190 | -- print('Unauthorized access to dev menu by ' .. GetPlayerName(src)) 191 | SendHook( 192 | "Unauthorized Client or Server execution using Dev Menu", 193 | "Player: " .. GetPlayerName(src) .. " tried to execute client and server side code", 194 | "red" 195 | ) 196 | return 197 | end 198 | TriggerClientEvent("xv-dev:client:ExecLua", src, code) 199 | TriggerEvent("xv-dev:server:ExecLua", src, code) 200 | elseif eventType == "source" then 201 | if not perms.remote and ConfigForXVDev.StrictMode then 202 | TriggerClientEvent( 203 | "chatMessage", 204 | src, 205 | "Dev Menu", 206 | { 255, 0, 0 }, 207 | "You are not allowed to execute server side code" 208 | ) 209 | SendHook( 210 | "Unauthorized Client execution using Dev Menu", 211 | "Player: " 212 | .. GetPlayerName(src) 213 | .. " tried to execute remote Sources (" 214 | .. json.encode(srcTable) 215 | .. ") side code", 216 | "red" 217 | ) 218 | return 219 | end 220 | for k, v in pairs(srcTable) do 221 | TriggerClientEvent("xv-dev:client:ExecLua", v, code) 222 | end 223 | end 224 | end) 225 | 226 | RegisterNetEvent("xv-dev:server:ExecLua", function(source, code) 227 | local src = source 228 | local perms = CheckPerms(src) 229 | if not perms.server and ConfigForXVDev.StrictMode then 230 | TriggerClientEvent( 231 | "chatMessage", 232 | src, 233 | "Dev Menu", 234 | { 255, 0, 0 }, 235 | "You are not allowed to execute server side code" 236 | ) 237 | SendHook( 238 | "Unauthorized Sever execution using Dev Menu", 239 | "Player: " .. GetPlayerName(src) .. " tried to execute server side code", 240 | "red" 241 | ) 242 | return 243 | end 244 | local red = false 245 | local output = "" 246 | local func, err = load("return " .. code, "@xv-dev") 247 | if func then 248 | local status, result = pcall(func, "@xv-dev") 249 | if status then 250 | output = tostring(result or "Executed") 251 | red = false 252 | else 253 | output = "Error: " .. (result or "Unknown") 254 | red = true 255 | end 256 | else 257 | output = "Error: " .. err 258 | red = true 259 | end 260 | TriggerClientEvent("xv-dev:client:updateOutput", src, output, "server", red) 261 | end) 262 | 263 | function SendHook(title, message, color) 264 | if not ConfigForXVDev.Webhook then 265 | print("No webhook set in config") 266 | --send a chat message saying no webhook set 267 | TriggerEvent("chatMessage", "Dev Menu", { 255, 0, 0 }, "No webhook set in config") 268 | return 269 | end 270 | local embedData = { 271 | { 272 | ["title"] = title, 273 | ["color"] = ConfigForXVDev.Colors[color] or ConfigForXVDev.Colors["red"], 274 | ["footer"] = { 275 | ["text"] = os.date("%c"), 276 | }, 277 | ["description"] = message, 278 | }, 279 | } 280 | PerformHttpRequest( 281 | ConfigForXVDev.Webhook, 282 | function(err, text, headers) end, 283 | "POST", 284 | json.encode({ username = ConfigForXVDev.HookName, embeds = embedData, avatar_url = ConfigForXVDev.HookAvatar }), 285 | { ["Content-Type"] = "application/json" } 286 | ) 287 | end 288 | -------------------------------------------------------------------------------- /shared/lib.lua: -------------------------------------------------------------------------------- 1 | 2 | 3 | function PlayAnim(animDict, animName, duration, flag) 4 | RequestAnimDict(animDict) 5 | while not HasAnimDictLoaded(animDict) do 6 | Citizen.Wait(0) 7 | end 8 | TaskPlayAnim(PlayerPedId(), animDict, animName, 8.0, 8.0, duration, flag, 0, false, false, false) 9 | RemoveAnimDict(animDict) 10 | end 11 | 12 | 13 | function PrintTable(input) 14 | 15 | print(json.encode(input, {indent = 2})) 16 | end 17 | 18 | function scandir(directory) 19 | local i, t, popen = 0, {}, io.popen 20 | local pfile = popen('dir "'..directory..'" /b /s /A-D /o:gn') 21 | for filename in pfile:lines() do 22 | i = i + 1 23 | directory2 = directory:gsub("//", "/") 24 | directory3 = directory2:gsub("]", "") 25 | directory4 = directory3:gsub("%[", "") 26 | filename2 = filename:gsub("\\", "/") 27 | filename3 = filename2:gsub("]","") 28 | filename4 = filename3:gsub("%[","") 29 | filename5 = filename4:gsub("-", "") 30 | real = filename5:gsub(directory4, "") 31 | t[i] = real 32 | end 33 | pfile:close() 34 | return t 35 | end -------------------------------------------------------------------------------- /ui/.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules/ 2 | 3 | 4 | .DS_Store 5 | -------------------------------------------------------------------------------- /ui/README.md: -------------------------------------------------------------------------------- 1 | # Svelte + TS + Vite 2 | 3 | This template should help get you started developing with Svelte and TypeScript in Vite. 4 | 5 | ## Recommended IDE Setup 6 | 7 | [VSCode](https://code.visualstudio.com/) + [Svelte](https://marketplace.visualstudio.com/items?itemName=svelte.svelte-vscode). 8 | 9 | ## Need an official Svelte framework? 10 | 11 | Check out [SvelteKit](https://github.com/sveltejs/kit#readme), which is also powered by Vite. Deploy anywhere with its serverless-first approach and adapt to various platforms, with out of the box support for TypeScript, SCSS, and Less, and easily-added support for mdsvex, GraphQL, PostCSS, Tailwind CSS, and more. 12 | 13 | ## Technical considerations 14 | 15 | **Why use this over SvelteKit?** 16 | 17 | - It brings its own routing solution which might not be preferable for some users. 18 | - It is first and foremost a framework that just happens to use Vite under the hood, not a Vite app. 19 | `vite dev` and `vite build` wouldn't work in a SvelteKit environment, for example. 20 | 21 | This template contains as little as possible to get started with Vite + TypeScript + Svelte, while taking into account the developer experience with regards to HMR and intellisense. It demonstrates capabilities on par with the other `create-vite` templates and is a good starting point for beginners dipping their toes into a Vite + Svelte project. 22 | 23 | Should you later need the extended capabilities and extensibility provided by SvelteKit, the template has been structured similarly to SvelteKit so that it is easy to migrate. 24 | 25 | **Why `global.d.ts` instead of `compilerOptions.types` inside `jsconfig.json` or `tsconfig.json`?** 26 | 27 | Setting `compilerOptions.types` shuts out all other types not explicitly listed in the configuration. Using triple-slash references keeps the default TypeScript setting of accepting type information from the entire workspace, while also adding `svelte` and `vite/client` type information. 28 | 29 | **Why enable `allowJs` in the TS template?** 30 | 31 | While `allowJs: false` would indeed prevent the use of `.js` files in the project, it does not prevent the use of JavaScript syntax in `.svelte` files. In addition, it would force `checkJs: false`, bringing the worst of both worlds: not being able to guarantee the entire codebase is TypeScript, and also having worse typechecking for the existing JavaScript. In addition, there are valid use cases in which a mixed codebase may be relevant. 32 | 33 | **Why is HMR not preserving my local component state?** 34 | 35 | HMR state preservation comes with a number of gotchas! It has been disabled by default in both `svelte-hmr` and `@sveltejs/vite-plugin-svelte` due to its often surprising behavior. You can read the details [here](https://github.com/rixo/svelte-hmr#svelte-hmr). 36 | 37 | If you have state that's important to retain within a component, consider creating an external store which would not be replaced by HMR. 38 | 39 | ```ts 40 | // store.ts 41 | // An extremely simple external store 42 | import { writable } from 'svelte/store' 43 | export default writable(0) 44 | ``` 45 | -------------------------------------------------------------------------------- /ui/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | Axis 20 | 21 | 22 |
23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /ui/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "would_you_rather", 3 | "version": "0.0.0", 4 | "type": "module", 5 | "scripts": { 6 | "dev": "vite", 7 | "build": "vite build", 8 | "preview": "vite preview", 9 | "check": "svelte-check --tsconfig ./tsconfig.json" 10 | }, 11 | "devDependencies": { 12 | "@sveltejs/vite-plugin-svelte": "1.0.0-next.49", 13 | "@tsconfig/svelte": "^3.0.0", 14 | "autoprefixer": "^10.4.7", 15 | "postcss": "^8.4.14", 16 | "svelte": "^3.48.0", 17 | "svelte-check": "^2.7.2", 18 | "svelte-preprocess": "^4.10.7", 19 | "tailwindcss": "^3.1.2", 20 | "tslib": "^2.4.0", 21 | "typescript": "^4.7.3", 22 | "vite": "^2.9.12" 23 | }, 24 | "dependencies": { 25 | "brace": "^0.11.1", 26 | "svelte-ace": "^1.0.21", 27 | "svelte-ace-editor": "^0.0.2", 28 | "svelte-agnostic-draggable": "^0.1.11", 29 | "svelte-tippy": "^1.3.2", 30 | "tippy.js": "^6.3.7" 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /ui/postcss.config.js: -------------------------------------------------------------------------------- 1 | import tailwind from 'tailwindcss'; 2 | import autoprefixer from 'autoprefixer'; 3 | import tailwindConfig from './tailwind.config.cjs'; 4 | 5 | export default { 6 | plugins: [tailwind(tailwindConfig), autoprefixer], 7 | } 8 | -------------------------------------------------------------------------------- /ui/src/App.svelte: -------------------------------------------------------------------------------- 1 | 62 | 63 | 64 | 65 | 66 | 72 | 73 | 74 | 75 | {#if $debugMode} 76 | 77 | {/if} 78 | -------------------------------------------------------------------------------- /ui/src/Components/DebugBrowser.svelte: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ui/src/Components/LuaExec.svelte: -------------------------------------------------------------------------------- 1 | 45 | 46 |
47 |
48 | 56 |
57 | 58 |
59 | 63 | 64 |
hideOnExec = !hideOnExec} 65 | use:tippy={{content: `${hideOnExec ? tt.hideOnExec : tt.showOnExec}`, placement: 'top'}} 66 | > 67 | {#if !hideOnExec} 68 | 69 | {:else} 70 | 71 | {/if} 72 |
73 | 74 |
initialClearClick = true} use:tippy={{content: `${initialClearClick ? tt.clearNoUndo : tt.clearEditor}`, placement: 'top'}}> 75 | {#if !initialClearClick} 76 | 77 | Clear 78 | {:else} 79 | Are you sure? 80 | {/if} 81 |
82 | 83 | {#if initialClearClick} 84 | 87 | 90 | {/if} 91 | 92 | 100 | 101 | {#if eventType === 'source'} 102 | 103 | {/if} 104 | 105 |
106 |

107 | Font Size: 108 |

109 | 110 |
111 |
112 | 113 |
114 | 115 | -------------------------------------------------------------------------------- /ui/src/Components/MovableWin.svelte: -------------------------------------------------------------------------------- 1 | 251 | 252 | 253 | 254 |
255 |

{WindowTitle}

256 |
257 | 258 | 259 | 260 |
261 | {#if $outputMode} 262 |
263 | 264 |
265 | {/if} 266 | 267 |
268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | -------------------------------------------------------------------------------- /ui/src/Components/Output.svelte: -------------------------------------------------------------------------------- 1 | 25 | 26 | 27 | 28 | 29 |
30 | 31 | 39 | 47 | 55 | 56 | {#if (selected == 'output')} 57 |
58 | {#if ($luaOutputStore.length == 0)} 59 |

No output logged

60 | {:else} 61 | {#each $luaOutputStore as output, i} 62 | {@html output} 63 | {/each} 64 | {/if} 65 |
66 | {:else if (selected == 'history')} 67 |
68 | {#if ($debugOutputStore.length == 0)} 69 |

No history logged

70 | {:else} 71 | {#each $debugOutputStore as debug, i} 72 | {@html debug} 73 | {/each} 74 | {/if} 75 |
76 | {:else if (selected == 'variables')} 77 |
78 | {#if ($variablesLogStore.length == 0)} 79 |

No variables logged

80 | {:else} 81 | {#each $variablesLogStore as varLog, i} 82 | {@html varLog.html} 83 | {/each} 84 | {/if} 85 |
86 | {/if} 87 | 88 |
89 | 90 | 91 | -------------------------------------------------------------------------------- /ui/src/Components/Players.svelte: -------------------------------------------------------------------------------- 1 | 68 | 69 | 70 |
71 | 72 | 73 | 79 | 80 |
81 |
    82 | {#each quickSearchResults as player} 83 |
  • getPlayerData(player.id)} 85 | use:tippy={{content: tt.managePlayer, placement: "right"}} 86 | > 87 |
    88 | {player.id} 89 |
    90 |
    91 | {player.name} 92 |
    93 |
  • 94 | {/each} 95 |
96 |
97 | {#if $curPlayerDataStore} 98 |
99 |
100 | {$curPlayerDataStore.id} 101 |
102 | {#each tabs as tab} 103 | 109 | {/each} 110 |
111 | {$curPlayerDataStore.name} 112 |
113 | 116 |
117 | 118 | {:else} 119 |
120 | 121 |
122 | {/if} 123 |
124 |
125 | 126 |
127 | 128 | 129 | -------------------------------------------------------------------------------- /ui/src/Components/Playertabs/PActions.svelte: -------------------------------------------------------------------------------- 1 | 87 | 88 | 89 |
90 |
91 | 97 | 103 |
104 |
105 |
106 | {#each plyOptions as option} 107 | 112 | {/each} 113 | 119 |
120 |
121 | 127 |
128 |
129 |
130 | 131 | 132 | {#if openVehicle} 133 |
134 |
135 | 136 |

Spawn Vehicle

137 | 142 |
143 |
144 |
145 | 149 |
150 |
151 | 158 |
159 |
160 |
161 |
162 | {/if} 163 | 164 | {#if openCoords} 165 |
166 |
167 | 168 |

Teleport

169 | 174 |
175 |
176 |
177 | 181 |
182 |
183 | 190 |
191 |
192 |
193 |
194 | {/if} 195 | 196 | {#if openKick} 197 |
198 |
199 | 200 |

Kick

201 | 206 |
207 |
208 |
209 | 213 |
214 |
215 | 222 |
223 |
224 |
225 |
226 | {/if} 227 | 228 | {#if openBan} 229 |
230 |
231 | 232 |

Ban

233 | 238 |
239 |
240 |
241 | 245 |
246 |
247 | 254 |
255 |
256 |
257 |
258 | {/if} -------------------------------------------------------------------------------- /ui/src/Components/Playertabs/PInfo.svelte: -------------------------------------------------------------------------------- 1 | 28 | 29 | 30 |
31 |
32 |
Identifiers
33 | {#if ($curPlayerDataStore.identifiers)} 34 | {#each $curPlayerDataStore.identifiers as identifier} 35 | { 37 | copyToClipboard(identifier); 38 | }} 39 | use:tippy={{content: tt.copyIdentifier, placement: "right"}} 40 | >{identifier} 41 | {/each} 42 | {/if} 43 |
44 |
45 |
General Information
46 | 47 |
Health: {$curPlayerDataStore.health}
48 |
Armour: {$curPlayerDataStore.armour}
49 |
{ 51 | copyToClipboard(PlayerCoords) 52 | }} 53 | use:tippy={{content: tt.copyCoords, placement: "right"}} 54 | > 55 | Coords: {PlayerCoords} 56 |
57 |
{ 59 | copyToClipboard($curPlayerDataStore.heading); 60 | }} 61 | use:tippy={{content: tt.copyHeading, placement: "right"}} 62 | >Heading: {$curPlayerDataStore.heading}
63 |
In Vehicle: {$curPlayerDataStore.inVehicle}
64 | {#if $curPlayerDataStore.inVehicle} 65 |
{ 67 | copyToClipboard($curPlayerDataStore.vehicleName); 68 | }} 69 | use:tippy={{content: tt.copyVehicleName, placement: "right"}} 70 | 71 | >Vehicle: {$curPlayerDataStore.vehicleName}
72 | {/if} 73 |
{ 75 | copyToClipboard($curPlayerDataStore.model); 76 | }} 77 | use:tippy={{content: tt.copyModel, placement: "right"}} 78 | >Model: {$curPlayerDataStore.model}
79 |
80 |
81 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /ui/src/Components/Resources.svelte: -------------------------------------------------------------------------------- 1 | 180 | 181 |
182 | 183 | 184 | 190 | 191 |

AutoRestart on Edit

192 | 198 |
199 |
200 |
    204 | {#each quickSearchResults as res} 205 |
  • 206 | 207 | 208 | {res.name} 209 | 210 | 211 | {#if res.description} 212 | {res.description} 213 | {:else} 214 | No description 215 | {/if} 216 | 217 | 218 | 219 | {#if res.author} 220 | {res.author} 221 | {:else} 222 | No author 223 | {/if} 224 | 225 | 226 | {#if res.version} 227 | Version: {res.version} 228 | {:else} 229 | No version 230 | {/if} 231 | 232 | 233 | 234 | {#if res.status == 'stopped'} 235 | 241 | {:else} 242 | 248 | {/if} 249 | 255 | 256 | 262 | 263 |
  • 264 | {/each} 265 |
266 | 267 | {#if openEdit} 268 |
269 |
270 | 271 | 272 | 278 | 279 |
    280 | {#each quickSearchFileResults as file} 281 |
  • 282 | 283 | 284 | {file} 285 | 286 | 287 | 288 | 298 | 299 |
  • 300 | {/each} 301 |
302 |
303 | {/if} 304 |
305 | 306 | {#if showEditor} 307 |
308 | 315 | 316 | 323 | 330 |
331 | {/if} 332 | 333 | 334 | 335 | 336 | 337 | -------------------------------------------------------------------------------- /ui/src/Components/Settings.svelte: -------------------------------------------------------------------------------- 1 | 15 | 16 |
17 |
18 |

Theme

19 | 29 |
30 | 31 |
32 |

Configure Quick Funtions

33 | 37 | 46 | {#if configuringQuickFunctions} 47 | 56 | {/if} 57 | {#if configuringQuickFunctions} 58 |
61 | 68 |
69 | {/if} 70 |
71 |
72 | 73 | 74 | -------------------------------------------------------------------------------- /ui/src/Tailwind.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | 5 | * { 6 | margin: 0; 7 | padding: 0; 8 | } 9 | *:focus { 10 | outline: none; 11 | } 12 | :root { 13 | font-size: 62.5%; 14 | --color-primary: rgba(0, 0, 0); 15 | --color-secondary: rgb(34, 34, 34); 16 | --color-tertiary: white; 17 | } 18 | 19 | html, body { 20 | height: 100vh; 21 | width: 100vw; 22 | font-size: 1.6rem; 23 | overflow: hidden; 24 | } 25 | 26 | @layer components { 27 | button.def, 28 | .btn-def, 29 | div.def { 30 | background-color: var(--color-tertiary); 31 | color: var(--color-secondary); 32 | transition: all 0.1s ease-in-out; 33 | @apply font-bold py-2 px-4 rounded; 34 | } 35 | 36 | 37 | button.def:hover, 38 | .btn-def:hover { 39 | @apply bg-gray-400; 40 | } 41 | 42 | button.sec, 43 | .btn-sec, 44 | div.sec { 45 | background-color: var(--color-primary); 46 | color: var(--color-tertiary); 47 | transition: all 0.1s ease-in-out; 48 | @apply font-bold py-2 px-4 rounded; 49 | } 50 | 51 | button.sec:hover, 52 | .btn-sec:hover { 53 | @apply bg-gray-400; 54 | } 55 | 56 | button.prio, 57 | div.prio { 58 | background-color: var(--color-primary); 59 | color: var(--color-tertiary); 60 | box-shadow: 0 0 0 0.2rem var(--color-tertiary); 61 | transition: all 0.1s ease-in-out; 62 | @apply font-bold py-2 px-4 rounded; 63 | } 64 | 65 | button.prio:hover { 66 | background-color: var(--color-tertiary); 67 | color: var(--color-primary); 68 | } 69 | } 70 | 71 | .scrollbar-hide::-webkit-scrollbar { 72 | display: none; 73 | } 74 | 75 | input, .code-text { 76 | outline: none; 77 | font-family: 'JetBrains Mono', monospace; 78 | } 79 | 80 | 81 | .scroll-style::-webkit-scrollbar { 82 | width: 0px; 83 | height: 0px; 84 | } 85 | 86 | 87 | .scroll-style::-webkit-scrollbar-track { 88 | background: rgba(0, 0, 0, 0); 89 | } 90 | 91 | .scroll-style::-webkit-scrollbar-thumb { 92 | background-color: var(--color-tertiary); 93 | border-radius: 10px; 94 | } 95 | 96 | .scroll-style-x::-webkit-scrollbar { 97 | height: 2px; 98 | } 99 | 100 | .scroll-y::-webkit-scrollbar { 101 | width: 2px; 102 | } 103 | 104 | .variable-input { 105 | background-color: var(--color-primary); 106 | color: var(--color-tertiary); 107 | } 108 | 109 | .variable-input::selection { 110 | background-color: var(--color-tertiary); 111 | color: var(--color-primary); 112 | } -------------------------------------------------------------------------------- /ui/src/components/Drawer.svelte: -------------------------------------------------------------------------------- 1 | 12 | 13 | 38 | 39 | 166 | 167 | -------------------------------------------------------------------------------- /ui/src/components/QuickFunc.svelte: -------------------------------------------------------------------------------- 1 | 50 | 51 | 52 | 53 | 54 |
55 |
56 |
    57 | {#each $variablesStore as variable, i} 58 |
  • 59 | 67 |