PAYDAY 2 Dynamic music script from HarryWorner (C# SOURCE)
Version: 1.00
Date: 03/15/15
Tested with GTA 4 v1.0.7.0.
// 1. INSTALLATION:
1) move the file "NAudio.dll" to the main directory of the GTA 4 game
2) move the "Scripts" folder to the main directory of the GTA 4 game
// 2.REQUIREMENTS:
1) GTAIV .Net Script Hook v1.7.1.7 BETA
URL: http://gtaforums.com/topic/392325-beta-gtaiv-net-scripthook/
2) NAudio (PRESENT)
3) Tested with GTA 4 v1.0.7.0. [There may be errors in working on previous versions so be prepared to encounter them].
// 3.DESCRIPTION
Payday 2 Dynamic music script adds 8 different soundtracks from the game Payday 2 and simulates the same system as in Payday. Also, the system has 4 stages at which certain types of soundtracks are triggered:
STAGE 1: SAFE --> When the player is not wanted, Stealth music will be activated.
STAGE 2: DANGER --> When the player has committed a crime and has never been noticed by the police. Intense music will be activated.
STAGE 3:
STAGE 4: DEATH --> When the player is killed during the chase, sad music will be activated (30 sec duration. After this, a trail of random soundtrack will be activated from Stage 1).
ADDITIONAL INFORMATION: If the player was arrested or successfully escaped from the police during the chase, then a random soundtrack will be activated from Stage 1.
List of soundtracks from Payday 2 in this mod:
1) Razormind
2) Fuse Box
3) Supersledge
4) And Now We Run
5) Sirens in the Distance
6) Evil Eye
7) Shadows and Trickery
8) Wanted Dead or Alive
Additional: 9) Hard Time
P.S. You can use this script for your projects and ideas. I can't wait to see your favorite soundtracks and take you on new adventures with them.
KNOWN BUGS:
1) When the player is arrested, the sad music will not be activated.
KNOWN CONFLICTS WITH OTHER USER MODS:
1) Dynamic HUD MOD from InfamousSabre stops the playing soundtrack.
2) Tranquilizer Gun mod from InfamousSabre same problem.
But here you can correct it yourself the way the author posted the source code, and not the compiled script. FIX: Line 99: // liczenieSound.Play()
// 4. ACKNOWLEDGMENTS:
Many thanks to the person under the nickname HippieCommunist, who posted the source code of the scripts for GTA 4. Moreover, the tutorial on working with sound in the GTA 4 game was very helpful [TUT] Playing native sounds and external sounds. Unfortunately the author is not specified. http://gtaxscripting.blogspot.com/2013/03/tut-playing-native-sounds-and-external.html
All soundtracks from OVERKILL SOFTWARE.