18 Mods geliked
- Script Hook
- Script Hook
@kioshi are you sure you put it in "Modules" and not "_Modules", and also have JM36 Lua Plugin installed correctly, without any other Lua Plugin to create conflicts?
@KTU98552 It is as simple as can be; drag and drop the files and folders into your game's folder like the instructions say.
@JoyLucien you don't enable "DebugMode" with the "main.lua" file from the "ForUsers" release version/variant; you wouldn't exactly necessarily want to either even if you could, since that would not be very useful in most scenarios. Get the "ForDevelopers" release version/variant (which is source), and then you can proceed to enabling "DebugMode" via the top of the "main.lua" file.
If you instead simply want to have a button be binded for reloading scripts (while sticking with the "ForUsers" release version/variant), you can write a script to accomplish that in a few ways, though that would be undefined behavior that can change at any given moment. One such method is placing a simple script under "Modules" that (ab)uses the loading order mechanic to set the "DebugMode" variable to true before the "0_ReloadScripts"... scripts loads (would also affect other scripts that use this variable unless you also load the "0_ReloadScripts"... scripts within this context and then revert the value back immediately afterwards), or just create your own reload trigger script that doesn't check for "DebugMode" or anything and just works. You can create bindings based upon the game's input system (typically most recommended) or via keyboard inputs directly, several scripts can be used as examples of how, including one of the "0_ReloadScripts"... scripts (there's 2 of them in 2 places).
@JoyLucien "DebugMode" is a global variable by the very top of the "ForDevelopers" or source "main.lua" file; you switch that from false to true, which the scripts which handle script reloading will see and then enable themselves, triggering a script reload whenever the "tab" key is pressed (by default), which can be changed via one of the two "0_ReloadScripts"... script module files.
@JoyLucien with "DebugMode" enabled, reloading is bound to "Tab" by default, and can be changed within the included reload module.
@Alex01 Ah, yeah, sorry about that; that pinned comment is very old at this point, things have changed quite a bit since then (the installation guide on GitHub has all the latest correct steps) but yeah the "addins" Lua script files instead now go into "Modules" located within "ScriptsDir-Lua". I'll need to put together a new comment to pin sometime.
Hmm, I did have the idea of making something similar to this in mind awhile ago but never really got around to making it for singleplayer, too bad this recommends the old outdated version of Lua Plugin though. As for "not perfect" @byMoJiiTo, ehh, you'll get there with persistence and practice and time.
@Goku1305 you can use a menu or trainer to repair vehicle
@TayMcKenzie That will be a significant work/conversion process to make compatible; you would need to remove the FiveM specific dependencies, create an equivalent menu api (or switch to another), and make some other adjustments as needed/necessary.
@cheesix8 RAGE stands for Rockstar's Advanced Game Engine, and native functions are functions that are native or built in; for example, the `print` function in Lua would be a Lua native function.