NET Framework does not enable CAS policy by default, so this load may be dangerous. (Exception from HRESULT: 0x80131515)File name: 'file:///D:\Program Files (x86)\Steam\steamapps\common\Grand Theft Auto V\ScriptHookVDotNet.asi' -> System.NotSupportedException: An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the. Here's the error from my log: Failed to create script domain:System.IO.FileLoadException: Could not load file or assembly 'file:///D:\Program Files (x86)\Steam\steamapps\common\Grand Theft Auto V\ScriptHookVDotNet.asi' or one of its dependencies.
Visit the wiki for more help on how to get started and write scripts. It catches exceptions and gives you all the information to get to the bottom of the problem. If something doesn't work, check the log file. NET (rename the ASI to DLL) in the project properties and you are ready to go. Just create a C# or VisualBasic class library project, add a reference to Script Hook V.
Going down the Visual Studio way has the advantage of syntax highlighting, code completion and Intellisense (since there is no API documentation yet). Any help on improving that API is much appreciated.Įither use notepad to edit source code scripts directly or use Visual Studio to compile them to assemblies. The remaining files in source/scripting implement the scripting API.
Download and install the latest Script Hook V (including the ASI loader).NET Framework 4.5.2 and the Visual C++ Redistributable Package for Visual Studio 2013 (圆4) (or loading will fail). Thanks a lot to Alexander Blade for Script Hook V and HazardX for the inspiration with his GTAIV.
Scripts are executed in a separate AppDomain, any exceptions thrown thus shouldn't affect the game or ScriptHook. It also comes with a vast scripting API abstracting away the native function calls (you can still do those manually through "" though).
NET scripts and reload them while the game is running (press the "Insert" key).
Right now it's able to load, compile and run.
It's full source code is hosted on Github, development is community-driven and open to everybody, so contributions are warmly welcomed. This ASI plugin for the just released Script Hook V attempts to recreate this experience for GTAV. NET languages to write scripts that can be executed ingame. NET ScriptHook back from GTAIV, it allowed using the easy to learn, but extremly powerful.