Jump to content

[HELP] Ped Enter Vehicle

Recommended Posts

Now I'm try to simulate ped do a carjack to the player with animations like in singleplayer, and I have a problem: when ped attached to vehicle, I found no way to play animation with updating position... ped plays animation in the same place and not moving, but when call 'setPedAnimation', I've set 'updatePosition' to true, but no effect.. May be someone tried to simulate SP ped enter/jack vehicle? May be someone made that already in resource?

Link to post

Unfortunately, these params don't change anything... I've tried.

22 minutes ago, nikitafloy said:

@Thomas_Nightfire i would check how work animation when u attach ped to Element

And look another boolean-params setPedAnimation function, u should to try different value

Unfortunately, these params don't change anything... I've tried.

Link to post

Attaching the ped to an element will effectively keep it in the designated place, the 'updatePosition' parameter will not work. I haven't seen yet a solution to this (peds jacking cars or even peds entering a vehicle using the normal mechanics); I think it can be done, though likely would not look as good as in SP, since cutting some corners would be necessary.

You need to calculate the positions required, make sure the vehicle is stationary (maybe even freeze it for a short while), make the ped walk to the car door and play the animation, you open the car door by script (on a loop if you want to see actual motion and not simply 'snap' it open), warp out the driver, move it in the right position and have it play the animation, finally warping the hijacker inside.

  • Thanks 1
Link to post

It's worth mentioning you can carjack a dead ped, if you are looking to make a workaround.

However it's almost impossible to create a workaround that looks good and works well. I've considered a lot of approaches for a workaround, but it's ridiculous for such a basic mechanic that should just work. Better to focus our efforts on fixing it in MTA.

  • Like 1
  • Sad 1
Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...