Is Player Behind Player - 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)
+--- Thread: Is Player Behind Player (
/showthread.php?tid=498277)
Is Player Behind Player -
mirou123 - 02.03.2014
Hey everyone.I have a command that I wan to work only if a player is behind an other player but I have no idea how to start.I hope someone can help me.Thank you.
Re: Is Player Behind Player -
jakejohnsonusa - 02.03.2014
This is the best way, it can't detect behind, but it will detect if they are near the player.
pawn Код:
new Float:x, Float:y, Float:z;
GetPlayerPos(pID, x, y, z);
if(IsPlayerInRangeOfPoint(playerid, 5, x, y, z))
{
/* do your things here */
}
Re : Is Player Behind Player -
mirou123 - 03.03.2014
Oh thanks.But I do need to be behind him.I am already using a_angles and it has that function