Checking if Player is near position - 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: Checking if Player is near position (
/showthread.php?tid=600387)
Checking if Player is near position -
Agiss100 - 07.02.2016
Hi,
i've got these coordinates:
Код:
new Float:Destinations[2][3] = {
{1730.7352,721.9785,10.8203},
{1800.2280,-2036.9574,13.5235}
};
How to check if the player is near any of them?
Re: Checking if Player is near position -
Joron - 07.02.2016
https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint
Re: Checking if Player is near position -
Lucky13 - 07.02.2016
That won't help him pretty much bro-...
Here:
Код:
for(new j=0; j<2;j++)
{
if(IsPlayerInRangeOfPoint(playerid,10.0,Destinations[j][0],Destinations[j][1],Destinations[j][2]))
{
// Your code here
}
}
Re: Checking if Player is near position -
Agiss100 - 07.02.2016
Thanks for help Lucky!
Re: Checking if Player is near position -
Lucky13 - 07.02.2016
You're welcome.