Jump to content

setPedFacing


Recommended Posts

Posted

can a function be added which sets the peds or players rotation so its facing either a x,y,z position or a specified element. I'm sure this can be done manually through some calculation but im no good at maths.

for example could it be

setPedFacing(ped,element) 

or

setPedFacing(ped,x,y,z) 

e.g. 1

setPedFacing(ped,player) --Will change the peds rotation so it faces the player 

e.g. 2

setPedFacing(ped,0,0,0) --Will change the peds rotation so it faces the position 0,0,0 

this would help me a lot if it was added in a future update

New CMG 2.0 Screenshot!

http://img560.imageshack.us/img560/4269/cmg2screen.png

CMG 2.0 Trailer!

Learn to script from simple video tutorials completely free! Click here for forum page

Was the scripter for CMG server!

Leaving CMG: 100%

  • 2 weeks later...
  • 2 weeks later...
Posted
If you want to change the whole player's rotation, just use setElementRotation.

i know, i just wanted to know how to find what rotation i need it to be set as so that the ped is facing the player

New CMG 2.0 Screenshot!

http://img560.imageshack.us/img560/4269/cmg2screen.png

CMG 2.0 Trailer!

Learn to script from simple video tutorials completely free! Click here for forum page

Was the scripter for CMG server!

Leaving CMG: 100%

Posted
i know, i just wanted to know how to find what rotation i need it to be set as so that the ped is facing the player
You can use findRotation.

"[...] If you don’t love it, if you’re not having fun doing it, you don’t really love it, you’re going to give up." - Steve Jobs, 2007

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...