Forum: Grand Theft Auto Series Modding - Our GTA Modding Team is the best around. Tutorials & Topics related to modding your GTA games, trophies, and save files! Discuss GTA game modding with the knowledgeable members of PSX-Scene and the Official GTA IV Mod Team.


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 Tree3Likes

Thread: [REQ] Source code for example funny car
  

Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 23
  1. #1 Thumbs up [REQ] Source code for example funny car 
    maps4890 is offline Member
    Join Date
    Mar 2012
    Posts
    60
    Downloads
    1
    Uploads
    0
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    16
    Likes Received
    45
    Hi, I just wanted to know if any one has the source code for a "funny car"?
    If you don't know what a funny car is.. For example attaching an airplane model to a drivable car that is turned invisible. So it looks like your driving a plane. Lol
    I just want to get the source code so I can play around with creating different funny cars.
    Thanks
    Reply With Quote  

  2. #2  
    JDMAlex's Avatar
    JDMAlex is offline & developer
    Join Date
    Nov 2010
    Posts
    723
    Downloads
    5
    Uploads
    1
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    190
    Likes Received
    442
    Quote Originally Posted by maps4890 View Post
    Hi, I just wanted to know if any one has the source code for a "funny car"?
    If you don't know what a funny car is.. For example attaching an airplane model to a drivable car that is turned invisible. So it looks like your driving a plane. Lol
    I just want to get the source code so I can play around with creating different funny cars.
    Thanks
    If you look at 3 socks example for neon and then switch the models around / position.
    I'm sure theres more but I'm on my phone.
    Reply With Quote  

  3. #3  
    maps4890 is offline Member
    Join Date
    Mar 2012
    Posts
    60
    Downloads
    1
    Uploads
    0
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    16
    Likes Received
    45
    Quote Originally Posted by JDMAlex View Post
    If you look at 3 socks example for neon and then switch the models around / position.
    I'm sure theres more but I'm on my phone.
    ok i figured something out but nothing to good.
    this script i made attaches an airplane model to what ever vehicle you are in. also makes car invisible. So instead of making it spawn a car with it already attached. It attaches to what ever you get in.(boat, heli and car, but not motor cycles) lol
    disable through clicking it in evades menu. lol not to expierenced with codng
    airplane.sco
    Reply With Quote  

  4. #4  
    coldmurda is offline Member
    Join Date
    Jun 2012
    Posts
    113
    Downloads
    1
    Uploads
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    19
    Likes Received
    23
    Hey maps, whats up. If your looking for funny cars to spawn into like Evade has made, here is a source that will work for you:
    note: you will need to edit the Vehicle ID on line 10, the object hash on line 63, and the X, Y, Z, rX, rY, rZ Positions on line 66 for this to work.
    He are a bunch of Object Hashes Obj Hashes
    Code:
    #include <natives.h>
    #include <common.h>
    #include <consts.h>
    #include <types.h>
    #include <strings.h>
    void funnycar(void)
    {
    
    // This will be the vehicle that will be spawned. Check /inc/consts.h line 618 for vehicle model's.
    	uint vehicle_model = MODEL_AIRTUG ;
    	// The coords the vehicle will spawn in.
    	// For this example it will spawn it +10 away from the current player coords.
    	float spawn_x, spawn_y, spawn_z;
    	GET_CHAR_COORDINATES(GetPlayerPed(), &spawn_x, &spawn_y, &spawn_z);
    
    
    	REQUEST_MODEL(vehicle_model);
    	// Wait for the requested model to load. Otherwise it will crash if we try to use CREATE_CAR on the model.
    	while (!HAS_MODEL_LOADED(vehicle_model)) WAIT(0);	
    	// This makes so the car won't spawn in traffic but it may still spawn parked.
    	
    
    	// Actually create the car. Store it in v_spawn. 
    	// The last parameter sets if we want to use collision detection. 
    	// Use false if you want to spawn it exactly where you want it to.
    	Vehicle v_spawn;
    	CREATE_CAR(vehicle_model, spawn_x, spawn_y, spawn_z, &v_spawn, true);
    	SET_CAR_ENGINE_ON(v_spawn, 0, true);
        WARP_CHAR_INTO_CAR(GetPlayerPed(), v_spawn);
    	// Sets the vehicle heading
    	// Not needed for this example as we use usng collision detection to auto place the car.
    	//SET_CAR_HEADING(v_spawn, 180.0000);
    
    	MARK_MODEL_AS_NO_LONGER_NEEDED(v_spawn);
    
    	// Saves the car so it will not disappear.
    	SET_CAR_AS_MISSION_CAR(v_spawn);
    	SET_CAR_VISIBLE(v_spawn, false);  // change too true so you may see the car Anon
    
    	// First & Second Color
    	CHANGE_CAR_COLOUR(v_spawn, 135, 0);
    
    	// Specular Color 
    	SET_EXTRA_CAR_COLOURS(v_spawn, 135, 0);
    
    	// Clean the vehicle.
    	SET_VEHICLE_DIRT_LEVEL(v_spawn, 0);
    	WASH_VEHICLE_TEXTURES(v_spawn, 255);
    	GET_CAR_CHAR_IS_USING(GetPlayerPed(), &v_spawn);	
    	SET_CAR_CAN_BE_DAMAGED(v_spawn, false);
    	SET_CAR_CAN_BE_VISIBLY_DAMAGED(v_spawn, false);
    	SET_CAN_BURST_CAR_TYRES(v_spawn, false);
    	SET_HELI_BLADES_FULL_SPEED(v_spawn);
    
    		if (IS_CHAR_IN_ANY_CAR(GetPlayerPed()))
    	{
    		Vehicle v_spawn; 
    		GET_CAR_CHAR_IS_USING(GetPlayerPed(), &v_spawn);
    		Ped Pped = GetPlayerPed();
    		Object NeonLight;
    		//add an object hash in the first parameter
    		{
    			CREATE_OBJECT(0xH45H   ,0,0,0,&NeonLight,1);
    			WAIT(100);
    			//X: Pos X, Y: Pos Hieght, Z: Pos Width, Last 3 X Y Z's are Rotation Measurments
    			ATTACH_OBJECT_TO_CAR(NeonLight,v_spawn,0,X,Y,Z,rX,rY,rZ);
    			SET_OBJECT_VISIBLE(NeonLight, true);
    			WAIT(5000);
    			FREEZE_OBJECT_POSITION(NeonLight, true);
    			WAIT(5000);
    			SET_OBJECT_COLLISION(NeonLight, true);
    			//PRINT_STRING_WITH_LITERAL_STRING_NOW("string","Activation Text",5000,1);
    		}
    		
    	}
    
    
    }
    void main(void){			
    THIS_SCRIPT_IS_SAFE_FOR_NETWORK_GAME();
    funnycar();
    }
    I am making my own little menu of Funny Cars right now actually, so if you get anything cool, please share
    Reply With Quote  

  5. #5  
    maps4890 is offline Member
    Join Date
    Mar 2012
    Posts
    60
    Downloads
    1
    Uploads
    0
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    16
    Likes Received
    45
    Quote Originally Posted by coldmurda View Post
    Hey maps, whats up. If your looking for funny cars to spawn into like Evade has made, here is a source that will work for you:
    note: you will need to edit the Vehicle ID on line 10, the object hash on line 63, and the X, Y, Z, rX, rY, rZ Positions on line 66 for this to work.
    He are a bunch of Object Hashes Obj Hashes
    Code:
    #include <natives.h>
    #include <common.h>
    #include <consts.h>
    #include <types.h>
    #include <strings.h>
    void funnycar(void)
    {
    
    // This will be the vehicle that will be spawned. Check /inc/consts.h line 618 for vehicle model's.
    	uint vehicle_model = MODEL_AIRTUG ;
    	// The coords the vehicle will spawn in.
    	// For this example it will spawn it +10 away from the current player coords.
    	float spawn_x, spawn_y, spawn_z;
    	GET_CHAR_COORDINATES(GetPlayerPed(), &spawn_x, &spawn_y, &spawn_z);
    
    
    	REQUEST_MODEL(vehicle_model);
    	// Wait for the requested model to load. Otherwise it will crash if we try to use CREATE_CAR on the model.
    	while (!HAS_MODEL_LOADED(vehicle_model)) WAIT(0);	
    	// This makes so the car won't spawn in traffic but it may still spawn parked.
    	
    
    	// Actually create the car. Store it in v_spawn. 
    	// The last parameter sets if we want to use collision detection. 
    	// Use false if you want to spawn it exactly where you want it to.
    	Vehicle v_spawn;
    	CREATE_CAR(vehicle_model, spawn_x, spawn_y, spawn_z, &v_spawn, true);
    	SET_CAR_ENGINE_ON(v_spawn, 0, true);
        WARP_CHAR_INTO_CAR(GetPlayerPed(), v_spawn);
    	// Sets the vehicle heading
    	// Not needed for this example as we use usng collision detection to auto place the car.
    	//SET_CAR_HEADING(v_spawn, 180.0000);
    
    	MARK_MODEL_AS_NO_LONGER_NEEDED(v_spawn);
    
    	// Saves the car so it will not disappear.
    	SET_CAR_AS_MISSION_CAR(v_spawn);
    	SET_CAR_VISIBLE(v_spawn, false);  // change too true so you may see the car Anon
    
    	// First & Second Color
    	CHANGE_CAR_COLOUR(v_spawn, 135, 0);
    
    	// Specular Color 
    	SET_EXTRA_CAR_COLOURS(v_spawn, 135, 0);
    
    	// Clean the vehicle.
    	SET_VEHICLE_DIRT_LEVEL(v_spawn, 0);
    	WASH_VEHICLE_TEXTURES(v_spawn, 255);
    	GET_CAR_CHAR_IS_USING(GetPlayerPed(), &v_spawn);	
    	SET_CAR_CAN_BE_DAMAGED(v_spawn, false);
    	SET_CAR_CAN_BE_VISIBLY_DAMAGED(v_spawn, false);
    	SET_CAN_BURST_CAR_TYRES(v_spawn, false);
    	SET_HELI_BLADES_FULL_SPEED(v_spawn);
    
    		if (IS_CHAR_IN_ANY_CAR(GetPlayerPed()))
    	{
    		Vehicle v_spawn; 
    		GET_CAR_CHAR_IS_USING(GetPlayerPed(), &v_spawn);
    		Ped Pped = GetPlayerPed();
    		Object NeonLight;
    		//add an object hash in the first parameter
    		{
    			CREATE_OBJECT(0xH45H   ,0,0,0,&NeonLight,1);
    			WAIT(100);
    			//X: Pos X, Y: Pos Hieght, Z: Pos Width, Last 3 X Y Z's are Rotation Measurments
    			ATTACH_OBJECT_TO_CAR(NeonLight,v_spawn,0,X,Y,Z,rX,rY,rZ);
    			SET_OBJECT_VISIBLE(NeonLight, true);
    			WAIT(5000);
    			FREEZE_OBJECT_POSITION(NeonLight, true);
    			WAIT(5000);
    			SET_OBJECT_COLLISION(NeonLight, true);
    			//PRINT_STRING_WITH_LITERAL_STRING_NOW("string","Activation Text",5000,1);
    		}
    		
    	}
    
    
    }
    void main(void){			
    THIS_SCRIPT_IS_SAFE_FOR_NETWORK_GAME();
    funnycar();
    }
    I am making my own little menu of Funny Cars right now actually, so if you get anything cool, please share
    thanks, lol i mainly just wanted to cover basic stuff. i gotta go to work but after i got the whole week to play with this.
    one car i was thinking about trying, is the back to the future delorean, using the blista compact lol
    Also when you attach say a sultan rs to a car and if anyone shoots at it it will freeze them. Is there any kind of fix for that?
    Reply With Quote  

  6. #6  
    coldmurda is offline Member
    Join Date
    Jun 2012
    Posts
    113
    Downloads
    1
    Uploads
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    19
    Likes Received
    23
    Your saying when you attach the Sultan RS Model to a car and other plays shoot it they freeze?

    I have had similar experiences when I worked with Throwable cars if I shot them/thew them they would freeze me and the people around. I'm not so as good with this stuff as some other people are on here so I really cant help in that area.

    All I know if people have made it work before.
    Reply With Quote  

  7. #7  
    JDMAlex's Avatar
    JDMAlex is offline & developer
    Join Date
    Nov 2010
    Posts
    723
    Downloads
    5
    Uploads
    1
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    190
    Likes Received
    442
    Huh. Throwable cars?
    Reply With Quote  

  8. #8  
    coldmurda is offline Member
    Join Date
    Jun 2012
    Posts
    113
    Downloads
    1
    Uploads
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    19
    Likes Received
    23
    Quote Originally Posted by JDMAlex View Post
    Huh. Throwable cars?
    Yeah, I wasn't very good with them, but some people have flawless ones where it spawns the model of a car, you can pick it up, and throw it. That same model is used when you attach the Car Model to another Vehicle (you can make cars without tires by doing this), but maps seems to be having the same freezing issues as I use to have.
    Reply With Quote  

  9. #9  
    maps4890 is offline Member
    Join Date
    Mar 2012
    Posts
    60
    Downloads
    1
    Uploads
    0
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    16
    Likes Received
    45
    Quote Originally Posted by coldmurda View Post
    Yeah, I wasn't very good with them, but some people have flawless ones where it spawns the model of a car, you can pick it up, and throw it. That same model is used when you attach the Car Model to another Vehicle (you can make cars without tires by doing this), but maps seems to be having the same freezing issues as I use to have.
    yeah it also happens with evades premium boat car. I went online and spawned it, shot at it,froze, and then my friend shot a it, he froze also. lol
    its probably something with the source code i need to add.
    Last edited by maps4890; 09-11-2012 at 11:12 PM.
    Reply With Quote  

  10. #10  
    coldmurda is offline Member
    Join Date
    Jun 2012
    Posts
    113
    Downloads
    1
    Uploads
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    19
    Likes Received
    23
    Quote Originally Posted by maps4890 View Post
    yeah it also happens with evades premium boat car. I went online and spawned it, shot at it,froze, and then my friend shot a it, he froze also. lol
    its probably something with the source code i need to add.
    EDIT: possibly this "SET_OBJECT_COLLISION(NeonLight, true);" found in your code...
    Its very well possible that it happens on every vehicle that is loaded as an object. I stopped messing with that stuff, its way over my head.
    Reply With Quote  

Page 1 of 3 1 2 3 LastLast
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •