Jump to content

Ped Follows you


Xeno

Recommended Posts

Posted

Hey guys,

I was wondering if it was possible to create a ped that follows you around, a bit like a body guard.

If so how, i would proberly get as far as this :P.

function pedLoad()
ped1 = createPed ( 287, 223, 1875, 18 )
giveWeapon( ped1, 31, 500, true )
setTimer( giveWeapon, 1000, 1, ped1, 31, 500, true)
end
 
 
addEventHandler ( "onResourceStart", getRootElement(), pedLoad )

Posted

so you created a ped, now you gotta move it. you need to calculate the angle you need it to turn, you can make it move forward with setcontrolstate or setting an animation.

Posted
you cannot trigger singleplayer cheats in mta

That's not what he asked either, (and by the way, yes you can, but only a few) maybe you should read a bit more carefully.

The thing about peds is, they're somewhat difficult to control since you can only set individual controls on or off. Maybe someone could create a "control library" for peds with functions like "goTowardsPoint" or something, but until then you're stuck doing it this way.

Posted

Thank you very much, i saw the video on you tube and that gave me an idea of an admin body guard (which im makeing now) and i will be sure to mention that you helped me. Thanks :big7:

Posted

keep in mind also that the script he wrote is clientside only, and won't sync with other players. I am also currently working on a bot designed for teamplay, its a lot of work not only making them smart, but making sure that they are sycned effectively.

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