Lua Plugin (Reloaded) for Script Hook V ForUsers_JM36-v20230826.0-Stable
59.504
299
-
18 de Maio de 2021
Have FiveM Lua experience/knowledge that you would like to take/bring into normal GTA?
Interested in having the ability to interface various in-game things to various external/out of game things (say trigger an action on/in an external unrelated program or create your own Discord rich presence with an external utility for example, maybe even create yourself a remote game interaction api) with ease?
Well, recently I've somewhat departed from FiveM (with 3+ years of experience) and thought it would be cool to port over some of my scripts to singleplayer, finding headscript's/gallexme's Lua Plugin for Script Hook V in the process, which just simply didn't suit my needs nor meet my expectations (especially in regards to performance), and it has pretty much been abandoned for years now, so I've decided to adopt it as my own and dramatically/drastically improve my fork of it far beyond what anyone could've ever imagined being possible with this, and I plan on introducing new performance/optimization features/techniques over time and releasing updates somewhat frequently.
Mod description: Write/Use custom Lua scripts for GTA V
Why Lua?
- Lua is a lightweight scripting language that tends to be beginner-friendly, but powerful in the hands of an advanced user at the same time. Although Lua might not have the same popularity as that of other scripting languages such as C# or C++ (.NET), Lua's expandability makes it equally as capable as the others, while remaining easy-to-use and often more resource efficient.
Summary of installation instructions: https://github.com/JayMontana36/LuaPlugin-GTAV/wiki/Overview#installation-guides
Bugs and features:
1: Bug - Lua Plugin itself **cannot** be reloaded, but Lua scripts *can* be reloaded.
2: Feature - Introduced newer FiveM style Lua game native function calls (alongside the older/legacy game native function calls (via namespaces) which are strictly for compatibility with older/existing Lua Plugin scripts and have not been updated/touched).
3: Feature - An external Lua script(s) directory that you can place anywhere.
4: Feature - Lua script reloading script for developers with DebugMode variable set true.
5: Feature - Maintain compatibility with older/existing Lua Plugin scripts.
6: Feature - Universal timer and variables containing relevant player information to avoid having to (excessively) use certain/common game native calls across numerous scripts (and avoid wasting resources by doing so).
7: Feature - Universal built in native config file reader/writer functions for data storage/retention/persistence.
8: Feature - Included examples and documentation via GitHub wiki.
9: Feature - Automatic caching of certain game native function calls (for better speed and efficiency).
10: Feature - Quality of life improvements and enhancements for older/existing Lua Plugin scripts.
11: Feature - Scripts no longer conflict nor block/delay other scripts from running
Credits and, if applicable, notices of permission for content re-use:
1: Credits | JayMontana36 - This version/fork of Lua Plugin with completely homemade/rewritten externals (currently ALL of the included Lua scripts with the exception of "GUI.lua" were all written/original content by me)
2: Credits | headscript/gallexme - The original author of Lua Plugin who's ASI files are currently still used in this project/fork due to my lack of knowledge to create my own.
3: Notice of permission for content re-use - https://github.com/gallexme/ScriptHook-Lua-Plugin/blob/master/README.md - Applies to the ASI files and the "GUI.lua" file used in this project/fork; for everything else, http://creativecommons.org/licenses/by-nc-sa/4.0
Changelog:
- ** JM36-v20220818.0-Stable ** -
1: Some improvements and bugfixes
2: Updated automatic migration/migrator for legacy/original Lua Plugin scripts
3: Updated backward compatibility with legacy/original Lua Plugin scripts
4: Updated RAGE native function (re)maps.
5: Updated ExampleMenu for legacy/original Lua Plugin included menu ("GUI") library.
- ** JM36-v20220818.0-Stable ** -
1: Fixed configFileRead function not working (reverted to an updated older version).
2: Added a native "remap" for "GetEntityPlayerIsFreeAimingAt" from "GetAimedEntity", an "unknown" or "lost" native that has no documentation whatsoever anywhere but works exactly the same (and appears to be the same).
- ** JM36-v20220805.0-Stable ** -
1: Completely/Massively rewrite/overhaul the JM36 Lua Plugin's eCore for performance and efficiency and structural purposes.
1A: Misc internal improvements/rewrites.
1B: JM36 Lua Plugin's init/startup and script reloads should now be way/much more efficient (and faster).
2: Updated RAGE native function (re)maps.
2A: Pioneered a new (and much better) replacement for Function (Re)Mapper (delete it from your Modules if you have it).
3: Updated included/bundled minimalist example scripts.
- ** JM36-v20220805.0-Stable-ForUsers ** -
1: Misc internal improvements/rewrites
2: Update RAGE native function (re)maps
3: Optimize package/distribution/download for users - stripped out example scripts and precompiled for faster loading - developers must now get "source" from GitHub.
- ** JM36-v20220420.0-Stable ** -
NOTICE: If you have previously downloaded and installed v20220418.0, be sure to delete the "1_Threads.lua" file from your "Modules", otherwise it'll cause problems loading Lua scripts and conflict because it has been integrated (and as such, that module is for that version and older and is incompatible with this version and newer).
1: Fully integrate the previously implemented coroutine/thread system and make it the new/default standard across everything, including any/all loaded older/legacy/original Lua Plugin scripts as well as all JM36 Lua Plugin scripts via wrapping.
2: Scripts can (and will) no longer block other scripts from running (or being able to run) whenever a "wait" is called - Primarily affects/concerns the older/legacy/original Lua Plugin scripts in a great/awesome way.
3: (Actually) Fix broken compatibility with older/legacy/original Lua Plugin scripts (for real this time).
- ** JM36-v20220418.0-Stable ** -
1: Fix broken compatibility with older/legacy/original Lua Plugin scripts.
2: Implement a basic coroutine/thread system, which will become the new/default standard and be fully integrated in the near future.
- ** JM36-v20220412.0-Stable ** -
1: Completely/Massively rewrite/overhaul the JM36 Lua Plugin's eCore for performance and efficiency and structural purposes.
2: JM36 Lua Plugin's init/startup and script reloads should now be way/much more efficient (and faster).
3: Engineered and implemented modular caching libraries for use with both functions and scripts.
4: Modularized the "Info" var/param/table as well as it's "Player" subtable (it works the same).
5: Updated the "Info" update interval to be per frame instead of every 500ms.
6: Added caching to a few common game native function calls (for speed).
7: Integrate JM36 Function (Re)Mapper to no longer need/require a separate download (LP is now more usable out of the box).
8: Updated the Function (Re)Mapper to work with the new JM36 LP filesystem structure.
9: Updated the Function (Re)Mapper's ini file with newer game native function names.
- ** JM36-v5.3-Stable ** -
1: Fix issues with some scripts which fail to function correctly or at all prior to a (forced) script reload (or in the case of non-technical users or non-developers, did not work at all).
2: Add a built in automatic migrator from/for old/legacy LuaPlugin to JM36 LuaPlugin.
- ** JM36-v5.2-Stable ** -
1: Compatibility fixes for supporting more legacy `Lua Plugin` scripts.
- ** JM36-v5.1-Stable ** -
1: Fixed inconsistencies with the "_0x" game native function calls to make it even easier to work with them in a more consistent manner.
- ** JM36-v5.0-Stable ** -
1: Skipped a version (v4.0); v4.0 was unofficially released as a private "beta".
2: Fixed typo in "Info.Player.Vehicle.Name" that prevented the vehicle's name from coming back correctly as anything.
3: Add new "Handle" variable to "Info.Player" and "Info.Player.Vehicle".
4: Make it easier to call "0x" hexadecimal game native functions by prefixing them with an underscore ("_") like FiveM does.
5: Several optimizations to the internal "_init" function and the FiveM style game native function call function generator.
6: Remove/Replace an unnecessary internal function for accessing "secondary" globals, making it a more direct access while keeping transparency.
7: Renamed a few included scripts primarily for better/optimal DebugMode operation.
8: Optimized DebugMode tick/loop further.
9: Attempt to simplify installation for new and/or basic users by defaulting ScriptsDir-Lua into GameDir-GTAV scripts dir.
10: Removed "All Lua Scripts Loaded Without Error" message; you will now only ever see errors (and script prints) printed in console (with developer asi).
11: Overall code cleanup and optimization.
12: Add/Include version information within secondary global which can be used by scripts to require a certain minimum version of this plugin and/or change behaviors depending upon the version (such as error for incorrect version or so).
- ** JM36-v3.0-Stable ** -
1: Fixed FiveM style game native function calls randomly (not) working (hopefully) once and for all and removed the excess code/checks related to this issue/bug
2: Fixed "Info.Player.Vehicle.IsOp" variable not updating whenever the player becomes the vehicle operator or a vehicle passenger
3: Implemented feature number 7 from above (config file read/write)
4: Updated the included example scripts
- ** JM36-v2.0-Stable ** -
1: Implemented feature number 6 from above
2: Implemented a check and a fix for the commonly left out "\\" ending in the "Scripts_Path" string variable (which whenever absent in the previous release/version would have caused things to completely break and fail to function).
3: Implemented a new "Info" variable which is exposed directly to your loop functions, containing plenty of useful player (and vehicle) information as well as the time which is mostly useful for wait(ing) or for delayed execution or for special script loop run timings; more Information and usage examples regarding the new "Info" variable can be found on the wiki - https://github.com/JayMontana36/LuaPlugin-GTAV/wiki/The-Basics---Getting-Started---Scripting-Examples#the-info-variable-1st-argument-sent-to-loop-functions-and-game-native-function-call-examples
4: gta5-mods specific release version - include the above wiki page (The Basics - Getting Started - Scripting Examples) as well as the "Overview" wiki page as htm/html files as a simple and effective way to "include documentation" just in case developers don't go to the GitHub for the documentation or don't know that the GitHub with the documentation exists (being that the other Lua Plugin completely lacks any documentation whatsoever in general, which is not the case here with my version).
Primeiro envio: 12 de Abril de 2021
Último envio: 26 de Agosto de 2023
Último download: há 3 horas atrás
221 Comentários
More mods by JayMontana36:
Have FiveM Lua experience/knowledge that you would like to take/bring into normal GTA?
Interested in having the ability to interface various in-game things to various external/out of game things (say trigger an action on/in an external unrelated program or create your own Discord rich presence with an external utility for example, maybe even create yourself a remote game interaction api) with ease?
Well, recently I've somewhat departed from FiveM (with 3+ years of experience) and thought it would be cool to port over some of my scripts to singleplayer, finding headscript's/gallexme's Lua Plugin for Script Hook V in the process, which just simply didn't suit my needs nor meet my expectations (especially in regards to performance), and it has pretty much been abandoned for years now, so I've decided to adopt it as my own and dramatically/drastically improve my fork of it far beyond what anyone could've ever imagined being possible with this, and I plan on introducing new performance/optimization features/techniques over time and releasing updates somewhat frequently.
Mod description: Write/Use custom Lua scripts for GTA V
Why Lua?
- Lua is a lightweight scripting language that tends to be beginner-friendly, but powerful in the hands of an advanced user at the same time. Although Lua might not have the same popularity as that of other scripting languages such as C# or C++ (.NET), Lua's expandability makes it equally as capable as the others, while remaining easy-to-use and often more resource efficient.
Summary of installation instructions: https://github.com/JayMontana36/LuaPlugin-GTAV/wiki/Overview#installation-guides
Bugs and features:
1: Bug - Lua Plugin itself **cannot** be reloaded, but Lua scripts *can* be reloaded.
2: Feature - Introduced newer FiveM style Lua game native function calls (alongside the older/legacy game native function calls (via namespaces) which are strictly for compatibility with older/existing Lua Plugin scripts and have not been updated/touched).
3: Feature - An external Lua script(s) directory that you can place anywhere.
4: Feature - Lua script reloading script for developers with DebugMode variable set true.
5: Feature - Maintain compatibility with older/existing Lua Plugin scripts.
6: Feature - Universal timer and variables containing relevant player information to avoid having to (excessively) use certain/common game native calls across numerous scripts (and avoid wasting resources by doing so).
7: Feature - Universal built in native config file reader/writer functions for data storage/retention/persistence.
8: Feature - Included examples and documentation via GitHub wiki.
9: Feature - Automatic caching of certain game native function calls (for better speed and efficiency).
10: Feature - Quality of life improvements and enhancements for older/existing Lua Plugin scripts.
11: Feature - Scripts no longer conflict nor block/delay other scripts from running
Credits and, if applicable, notices of permission for content re-use:
1: Credits | JayMontana36 - This version/fork of Lua Plugin with completely homemade/rewritten externals (currently ALL of the included Lua scripts with the exception of "GUI.lua" were all written/original content by me)
2: Credits | headscript/gallexme - The original author of Lua Plugin who's ASI files are currently still used in this project/fork due to my lack of knowledge to create my own.
3: Notice of permission for content re-use - https://github.com/gallexme/ScriptHook-Lua-Plugin/blob/master/README.md - Applies to the ASI files and the "GUI.lua" file used in this project/fork; for everything else, http://creativecommons.org/licenses/by-nc-sa/4.0
Changelog:
- ** JM36-v20220818.0-Stable ** -
1: Some improvements and bugfixes
2: Updated automatic migration/migrator for legacy/original Lua Plugin scripts
3: Updated backward compatibility with legacy/original Lua Plugin scripts
4: Updated RAGE native function (re)maps.
5: Updated ExampleMenu for legacy/original Lua Plugin included menu ("GUI") library.
- ** JM36-v20220818.0-Stable ** -
1: Fixed configFileRead function not working (reverted to an updated older version).
2: Added a native "remap" for "GetEntityPlayerIsFreeAimingAt" from "GetAimedEntity", an "unknown" or "lost" native that has no documentation whatsoever anywhere but works exactly the same (and appears to be the same).
- ** JM36-v20220805.0-Stable ** -
1: Completely/Massively rewrite/overhaul the JM36 Lua Plugin's eCore for performance and efficiency and structural purposes.
1A: Misc internal improvements/rewrites.
1B: JM36 Lua Plugin's init/startup and script reloads should now be way/much more efficient (and faster).
2: Updated RAGE native function (re)maps.
2A: Pioneered a new (and much better) replacement for Function (Re)Mapper (delete it from your Modules if you have it).
3: Updated included/bundled minimalist example scripts.
- ** JM36-v20220805.0-Stable-ForUsers ** -
1: Misc internal improvements/rewrites
2: Update RAGE native function (re)maps
3: Optimize package/distribution/download for users - stripped out example scripts and precompiled for faster loading - developers must now get "source" from GitHub.
- ** JM36-v20220420.0-Stable ** -
NOTICE: If you have previously downloaded and installed v20220418.0, be sure to delete the "1_Threads.lua" file from your "Modules", otherwise it'll cause problems loading Lua scripts and conflict because it has been integrated (and as such, that module is for that version and older and is incompatible with this version and newer).
1: Fully integrate the previously implemented coroutine/thread system and make it the new/default standard across everything, including any/all loaded older/legacy/original Lua Plugin scripts as well as all JM36 Lua Plugin scripts via wrapping.
2: Scripts can (and will) no longer block other scripts from running (or being able to run) whenever a "wait" is called - Primarily affects/concerns the older/legacy/original Lua Plugin scripts in a great/awesome way.
3: (Actually) Fix broken compatibility with older/legacy/original Lua Plugin scripts (for real this time).
- ** JM36-v20220418.0-Stable ** -
1: Fix broken compatibility with older/legacy/original Lua Plugin scripts.
2: Implement a basic coroutine/thread system, which will become the new/default standard and be fully integrated in the near future.
- ** JM36-v20220412.0-Stable ** -
1: Completely/Massively rewrite/overhaul the JM36 Lua Plugin's eCore for performance and efficiency and structural purposes.
2: JM36 Lua Plugin's init/startup and script reloads should now be way/much more efficient (and faster).
3: Engineered and implemented modular caching libraries for use with both functions and scripts.
4: Modularized the "Info" var/param/table as well as it's "Player" subtable (it works the same).
5: Updated the "Info" update interval to be per frame instead of every 500ms.
6: Added caching to a few common game native function calls (for speed).
7: Integrate JM36 Function (Re)Mapper to no longer need/require a separate download (LP is now more usable out of the box).
8: Updated the Function (Re)Mapper to work with the new JM36 LP filesystem structure.
9: Updated the Function (Re)Mapper's ini file with newer game native function names.
- ** JM36-v5.3-Stable ** -
1: Fix issues with some scripts which fail to function correctly or at all prior to a (forced) script reload (or in the case of non-technical users or non-developers, did not work at all).
2: Add a built in automatic migrator from/for old/legacy LuaPlugin to JM36 LuaPlugin.
- ** JM36-v5.2-Stable ** -
1: Compatibility fixes for supporting more legacy `Lua Plugin` scripts.
- ** JM36-v5.1-Stable ** -
1: Fixed inconsistencies with the "_0x" game native function calls to make it even easier to work with them in a more consistent manner.
- ** JM36-v5.0-Stable ** -
1: Skipped a version (v4.0); v4.0 was unofficially released as a private "beta".
2: Fixed typo in "Info.Player.Vehicle.Name" that prevented the vehicle's name from coming back correctly as anything.
3: Add new "Handle" variable to "Info.Player" and "Info.Player.Vehicle".
4: Make it easier to call "0x" hexadecimal game native functions by prefixing them with an underscore ("_") like FiveM does.
5: Several optimizations to the internal "_init" function and the FiveM style game native function call function generator.
6: Remove/Replace an unnecessary internal function for accessing "secondary" globals, making it a more direct access while keeping transparency.
7: Renamed a few included scripts primarily for better/optimal DebugMode operation.
8: Optimized DebugMode tick/loop further.
9: Attempt to simplify installation for new and/or basic users by defaulting ScriptsDir-Lua into GameDir-GTAV scripts dir.
10: Removed "All Lua Scripts Loaded Without Error" message; you will now only ever see errors (and script prints) printed in console (with developer asi).
11: Overall code cleanup and optimization.
12: Add/Include version information within secondary global which can be used by scripts to require a certain minimum version of this plugin and/or change behaviors depending upon the version (such as error for incorrect version or so).
- ** JM36-v3.0-Stable ** -
1: Fixed FiveM style game native function calls randomly (not) working (hopefully) once and for all and removed the excess code/checks related to this issue/bug
2: Fixed "Info.Player.Vehicle.IsOp" variable not updating whenever the player becomes the vehicle operator or a vehicle passenger
3: Implemented feature number 7 from above (config file read/write)
4: Updated the included example scripts
- ** JM36-v2.0-Stable ** -
1: Implemented feature number 6 from above
2: Implemented a check and a fix for the commonly left out "\\" ending in the "Scripts_Path" string variable (which whenever absent in the previous release/version would have caused things to completely break and fail to function).
3: Implemented a new "Info" variable which is exposed directly to your loop functions, containing plenty of useful player (and vehicle) information as well as the time which is mostly useful for wait(ing) or for delayed execution or for special script loop run timings; more Information and usage examples regarding the new "Info" variable can be found on the wiki - https://github.com/JayMontana36/LuaPlugin-GTAV/wiki/The-Basics---Getting-Started---Scripting-Examples#the-info-variable-1st-argument-sent-to-loop-functions-and-game-native-function-call-examples
4: gta5-mods specific release version - include the above wiki page (The Basics - Getting Started - Scripting Examples) as well as the "Overview" wiki page as htm/html files as a simple and effective way to "include documentation" just in case developers don't go to the GitHub for the documentation or don't know that the GitHub with the documentation exists (being that the other Lua Plugin completely lacks any documentation whatsoever in general, which is not the case here with my version).
Primeiro envio: 12 de Abril de 2021
Último envio: 26 de Agosto de 2023
Último download: há 3 horas atrás
-
-
@JohnFromGWN "Unstable" in what way(s)? No one else (including people who hardly know what they're doing) has had any kind of "stability" related issues.
09 de Março de 2024 -
@JayMontana36 Does The Savehouse Mod: Houses, Hotels, Custom Savespots [LUA] work with this LUA? I put the files into modules, lib and scripts but it says it cant find addin folder and show nothing on map.
21 de Maio de 2024 -
-
@SnakeSlippers That script is internally hard coded to look for the "addins" folder which doesn't exist here, so you'll need to modify that script to not do that (make it look elsewhere like maybe "Modules" or another subdirectory or so.
02 de Julho de 2024 -
@winisiki Doesn't work in what way? It's still currently functional if installed correctly with the up to date ScriptHookV.
02 de Julho de 2024 -
-
-
-
-
@Ballsy @jeandro_27 it should work with all game versions as long as you have the right version of ScriptHookV installed and the files are all in the correct place.
07 de Julho de 2024 -
@JayMontana36 Hey, what's the problem with the ScriptHookV and the latest game update 3274? My game just crash at loadscreen without any error... and I still don't know how to fix it, can you give me some advice about it? The problem not with Lua Plugin, but still, I have no idea what happened at all.
21 de Julho de 2024 -
@JayMontana36 will you update it to the nightly version of scripthookv.net?
23 de Julho de 2024 -
It gives me an error about 3 scripts not loading when I load into my game but the error disappears too fast for me to read it fully. I don't have any mods dependent on this one yet
13 de Setembro de 2024 -
I'm on the 119 nightly scripthookvdotnet version. Where exactly am I meant to put the files? I put the asi in my main directory and copied the folder and files in the script folder to the gtav directory's script folder
13 de Setembro de 2024 -
@JayMontana36 what happened to the new version of Ragdoll Superman mod that you were releasing?
18 de Setembro de 2024 -
-
-
-
@JayMontana36 Hey, after my game and Script Hook V been updated to the latest 3351 version, my game just freezes at loadscreen with an error about SHVDN and KERNELBASE.dll file... so I don't know what to do, I tried to figure out which concretely file or mod was causing this error and it turned out that this error happens by ScriptHookV.dll, but how it can be? Can you give me some advice about this situation? Here the lines about this error from ScriptHookV.log file:
[17:02:02] CORE: An exception occurred while executing 'ScriptHookVDotNetCore.asi', id 25
Exception addr 0x00007FFCDEB9B699 is KERNELBASE.dll+0x0003B699
Last called native 0x0000000000000000Thank you anyway🙂
21 de Outubro de 2024
@cakuzma Yes, `JM36 Lua Plugin` is a massively updated/upgraded replacement to the old/existing `Lua Plugin`, and any/all scripts that were made for the old/existing `Lua Plugin` will also (continue to) work with/in `JM36 Lua Plugin`, but not the other way around because the old `Lua Plugin` does not have anything that was added or introduced in the new `JM36 Lua Plugin`. Scripts made for the old/existing `Lua Plugin` will generally also run faster with/in `JM36 Lua Plugin`.
If you want to use any of the older scripts that were made for the older version of `Lua Plugin` with/in `JM36 Lua Plugin`, all that needs to be done is to simply place those scripts into your new `ScriptsDir-Lua` folder from `JM36 Lua Plugin` (which is similar to the addins/addons folder from the existing `Lua Plugin`), and it should just work.