Greenie0101 Posted October 3, 2012 Posted October 3, 2012 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%
Greenie0101 Posted October 7, 2012 Author Posted October 7, 2012 never saw that function, thanks alot 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%
Greenie0101 Posted October 25, 2012 Author Posted October 25, 2012 setPedLookAt btw only turns the peds head 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%
Anderl Posted October 25, 2012 Posted October 25, 2012 If you want to change the whole player's rotation, just use setElementRotation. "[...] 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
Greenie0101 Posted November 3, 2012 Author Posted November 3, 2012 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%
Anderl Posted November 3, 2012 Posted November 3, 2012 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
Recommended Posts