Before start, make sure that you have installed:
- Microsoft .Net Framework 4.0
- Microsoft Visual C++ 2010 Redistributable Package (x86)
- At least game patch 1.0.4.0 installed
Let me explain how it works:
- ASI loader is loaded by game because game "thinks" that is a normal dsound.dll file
- ASI loader loads any file that is in GTAIV.exe folder that ends with .asi (extension .asi)
- The ScriptHookDotNet.asi is loaded by the ASI loader
- ScriptHookDotNet.asi loads the ScriptHook.dll file
- ScriptHook.dll loads any .net.dll, .vb or .cs file that is inside the Scripts folder
Let's start with the ASI loader, in my mods its the file dsound.dll, it must be copied to GTAIV.exe file folder:
We must do the same with the following files: NAudio.dll, ScriptHook.dll, ScriptHookDotNet.asi, if your GTA have patch 1.0.4.0 or lower you need to copy the file ScriptHook.dll.4 instead of ScriptHook.dll and paste in GTAIV.exe folder and rename from ScriptHook.dll.4 to ScriptHook.dll:
Now we copy the Scripts folder from the ZIP and paste in GTAIV.exe folder:
If you run the game without administrator rights you may obtain an error message indicating the file asilog.txt, in this case you need to check if the file exists in your GTAIV.exe folder and create it if necessary using notepad for example.
Now let's test the ScriptHook, open the game, load an save game and when your character is on screen press ' or ~, a black window must appear, this indicates that the ScriptHook was loaded:
Done! Now you can drag to Scripts folder any .net script for GTA IV :)
Other mod files
Some mods like Dual wielding goes with files that must be added to .img game files using OpenIV or SparkIV, if it's a animation (.wad extension) it must be inserted in the anim.img file (anim\anim.img), if it's a weapon it must be inserted in the weapons.img (models\cdimages\weapons.img), if it's a ped it must be inserted in the componentpeds.img (models\cdimages\componentpeds.img), if it's a playerped.rpf file it must replace the playerped.rpf file (models\cdimages\playerped.rpf), always enable the Edit Mode before insert any file and do this with the game closed, you can export the original game files before to make backups.
Troubleshooting
Done! Now you can drag to Scripts folder any .net script for GTA IV :)
Other mod files
Some mods like Dual wielding goes with files that must be added to .img game files using OpenIV or SparkIV, if it's a animation (.wad extension) it must be inserted in the anim.img file (anim\anim.img), if it's a weapon it must be inserted in the weapons.img (models\cdimages\weapons.img), if it's a ped it must be inserted in the componentpeds.img (models\cdimages\componentpeds.img), if it's a playerped.rpf file it must replace the playerped.rpf file (models\cdimages\playerped.rpf), always enable the Edit Mode before insert any file and do this with the game closed, you can export the original game files before to make backups.
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 :)