Pages

Tuesday, July 30, 2013

[TUT] ScriptHook installation with OpenIV Package Installer - GTA iV

First of all

Make sure that you have installed:

Source: http://www.gtaforums.com/index.php?showtopic=392325


Let me explain how it works:

  1. ASI loader is loaded by game because game "thinks" that is a normal dsound.dll file
  2. ASI loader loads any file that is in GTAIV.exe folder that ends with .asi (extension .asi)
  3. The ScriptHookDotNet.asi is loaded by the ASI loader 
  4. ScriptHookDotNet.asi loads the ScriptHook.dll file
  5. ScriptHook.dll loads any .net.dll, .vb or .cs file that is inside the Scripts folder

Installation

*Run everything with admin rights.

1 - Download the ScriptHook here (mirror)
2 - Extract all files to an folder:


Open the OpenIV and click in Package Installer:


Select the ScriptHook.oiv file:


Select in what game version you will install:


If you don't have an ASI loader you can install it clicking in the first option, the ASI loader is necessary to load the ScriptHook:




After the installation click in Close, now open the OpenIV again, select the same file and install the ScriptHook based in your game patch version:



Now let's test the ScriptHook, open the game, load an save game and when your character is on screen press ' or ~, an black window must appear, this indicates that the ScriptHook was loaded:


Now press Insert to see if the scripts that is inside the Scripts folder is loading, an menu like this must appear:


Done! Now you can drag to Scripts folder any .net script for GTA IV :)



Troubleshooting

  • My game don't load anymore
You probably have an issue with the ASI loader, remove the dsound.dll file from GTAIV.exe folder and see if the game opens again. Now try o find another ASI loader version, gtaforums is a good choice to search for this kind of file.
If you are running the game without admin rights maybe you will obtain an error message indicating that the file asilog.txt can't be created, in this case you can try to run the game as admin using right click or manually create the asilog.txt file and saving inside gtaiv.exe folder 

  • My game crash at loading screen
This is probably related to wrong ScriptHook.dll version, make sure that you choose the right ScriptHook based in your  patch version.

  • Black window don't appear 
ScriptHook or ASI loader failed in the startup, try other ScriptHook or ASI loader versions

  •  The mod menu don't appear when i press Insert
This can be a issue with the ScriptHook version, send to me the ScriptHook.log file :)