Jump to content

How to make one ped pull another ped out of a vehicle


PNWParksFan

Recommended Posts

I'm trying to figure out a way to make one ped pull another out of a vehicle... preferably as gently as possible, but I'll take what I can get. I didn't see any tasks that looked relevant, but it must be possible, because when you press E with a suspect in your car your ped will yank them out. Any ideas on how to accomplish that?

[REL] Coastal Callouts: An action-packed mod with new vehicles, maps, capabilities, and callouts in and around the waters of Los Santos

[REL] Police Tape: Make your scenes more realistic while stopping peds and traffic

[REL] Better EMS: Realistic and dynamic EMS response

Join the Parks Benefactor Program to support my work and get early beta access!

Link to comment
Share on other sites

1 hour ago, PNWParksFan said:

I'm trying to figure out a way to make one ped pull another out of a vehicle... preferably as gently as possible, but I'll take what I can get. I didn't see any tasks that looked relevant, but it must be possible, because when you press E with a suspect in your car your ped will yank them out. Any ideas on how to accomplish that?

Try to make the ped enter the vehicle on the same seat. They'll pull them out. Once the're out you can cancel the enter vehicle task.

Just a guess here.

My YouTube: Click here. 

My Discord Server - https://discord.gg/0taiZvBSiw5qGAXU

Useful post? Let me and others know by clicking the Like button.
Check out my many script modifications! 
Having issues? LSPDFR Troubleshooter by Albo1125.

Link to comment
Share on other sites

  • 4 weeks later...
On Tuesday, April 12, 2016 at 0:13 PM, Albo1125 said:

Try to make the ped enter the vehicle on the same seat. They'll pull them out. Once the're out you can cancel the enter vehicle task.

Just a guess here.

I don't think that works, assuming you mean Tasks.EnterVehicle. If the seat index you specify is occupied they do not do anything. I tried having them FightAgainst the driver but that did not work either.

Edited by goigle
Link to comment
Share on other sites

There is a task that is something along the lines of jack ped where you pass of the jacker and the jackee

Edit: I was wrong. I was thinking of the property that sets whether the ped stays in a jacked vehicle but now thinking about it, it'd probably be what keeps passengers in as hostages

Edited by ainesophaur
Link to comment
Share on other sites

7 hours ago, goigle said:

I don't think that works, assuming you mean Tasks.EnterVehicle. If the seat index you specify is occupied they do not do anything. I tried having them FightAgainst the driver but that did not work either.

Were you trying with passenger seats? I know it works for the drivers seat, as my GTA ambient event uses Tasks.EnterVehicle and I've seen peds triggering it rip out the driver of the target vehicle.

My YouTube Channel: Darkmyre Gaming (Australian LSPDFR patrols, plugins in development, and other games)

My Discord Server | AusGamer Network

 

Please do not PM me for technical support or bug reports, use the appropriate forum or plugin's comments instead.

Link to comment
Share on other sites

6 hours ago, ainesophaur said:

There is a task that is something along the lines of jack ped where you pass of the jacker and the jackee

I can't find any jacking related tasks in the native DB or in RPH

[REL] Coastal Callouts: An action-packed mod with new vehicles, maps, capabilities, and callouts in and around the waters of Los Santos

[REL] Police Tape: Make your scenes more realistic while stopping peds and traffic

[REL] Better EMS: Realistic and dynamic EMS response

Join the Parks Benefactor Program to support my work and get early beta access!

Link to comment
Share on other sites

1 hour ago, Darkmyre said:

Were you trying with passenger seats? I know it works for the drivers seat, as my GTA ambient event uses Tasks.EnterVehicle and I've seen peds triggering it rip out the driver of the target vehicle.

Exactly. I've had it work with the driver's seat; haven't tried with passenger seats though.

My YouTube: Click here. 

My Discord Server - https://discord.gg/0taiZvBSiw5qGAXU

Useful post? Let me and others know by clicking the Like button.
Check out my many script modifications! 
Having issues? LSPDFR Troubleshooter by Albo1125.

Link to comment
Share on other sites

I wonder how it is done when one ped pull another one (usually it's the the player) out of his vehicle when angry. I'd check in decompiled scripts for some kind of ped behavior controller. Maybe there's a native which does not have a literal name yet.

Link to comment
Share on other sites

The LSPDFR devs must know some way that works. When you put a ped in the back seat of your car, you can then pull them back out by pressing E twice. I wonder if @LMS can share how that works?

[REL] Coastal Callouts: An action-packed mod with new vehicles, maps, capabilities, and callouts in and around the waters of Los Santos

[REL] Police Tape: Make your scenes more realistic while stopping peds and traffic

[REL] Better EMS: Realistic and dynamic EMS response

Join the Parks Benefactor Program to support my work and get early beta access!

Link to comment
Share on other sites

1 hour ago, PNWParksFan said:

The LSPDFR devs must know some way that works. When you put a ped in the back seat of your car, you can then pull them back out by pressing E twice. I wonder if @LMS can share how that works?

From what I can tell the player ped is given  the TASK_OPEN_VEHICLE_DOOR task. The player is then given an animation to play and the suspect is given a LeaveVehicle task. Immediately thereafter the suspect is made to ragdoll.

I don't think this is a built in function.

TASK_LEAVE_VEHICLE(Ped ped, Vehicle vehicle, int flags)

Flags from decompiled scripts:
0 = normal exit and closes door.
1 = normal exit and closes door.
16 = teleports outside, door kept closed.
64 = normal exit and closes door, maybe a bit slower animation than 0.
256 = normal exit but does not close the door.
4160 = ped is throwing himself out, even when the vehicle is still.

4160 is the flag used to make the suspect leave the vehicle, probably.

Edited by Albo1125

My YouTube: Click here. 

My Discord Server - https://discord.gg/0taiZvBSiw5qGAXU

Useful post? Let me and others know by clicking the Like button.
Check out my many script modifications! 
Having issues? LSPDFR Troubleshooter by Albo1125.

Link to comment
Share on other sites

On Friday, May 06, 2016 at 5:50 AM, Albo1125 said:

Exactly. I've had it work with the driver's seat; haven't tried with passenger seats though.

 

On Friday, May 06, 2016 at 4:18 AM, Darkmyre said:

Were you trying with passenger seats? I know it works for the drivers seat, as my GTA ambient event uses Tasks.EnterVehicle and I've seen peds triggering it rip out the driver of the target vehicle.

No, I was doing the driver seat, it was on an older version of RPH (I want to say before 30) so maybe there was a change? I might also have been doing something else wrong, I didn't spend too much time trying to figure it out.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...