SA-MP Forums Archive
Setting vehicle facing angle - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Setting vehicle facing angle (/showthread.php?tid=194787)



Setting vehicle facing angle - Pooh7 - 30.11.2010

What is function to set vehicle facing angle?


Re: Setting vehicle facing angle - Vince - 30.11.2010

SetVehicleZAngle


Re: Setting vehicle facing angle - Pooh7 - 30.11.2010

Hmm, it doesn't work ://
I set to 90.0, but vehicles is facing to the north, not west

Image:
http://slike.hr/slike/samp864_52cc9.png.html

Part of code:
pawn Code:
SetVehicleZAngle(Grupa1[1], 90.0);
SetVehicleZAngle(Grupa1[2], 90.0);
SetVehicleZAngle(Grupa1[3], 90.0);
SetVehicleZAngle(Grupa1[4], 90.0);
How to fix it?


Re: Setting vehicle facing angle - Jochemd - 30.11.2010

I do not think you did, but if you have entered the clothing room in The Johnson House, and then go back, they will also face to the north. But Like I said, I do not think you did.


Re: Setting vehicle facing angle - Buwla - 30.11.2010

90 is north, 180 is west if im not wrong.


Re: Setting vehicle facing angle - Mauzen - 30.11.2010

Just try some other values, like 0 and 180. Also make sure you are using the right vehicle ids.


Re: Setting vehicle facing angle - PowerPC603 - 30.11.2010

0 degrees is north, 90 is west, 180 is south and 270 is east.


Re: Setting vehicle facing angle - Grim_ - 30.11.2010

Make sure you are using the correct vehicle IDs. Also, where are you using the function?


This forum requires that you wait 120 seconds between posts. Please try again in 43 seconds.


Re: Setting vehicle facing angle - Pooh7 - 05.12.2010

Vehicle IDs are 100% correct.
I'm using it in command for event vehicles teleporting.

@PowerPC603
You can see that I'm set 90.0 for west, but vehicles are facing to north.


Re: Setting vehicle facing angle - Pooh7 - 06.12.2010

Refresh!


Respuesta: Re: Setting vehicle facing angle - clavador - 20.07.2011

Quote:
Originally Posted by Pooh7
View Post
Refresh!
How old is this??

Im having the same bug.

I set ZVehicleAngle with the right vehicleid and is facing anywhere but where I want to.

I have to destroy and create the vehicle again for it to face the right direction.

EDIT:

I've found that I have to be inside the vehicle to properly set it's angle. If I go inside the vehcle and change the ZAngle it has no problems. If I leave the vehicle and try to set Zangle it will just rotate a few times and then it gets stucked.