SA-MP Forums Archive
ReversePlayerDirection - 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: ReversePlayerDirection (/showthread.php?tid=156261)



ReversePlayerDirection - zallomallo - 21.06.2010

Is it possible to reverse a players facing angle, so they are facing opposite direction? Like if they're facing N then they'd face S.


Re: ReversePlayerDirection - Hiddos - 21.06.2010

pawn Код:
stock ReversePlayerDirection(playerid)
{
new Float:a;
GetPlayerFacingAngle(playerid,a);
if(a < 180) SetPlayerFacingAngle(playerid,a+180);
else SetPlayerFacingAngle(playerid,a-180);
}



Re: ReversePlayerDirection - zallomallo - 21.06.2010

Thank you good sir.