[Include] [INC] a_angles
#20

It seems like it doesn't work :/

Would this work?
pawn Код:
stock IsPlayerFacingPoint(playerid, x, y, radi)
{
  new Float:pX, Float:pY, Float:pZ, Float:Angle, Float:pAngle;
  GetPlayerPos(playerid, pX, pY, pZ);
  GetAngleToXY(x, y, pX, pY, Angle);
  if(pAngle - radi <= Angle && pAngle + radi >= Angle) return 1;
  return 0;
}

stock GetAngleToXY(Float:X, Float:Y, Float:CurrentX, Float:CurrentY, &Float:Angle)
{
  Angle = atan2(Y-CurrentY, X-CurrentX);
  Angle = floatsub(Angle, 90.0);
  if(Angle < 0.0) Angle = floatadd(Angle, 360.0);
}
Reply


Messages In This Thread
[INC] a_angles - by Tannz0rz - 30.10.2009, 01:04
Re: [INC] a_angles - by yom - 30.10.2009, 01:31
Re: [INC] a_angles - by Tannz0rz - 30.10.2009, 01:40
Re: [INC] a_angles - by Chaprnks - 30.10.2009, 03:27
Re: [INC] a_angles - by Tannz0rz - 30.10.2009, 14:45
Re: [INC] a_angles - by R370 - 30.10.2009, 17:34
Re: [INC] a_angles - by Tannz0rz - 30.10.2009, 18:45
Re: [INC] a_angles - by Sergei - 30.10.2009, 18:48
Re: [INC] a_angles - by NeRoSiS - 30.10.2009, 19:04
Re: [INC] a_angles - by Sergei - 30.10.2009, 19:07
Re: [INC] a_angles - by Tannz0rz - 30.10.2009, 19:24
Re: [INC] a_angles - by NeRoSiS - 30.10.2009, 19:27
Re: [INC] a_angles - by Toney - 16.11.2009, 08:56
Re: [INC] a_angles - by cyber_punk - 16.11.2009, 12:46
Re: [INC] a_angles - by FreshKilla - 01.12.2009, 23:40
Re: [INC] a_angles - by IamNotKoolllll - 01.12.2009, 23:57
Re: [INC] a_angles - by mprofitt - 02.12.2009, 00:16
Re: [INC] a_angles - by Kurence - 12.12.2009, 08:56
Re: [INC] a_angles - by _[HuN]_Epsilon_ - 06.01.2010, 13:48
Re: [INC] a_angles - by Coicatak - 06.02.2010, 15:39
Re: [INC] a_angles - by acade - 25.02.2010, 20:04
Re: [INC] a_angles - by M0R0JR - 10.10.2010, 16:29
Re: [INC] a_angles - by JulietaZ - 10.10.2010, 17:25
Re: [INC] a_angles - by Mauzen - 10.10.2010, 17:47
Re: [INC] a_angles - by M0R0JR - 10.10.2010, 18:21
Re: [INC] a_angles - by Dirkon - 26.12.2010, 17:34
Re: [INC] a_angles - by cyber_punk - 26.12.2010, 22:57
Re: [INC] a_angles - by justsomeguy - 27.12.2010, 00:33
Re: [INC] a_angles - by Dirkon - 27.12.2010, 09:37
Re: [INC] a_angles - by cyber_punk - 27.12.2010, 19:42
Re: [INC] a_angles - by yanir3 - 28.05.2013, 12:19

Forum Jump:


Users browsing this thread: 1 Guest(s)