Jump to content

Following


Baseplate

Recommended Posts

If you want the ped to exactly walk into your steps at a distance, I would recommend this:

onClientRender/onClientPreRender/setTimer:

  • Let ped face towards you using https://wiki.multitheftauto.com/wiki/FindRotation (fill in your x,y and ped's x,y).
  • Get distance between you and the ped using getDistanceBetweenPoints3D. When distance < x (followdistance), use setPedControlState to make the ped running, if he isn't already running to you. When distance > x, use setPedControlState to stop the ped from running, if he is still running.

Ped will always be looking at you, when you are getting too far away, he will keep running to you until distance between you and him < x.

Link to comment

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...