Jump to content

How to make a Ped follow the player


harryh

Recommended Posts

What functions would I need to use to get a ped to follow a player with a walking animation. Unsure how I would do it as with setElementPosition it will teleport. and not walk.

Puedocode:

getPedInformation

createPed with info

spawn Ped

Set to follow the player 

In and out of cars etc.

 

Edited by harryh
Link to comment

And you could use too the sloth bot ressource, it's easy to use :

https://wiki.multitheftauto.com/wiki/Slothman/Slothbot

You can choose the bot mod as you can read in this wiki. But, as far I remember, the bot will'nt go in the you vehicle, so, use 

setPedControlState()

(as TheMOG said)

But, you'll need to check when a player go inside a vehicle (an event, so) :

OnPlayerVehicleEnter

Good luck ! :D

Edited by Gordon_G
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...