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 Tree2Likes

Thread: [?] Eject player from car seat source MAYBE
  

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 19
  1. #1 [?] Eject player from car seat source MAYBE 
    Colt's Avatar
    Colt is online now Developer
    Join Date
    Jun 2012
    Posts
    840
    Downloads
    0
    Uploads
    0
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    807
    Likes Received
    295
    So I was getting a drink from the fridge (as you do) and an idea came into my head for an ejector seat.

    Now, I by all means accept that this could be wrong but I don't honestly know.

    Tell me what you think:

    Code:
    // I've just strung this all together literally 5 minutes ago but in my head it makes sense //
    
    if(IS_CHAR_IN_ANY_CAR(pPlayer)){
    			Ped driver;
    			SET_CHAR_WILL_FLY_THROUGH_WINDSCREEN(pPlayer,true);
    			GET_CAR_CHAR_IS_USING(pPlayer,&tmp);
    			GET_DRIVER_OF_CAR(tmp,&driver);
    			APPLY_FORCE_TO_PED(pPed,true,0.0,0.0,1000.0,0.0,0.0,0.0,true,true,true,true);
    			if(driver == pPlayer){
    				GET_NETWORK_ID_FROM_VEHICLE(tmp,&tmp2);
    				SET_NETWORK_ID_CAN_MIGRATE(tmp2,false);
    			}
    		}
    		else if(HAS_CONTROL_OF_NETWORK_ID(tmp2))
    			SET_NETWORK_ID_CAN_MIGRATE(tmp2,true);
    	}
    (I strung this together with parts of Muskelprotze's menu and changed the APPLY_FORCE_TO_CAR to APPLY_FORCE_TO_PED.)
    Last edited by Colt; 10-04-2012 at 11:19 AM.
    Mod Videos: http://www.youtube.com/DontGetAngryBro
    Reply With Quote  

  2. #2  
    zorg93's Avatar
    zorg93 is offline Developer
    Join Date
    Jun 2012
    Posts
    276
    Downloads
    0
    Uploads
    0
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    58
    Likes Received
    158
    Quote Originally Posted by Colt View Post
    So I was getting a drink from the fridge (as you do) and an idea came into my head for an ejector seat.

    Now, I by all means accept that this could be wrong but I don't honestly know.

    Tell me what you think:

    Code:
    // I've just strung this all together literally 5 minutes ago but in my head it makes sense //
    
    if(IS_CHAR_IN_ANY_CAR(pPlayer)){
    			Ped driver;
    			SET_CHAR_WILL_FLY_THROUGH_WINDSCREEN(pPlayer,true);
    			GET_CAR_CHAR_IS_USING(pPlayer,&tmp);
    			GET_DRIVER_OF_CAR(tmp,&driver);
    			APPLY_FORCE_TO_PED(pPed,true,0.0,0.0,1000.0,0.0,0.0,0.0,true,true,true,true);
    			if(driver == pPlayer){
    				GET_NETWORK_ID_FROM_VEHICLE(tmp,&tmp2);
    				SET_NETWORK_ID_CAN_MIGRATE(tmp2,false);
    			}
    		}
    		else if(HAS_CONTROL_OF_NETWORK_ID(tmp2))
    			SET_NETWORK_ID_CAN_MIGRATE(tmp2,true);
    	}
    (I strung this together with parts of Muskelprotze's menu and changed the APPLY_FORCE_TO_CAR to APPLY_FORCE_TO_PED.)
    hmmm, whats with the network ID's things, i think muskels protection mod automatically sets the ID to migrate when you leave the car. but that script doesnt look like it would work as I dont think you can apply a force to your ped when in a car
    you could try
    Code:
    GET_CHAR_COORDINATES(GetPlayerPed(), &x, &y, &z);
    z += 1;
    WARP_CHAR_FROM_CAR_TO_COORD(GetPlayerPed(), x, y, z);
    APPLY_FORCE_TO_PED(GetPlayerPed(), 1 ,0.0f ,0.0f ,1000.0f ,0.0f ,0.0f ,0.0f ,1 ,1 ,1 ,1);
    I did make an old script for chrome that put you above your car in a seat, and you'd go flying upwards and when you start falling you get out of the chair but i cant find it
    Reply With Quote  

  3. #3  
    Colt's Avatar
    Colt is online now Developer
    Join Date
    Jun 2012
    Posts
    840
    Downloads
    0
    Uploads
    0
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    807
    Likes Received
    295
    Quote Originally Posted by zorg93 View Post
    hmmm, whats with the network ID's things, i think muskels protection mod automatically sets the ID to migrate when you leave the car. but that script doesnt look like it would work as I dont think you can apply a force to your ped when in a car
    you could try
    Code:
    GET_CHAR_COORDINATES(GetPlayerPed(), &x, &y, &z);
    z += 1;
    WARP_CHAR_FROM_CAR_TO_COORD(GetPlayerPed(), x, y, z);
    APPLY_FORCE_TO_PED(GetPlayerPed(), 1 ,0.0f ,0.0f ,1000.0f ,0.0f ,0.0f ,0.0f ,1 ,1 ,1 ,1);
    So you're saying it would look like this:
    Code:
    if(item_select == 6){
    	Ped driver;
    	SET_CHAR_WILL_FLY_THROUGH_WINDSCREEN(pPlayer,true);
    	GET_CAR_CHAR_IS_USING(pPlayer,&tmp);
    	GET_DRIVER_OF_CAR(tmp,&driver);
    	GET_CHAR_COORDINATES(GetPlayerPed(), &x, &y, &z);
    	z == 1;
    	WARP_CHAR_FROM_CAR_TO_COORD(GetPlayerPed(), &x, &y, &z);
    	APPLY_FORCE_TO_PED(GetPlayerPed(), 1 ,0.0f ,0.0f ,1000.0f ,0.0f ,0.0f ,0.0f ,1 ,1 ,1 ,1);
    }
    Or like this?:
    Code:
    if(item_select == 6){
    	GET_CHAR_COORDINATES(GetPlayerPed(), &x, &y, &z);
    	z == 1;
    	WARP_CHAR_FROM_CAR_TO_COORD(GetPlayerPed(), &x, &y, &z);
    	APPLY_FORCE_TO_PED(GetPlayerPed(), 1 ,0.0f ,0.0f ,1000.0f ,0.0f ,0.0f ,0.0f ,1 ,1 ,1 ,1);
    	PRINT_STRING_WITH_LITERAL_STRING_NOW("STRING", "Something Here.", 3000, 1);
    }
    Mod Videos: http://www.youtube.com/DontGetAngryBro
    Reply With Quote  

  4. #4  
    zorg93's Avatar
    zorg93 is offline Developer
    Join Date
    Jun 2012
    Posts
    276
    Downloads
    0
    Uploads
    0
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    58
    Likes Received
    158
    Quote Originally Posted by Colt View Post
    So you're saying it would look like this:
    Code:
    if(item_select == 6){
    	Ped driver;
    	SET_CHAR_WILL_FLY_THROUGH_WINDSCREEN(pPlayer,true);
    	GET_CAR_CHAR_IS_USING(pPlayer,&tmp);
    	GET_DRIVER_OF_CAR(tmp,&driver);
    	GET_CHAR_COORDINATES(GetPlayerPed(), &x, &y, &z);
    	z == 1;
    	WARP_CHAR_FROM_CAR_TO_COORD(GetPlayerPed(), &x, &y, &z);
    	APPLY_FORCE_TO_PED(GetPlayerPed(), 1 ,0.0f ,0.0f ,1000.0f ,0.0f ,0.0f ,0.0f ,1 ,1 ,1 ,1);
    }
    Or like this?:
    Code:
    if(item_select == 6){
    	GET_CHAR_COORDINATES(GetPlayerPed(), &x, &y, &z);
    	z == 1;
    	WARP_CHAR_FROM_CAR_TO_COORD(GetPlayerPed(), &x, &y, &z);
    	APPLY_FORCE_TO_PED(GetPlayerPed(), 1 ,0.0f ,0.0f ,1000.0f ,0.0f ,0.0f ,0.0f ,1 ,1 ,1 ,1);
    	PRINT_STRING_WITH_LITERAL_STRING_NOW("STRING", "Something Here.", 3000, 1);
    }
    like the second one, but use z += 1 instead of z == 1
    Reply With Quote  

  5. #5  
    nativesith's Avatar
    nativesith is offline Moderator
    Join Date
    Jun 2011
    Location
    Los Santos
    Posts
    1,393
    Downloads
    12
    Uploads
    7
    Mentioned
    39 Post(s)
    Tagged
    2 Thread(s)
    Likes Given
    1004
    Likes Received
    672
    Love the phat MAYBE in the title man. Good luck tossin ISH son.
    Colt likes this.
    Reply With Quote  

  6. #6  
    JDMAlex's Avatar
    JDMAlex is offline & developer
    Join Date
    Nov 2010
    Posts
    742
    Downloads
    5
    Uploads
    1
    Mentioned
    9 Post(s)
    Tagged
    1 Thread(s)
    Likes Given
    204
    Likes Received
    467
    http://psx-scene.com/forums/f276/col...gether-105104/

    Jumper has his source for this very same thing if you want to look how
    Reply With Quote  

  7. #7  
    nativesith's Avatar
    nativesith is offline Moderator
    Join Date
    Jun 2011
    Location
    Los Santos
    Posts
    1,393
    Downloads
    12
    Uploads
    7
    Mentioned
    39 Post(s)
    Tagged
    2 Thread(s)
    Likes Given
    1004
    Likes Received
    672
    He has a source,download, and a video son(I also noticed he uploaded ere at Psx Scene ,NICE).
    Jiggitty Jumper, damn he is good .
    Reply With Quote  

  8. #8  
    Colt's Avatar
    Colt is online now Developer
    Join Date
    Jun 2012
    Posts
    840
    Downloads
    0
    Uploads
    0
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    807
    Likes Received
    295
    I more meant to be able to eject yourself from your own car, not ped drivers
    Mod Videos: http://www.youtube.com/DontGetAngryBro
    Reply With Quote  

  9. #9  
    EvilB's Avatar
    EvilB is offline Bringin' that funky flava
    Join Date
    Jan 2011
    Posts
    420
    Downloads
    17
    Uploads
    0
    Mentioned
    14 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    70
    Likes Received
    472
    Quote Originally Posted by JDMAlex View Post
    http://psx-scene.com/forums/f276/col...gether-105104/

    Jumper has his source for this very same thing if you want to look how
    Quote Originally Posted by Colt View Post
    I more meant to be able to eject yourself from your own car, not ped drivers
    @Colt that's what that is just change the peds handle to yours and your character will go flying out the windscreen on a button command you'll need to use SET_PED_FORCE_FLY_THROUGH_WINDSCREEN and then APPLY_FORCE_TO_PED and remove some coded thats not needed.
    Colt likes this.
    Reply With Quote  

  10. #10  
    zorg93's Avatar
    zorg93 is offline Developer
    Join Date
    Jun 2012
    Posts
    276
    Downloads
    0
    Uploads
    0
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    58
    Likes Received
    158

    ignore the crap quality, it was heavily compressed, but this was the one i made, i did fix it so you wouldnt fall so slow
    Reply With Quote  

Page 1 of 2 1 2 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
  •