Download and reviewScript Hook V .NET .You may remember the .NET ScriptHook back from GTAIV, it allowed using the easy to learn, but extremly powerful .NET languages to write scripts that can be executed ingame.
This ASI plugin for the just released Script Hook V attempts to recreate this experience for GTAV. It’s full source code is hosted on Github, development is community-driven and open to everybody, so contributions are warmly welcomed.
Right now it’s able to load, compile and run .NET scripts and reload them while the game is running (press the “Insert” key). It also comes with a vast scripting API abstracting away the native function calls (you can still do those manually through “GTA.Native.Function.Call” though). Scripts are executed in a separate AppDomain, any exceptions thrown thus shouldn’t affect the game or ScriptHook.
Download Latest Binary Release
- Install both the Microsoft .NET Framework 4.5.2 and the Visual C++ Redistributable Package for Visual Studio 2013 (x64) (or loading will fail).
- Download and install the latest Script Hook V (including the ASI loader).
- Download Community Script Hook V .NET and copy the ASI file into your game folder.
- Create (or download) a C#/VisualBasic code file (.cs, .vb) or compiled .NET assembly (.dll) inside the “scripts” folder in your game directory and start scripting!
- source/core/Main.cpp: The main script entry point
- source/core/ScriptDomain.cpp: .NET script manager. Loads, compiles and executes the scripts.
- source/core/Script.hpp: Class from which all scripts have to inherit, handles the script main loop.
- source/core/Native.cpp: Managed to native function call conversion.
- source/core/NativeHashes.hpp: Native function hash enumeration.