Finding if player is within x of set Pos - Mental Block! - 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: Finding if player is within x of set Pos - Mental Block! (
/showthread.php?tid=416604)
Finding if player is within x of set Pos - Mental Block! -
ryansoper - 17.02.2013
Hi guys,
I can't for the life of me figure out a simple way how to check if a player's Pos is within say 10 of a Pos in an Array. Any Ideas?
Ryan
Re: Finding if player is within x of set Pos - Mental Block! -
IstuntmanI - 17.02.2013
Use IsPlayerInRangeOfPoint:
pawn Код:
if( IsPlayerInRangeOfPoint( playerid, 10.0, X, Y, Z ) )
{
SendClientMessage( playerid, -1, "Hey !" );
}
Re: Finding if player is within x of set Pos - Mental Block! -
detter - 17.02.2013
you have array of X cord ? and you want to check if is player close to any of those points ?