[Help]Angle
#1

how to know angle?
Reply
#2

https://sampwiki.blast.hk/wiki/GetPlayerFacingAngle
Reply
#3

What Angle, there are alot.
To know the players, it's GetPlayerFacingAngle(); To get a cars it's GetVehicleZAngle();
Reply
#4

When you are in a vehicle, you should use
pawn Код:
GetVehicleZAngle(vehicleid);
When you are on foot you should use
pawn Код:
GetPlayerFacingAngle(playerid);
If you are wanting to get the opposite facing angle (such as behind you or to your side) you can always use simple math:
pawn Код:
new Float:angle = GetPlayerFacingAngle(playerid)-90.0;
It is important to note that when you get these values they are placed as a float, so you should use them when appropriate. If you need/want to make them an integer use
pawn Код:
floatround(angle); //Or whatever float variable you want to be made into an integer
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)