Forum: GTA IV Mod Releases / W.I.P.s


The above video goes away if you are a member and logged in, so log in now!




 
Would you like to get all the new info from
PSX-Scene in your email each day?




Want to learn more about the team keeping you up to date with the latest scene news?

Read about them now!

Check out our Developer bios, too!

 


User Tag List

Like Tree355Likes

Thread: The Mega Script Thread
  

Page 19 of 42 FirstFirst ... 9 17 18 19 20 21 29 ... LastLast
Results 181 to 190 of 419
  1. #181  
    Raeralus's Avatar
    Raeralus is offline Software Engineer
    Join Date
    Nov 2012
    Location
    0x456e676c616e64
    Posts
    143
    Downloads
    2
    Uploads
    0
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    11
    Likes Received
    45
    Here is an actual script I've just wrote using those natives in the order I think seems logical. Try it out. It compiled without failure.

    Code:
    #include <common.h>
    
    void main(void) {
    
    	uint soundId = -1;
    	Ped player = GetPlayerIndex();
    	int loopTerminating = 0;
    	float x, y, z;
    	
    	char* sounds[4];
    	sounds[0] = "CAR_WASH_BARRIER";
    	sounds[1] = "CAR_WASH_SPRAY";
    	sounds[2] = "CAR_WASH_BRUSH_MOTOR";
    	sounds[3] = "CAR_WASH_BRUSHES";
    	sounds[4] = "CAR_WASH_PAY";
    	
    	REGISTER_SCRIPT_WITH_AUDIO(0);
    	
    	if(soundId == -1) {
    	
    		soundId = GET_SOUND_ID();
    	
    	}
    	
    	if(REQUEST_AMBIENT_AUDIO_BANK("SCRIPT_AMBIENT/CAR_WASH")) {
    	
    		AMBIENT_AUDIO_BANK_NO_LONGER_NEEDED();
    	
    	}
    	
    	do {
    	
    		if(IS_BUTTON_PRESSED(0, BUTTON_X) && HAS_SOUND_FINISHED(soundId)) {
    	
    			if(soundId >= -1) {
    		
    				GET_CHAR_COORDINATES(player, &x, &y, &z);
    				PLAY_SOUND_FROM_POSITION(soundId, sounds[2], x, y, z);
    		
    			}
    		
    		}
    		
    		if(loopTerminating == 1) {
    		
    			break;
    		
    		}
    		
    		WAIT(100);
    	
    	}
    	
    	while(loopTerminating != 0);
    	
    	UNREGISTER_SCRIPT_WITH_AUDIO(); 
    	return;
    	
    }
    JDMAlex and Colt like this.
    Reply With Quote  

  2. #182  
    Colt's Avatar
    Colt is online now Developer
    Join Date
    Jun 2012
    Posts
    743
    Downloads
    0
    Uploads
    0
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    740
    Likes Received
    225
    I'd love to test this out, but I've just burned my last CD and may not be able to get more until Monday. (Sorry!)

    If nobody else has tested it before then, I will test for you.
    Reply With Quote  

  3. #183  
    Raeralus's Avatar
    Raeralus is offline Software Engineer
    Join Date
    Nov 2012
    Location
    0x456e676c616e64
    Posts
    143
    Downloads
    2
    Uploads
    0
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    11
    Likes Received
    45
    Quote Originally Posted by Colt View Post
    I'd love to test this out, but I've just burned my last CD and may not be able to get more until Monday. (Sorry!)

    If nobody else has tested it before then, I will test for you.
    I'll test it in 30 minutes. Trying to find this sound that the Statue of Happiness makes when you're inside that secret area.

    EDIT 2:

    Cannot find those sounds anywhere. How would I open DAT15 files?
    Reply With Quote  

  4. #184  
    Colt's Avatar
    Colt is online now Developer
    Join Date
    Jun 2012
    Posts
    743
    Downloads
    0
    Uploads
    0
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    740
    Likes Received
    225
    Quote Originally Posted by Raeralus View Post
    I'll test it in 30 minutes. Trying to find this sound that the Statue of Happiness makes when you're inside that secret area.

    EDIT 2:

    Cannot find those sounds anywhere. How would I open DAT15 files?
    DAT15? That's a very good question. Didn't JD post something, a link to an audio thing. I know that's not very helpful but I'm sure it was the 1st post on the last page.

    Maybe you could use that?

    Edit: Here we go: http://www.gtaforums.com/index.php?s...ic=436550&st=0
    Reply With Quote  

  5. #185  
    Raeralus's Avatar
    Raeralus is offline Software Engineer
    Join Date
    Nov 2012
    Location
    0x456e676c616e64
    Posts
    143
    Downloads
    2
    Uploads
    0
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    11
    Likes Received
    45
    Quote Originally Posted by Colt View Post
    DAT15? That's a very good question. Didn't JD post something, a link to an audio thing. I know that's not very helpful but I'm sure it was the 1st post on the last page.

    Maybe you could use that?

    Edit: Here we go: GTAForums.com -> [REL] GTA IV Ivaud Editor Made by Vilavek
    I did look at that thread, and downloaded the program.

    When you try and open something, it only lets you open items with a .ivalud (Not exactly sure what its called) extension...

    EDIT:

    The sound test only got as far as loading the audio bank, and then output completely stopped. Pressing the X button did not produce any sound or print.

    Code:
    #include <common.h>
    
    void main(void) {
    
    	PRINT_STRING_WITH_LITERAL_STRING("STRING", "Sound test script loaded", 1000, 1);
    	WAIT(3000);
    
    	uint soundId = -1;
    	Ped player = GetPlayerIndex();
    	int loopTerminating = 0;
    	float x, y, z;
    	
    	PRINT_STRING_WITH_LITERAL_STRING("STRING", "Registering script with audio", 1000, 1);
    	WAIT(3000);
    	REGISTER_SCRIPT_WITH_AUDIO(0);
    	
    	if(soundId == -1) {
    	
    		PRINT_STRING_WITH_LITERAL_STRING("STRING", "Getting sound ID", 1000, 1);
    		WAIT(3000);
    		soundId = GET_SOUND_ID();
    	
    	}
    	
    	PRINT_STRING_WITH_LITERAL_STRING("STRING", "Attempting to load audio bank", 1000, 1);
    	WAIT(3000);
    	if(REQUEST_AMBIENT_AUDIO_BANK("SCRIPT_AMBIENT/CAR_WASH")) {
    	
    		AMBIENT_AUDIO_BANK_NO_LONGER_NEEDED();
    		PRINT_STRING_WITH_LITERAL_STRING("STRING", "Audio bank loaded", 1000, 1);
    		WAIT(3000);
    	
    	}
    	
    	do {
    	
    		if(IS_BUTTON_PRESSED(0, BUTTON_X)) {
    	
    			if(soundId >= -1) {
    		
    				PRINT_STRING_WITH_LITERAL_STRING("STRING", "Received request", 1000, 1);
    				WAIT(3000);
    				
    				if(HAS_SOUND_FINISHED(soundId)) {
    		
    					PRINT_STRING_WITH_LITERAL_STRING("STRING", "No sound playing", 1000, 1);
    					WAIT(3000);
    					
    					PRINT_STRING_WITH_LITERAL_STRING("STRING", "Getting character coordinates", 1000, 1);
    					WAIT(3000);
    					GET_CHAR_COORDINATES(player, &x, &y, &z);
    					
    					PRINT_STRING_WITH_LITERAL_STRING("STRING", "Playing sound from position", 1000, 1);
    					WAIT(3000);
    					PLAY_SOUND_FROM_POSITION(soundId, "CAR_WASH_SPRAY", x, y, z);
    		
    				}
    				
    				else {
    				
    					PRINT_STRING_WITH_LITERAL_STRING("STRING", "Sound currently playing", 1000, 1);
    					WAIT(3000);
    				
    				}
    		
    			}
    		
    		}
    		
    		WAIT(100);
    	
    	}
    	
    	while(loopTerminating != 0);
    	
    	UNREGISTER_SCRIPT_WITH_AUDIO(); 
    	return;
    	
    }
    Execution stops for some reason (no game crash). Might be that do while loop. I rarely use it! Checking my code.
    Reply With Quote  

  6. #186  
    Colt's Avatar
    Colt is online now Developer
    Join Date
    Jun 2012
    Posts
    743
    Downloads
    0
    Uploads
    0
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    740
    Likes Received
    225
    Maybe a different value for the ID? I'm trying to understand it as best I can, the value is -1, so could it be higher? Maybe 0 or 1?
    Reply With Quote  

  7. #187  
    Raeralus's Avatar
    Raeralus is offline Software Engineer
    Join Date
    Nov 2012
    Location
    0x456e676c616e64
    Posts
    143
    Downloads
    2
    Uploads
    0
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    11
    Likes Received
    45
    Quote Originally Posted by Colt View Post
    Maybe a different value for the ID? I'm trying to understand it as best I can, the value is -1, so could it be higher? Maybe 0 or 1?
    Nope. If you read my code, you'll see the loop is prematurely terminating! Just fixed it by using the right condition check for determining whether or not to exit the loop, and exit the script.
    Reply With Quote  

  8. #188  
    nativesith's Avatar
    nativesith is offline Moderator
    Join Date
    Jun 2011
    Location
    Los Santos
    Posts
    1,362
    Downloads
    12
    Uploads
    7
    Mentioned
    37 Post(s)
    Tagged
    1 Thread(s)
    Likes Given
    960
    Likes Received
    647
    If ya open the audio files(RPF's) with Open IV dat is where one will find the ivaud files of the PC ED.
    Raeralus likes this.
    Reply With Quote  

  9. #189  
    Raeralus's Avatar
    Raeralus is offline Software Engineer
    Join Date
    Nov 2012
    Location
    0x456e676c616e64
    Posts
    143
    Downloads
    2
    Uploads
    0
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    11
    Likes Received
    45
    Quote Originally Posted by nativesith View Post
    If ya open the audio files(RPF's) with Open IV dat is where one will find the ivaud files of the PC ED.
    I will have another look. Thanks nativesith.

    EDIT:

    The sound test has crashed the game, it is associated with GET_CHAR_COORDINATES. Don't see whats wrong.

    Code:
    #include <common.h>
    
    void main(void) {
    
    	PRINT_STRING_WITH_LITERAL_STRING("STRING", "Sound test script loaded", 1000, 1);
    	WAIT(3000);
    
    	uint soundId = -1;
    	Ped player = GetPlayerIndex();
    	int loopTerminating = 0;
    	float x, y, z;
    	
    	PRINT_STRING_WITH_LITERAL_STRING("STRING", "Registering script with audio", 1000, 1);
    	WAIT(3000);
    	REGISTER_SCRIPT_WITH_AUDIO(0);
    	
    	if(soundId == -1) {
    	
    		PRINT_STRING_WITH_LITERAL_STRING("STRING", "Getting sound ID", 1000, 1);
    		WAIT(3000);
    		soundId = GET_SOUND_ID();
    	
    	}
    	
    	PRINT_STRING_WITH_LITERAL_STRING("STRING", "Attempting to load audio bank", 1000, 1);
    	WAIT(3000);
    	if(REQUEST_AMBIENT_AUDIO_BANK("SCRIPT_AMBIENT/CAR_WASH")) {
    	
    		AMBIENT_AUDIO_BANK_NO_LONGER_NEEDED();
    		PRINT_STRING_WITH_LITERAL_STRING("STRING", "Audio bank loaded", 1000, 1);
    		WAIT(3000);
    	
    	}
    	
    	do {
    	
    		if(IS_BUTTON_PRESSED(0, BUTTON_L1) && IS_BUTTON_PRESSED(0, BUTTON_R1)) {
    	
    			PRINT_STRING_WITH_LITERAL_STRING("STRING", "Button combination caught", 1000, 1);
    			WAIT(3000);
    	
    			PRINT_STRING_WITH_LITERAL_STRING("STRING", "Received request", 1000, 1);
    			WAIT(3000);
    			
    			if(HAS_SOUND_FINISHED(soundId)) {
    	
    				PRINT_STRING_WITH_LITERAL_STRING("STRING", "No sound playing", 1000, 1);
    				WAIT(3000);
    				
    				PRINT_STRING_WITH_LITERAL_STRING("STRING", "Getting character coordinates", 1000, 1);
    				WAIT(3000);
    				GET_CHAR_COORDINATES(player, &x, &y, &z);
    				
    				PRINT_STRING_WITH_LITERAL_STRING("STRING", "Playing sound from position", 1000, 1);
    				WAIT(3000);
    				PLAY_SOUND_FROM_POSITION(soundId, "CAR_WASH_SPRAY", x, y, z);
    	
    			}
    			
    			else {
    			
    				PRINT_STRING_WITH_LITERAL_STRING("STRING", "Sound currently playing", 1000, 1);
    				WAIT(3000);
    			
    			}
    		
    		}
    		
    		WAIT(100);
    	
    	}
    	
    	while(loopTerminating != 1);
    	
    	UNREGISTER_SCRIPT_WITH_AUDIO(); 
    	return;
    	
    }
    I know why it crashed. I am using GetPlayerIndex() again... I should be using GetPlayerPed().

    EDIT:

    Okay, no crashes now, and the native is called without failure. The only issue is, I hear no sound associated with a car wash. Any ideas?

    Code:
    #include <common.h>
    
    void main(void) {
    
    	PRINT_STRING_WITH_LITERAL_STRING("STRING", "Sound test script loaded", 1000, 1);
    	WAIT(3000);
    
    	uint soundId = -1;
    	Ped player = GetPlayerPed();
    	int loopTerminating = 0;
    	float x, y, z;
    	
    	PRINT_STRING_WITH_LITERAL_STRING("STRING", "Registering script with audio", 1000, 1);
    	WAIT(3000);
    	REGISTER_SCRIPT_WITH_AUDIO(0);
    	
    	if(soundId == -1) {
    	
    		PRINT_STRING_WITH_LITERAL_STRING("STRING", "Getting sound ID", 1000, 1);
    		WAIT(3000);
    		soundId = GET_SOUND_ID();
    	
    	}
    	
    	PRINT_STRING_WITH_LITERAL_STRING("STRING", "Attempting to load audio bank", 1000, 1);
    	WAIT(3000);
    	if(REQUEST_AMBIENT_AUDIO_BANK("SCRIPT_AMBIENT/CAR_WASH")) {
    	
    		AMBIENT_AUDIO_BANK_NO_LONGER_NEEDED();
    		PRINT_STRING_WITH_LITERAL_STRING("STRING", "Audio bank loaded", 1000, 1);
    		WAIT(3000);
    	
    	}
    	
    	do {
    	
    		if(IS_BUTTON_PRESSED(0, BUTTON_L1) && IS_BUTTON_PRESSED(0, BUTTON_R1)) {
    	
    			PRINT_STRING_WITH_LITERAL_STRING("STRING", "Button combination caught", 1000, 1);
    			WAIT(3000);
    	
    			PRINT_STRING_WITH_LITERAL_STRING("STRING", "Received request", 1000, 1);
    			WAIT(3000);
    			
    			if(HAS_SOUND_FINISHED(soundId)) {
    	
    				PRINT_STRING_WITH_LITERAL_STRING("STRING", "No sound playing", 1000, 1);
    				WAIT(3000);
    				
    				PRINT_STRING_WITH_LITERAL_STRING("STRING", "Getting character coordinates", 1000, 1);
    				WAIT(3000);
    				GET_CHAR_COORDINATES(player, &x, &y, &z);
    				
    				PRINT_STRING_WITH_LITERAL_STRING("STRING", "Playing sound from position", 1000, 1);
    				WAIT(3000);
    				PLAY_SOUND_FROM_POSITION(soundId, "CAR_WASH_SPRAY", x, y, z);
    	
    			}
    			
    			else {
    			
    				PRINT_STRING_WITH_LITERAL_STRING("STRING", "Sound currently playing", 1000, 1);
    				WAIT(3000);
    			
    			}
    		
    		}
    		
    		WAIT(100);
    	
    	}
    	
    	while(loopTerminating != 1);
    	
    	UNREGISTER_SCRIPT_WITH_AUDIO(); 
    	return;
    	
    }
    Going to try another sound, and if that doesn't work, I am going to leave it to someone else. I am pretty confident this is how you work with audio. The body guard script is coming along nicely. Working online and offline. The formation is fanastic! Had everyones attention. (:
    Last edited by Raeralus; 01-05-2013 at 07:15 PM.
    Colt likes this.
    Reply With Quote  

  10. #190  
    Colt's Avatar
    Colt is online now Developer
    Join Date
    Jun 2012
    Posts
    743
    Downloads
    0
    Uploads
    0
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    740
    Likes Received
    225
    Colt's Mod Library Preview:

    Hi guys, so this past week I've been working on a loader for IV using XMC 3.5 as a menu base.
    I think I have finally got it, but a few bugs still need to be fixed before any release!

    Here's just a small preview of it:



    Now, I know this may not seem like a lot compared to some or a lot at all but for me personally it's a big step forward.

    I used XMC v4 trainer and Keredor v2 trainer in this as demos to show my Mod Library actually works.

    Also, if anyone is wondering what the difference between the "Private" version and the "Public" version is, there really
    isn't a difference. The only real difference is that my modslots are named, whereas the public version will be "Modslot 01" etc.

    There are 25 modslots available on the public version when it is released.

    Sub Menus:
    Trainers
    Keyboard Scripts
    Weapon Mods
    Map Mods
    Fun Mods

    5 slots in each, and possibly even more in the future!

    SCO Download: Coming Soon!
    Script_Network Download: Coming Soon!

    Big thanks to these guys:
    nativesith
    Emmanuel U
    Keredor
    JDMAlex
    Three-Socks
    Muskelprotze
    nativesith, maps4890 and Raeralus like this.
    Reply With Quote  

Page 19 of 42 FirstFirst ... 9 17 18 19 20 21 29 ... LastLast
Tags for this Thread

View Tag Cloud

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •