SA-MP Forums Archive
Getting Car 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: Getting Car Angle (/showthread.php?tid=98200)



Getting Car Angle - xCoder - 19.09.2009

Hey I can get car angle GetPlayerFacingAngle doesn't working please help!


Re: Getting Car Angle - Peter_Corneile - 19.09.2009

Car coords are like this

pawn Код:
AddStaticVehicle(Floatx,Floaty,Floatz,FloatAngle,Color1,Color2);



Re: Getting Car Angle - Djiango - 19.09.2009

GetVehicleZAngle(vehicleid, Float:rotation);

Edit... vVv

Example:
pawn Код:
if(IsPlayerInAnyVehicle(playerid))
{
  new string[30];
  new Float:rotation;
  new vehicleid = GetPlayerVehicleID(playerid);
  GetVehicleZAngle(vehicleid, rotation);
  format(string, sizeof(string), "Vehicle Rotation = %f", rotation);
  SendClientMessage(playerid, COLOR_BLUE, string);
  return 1;
}