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



Radius - Runedog48 - 18.07.2011

I have an idea but IDK if it will work and I have no-one to test it with: Will this work (radius = 5)

Код:
GetPlayerPos(playerid, xx, yy, zz);
GetPlayerPos(id, x, y, z);
xxx = x - xx;
yyy = y - yy;
zzz = z - zz;
if(xxx <= 5){
return 1;
} else if(yyy <= 5){
return 1;
}
will this work? I want it to do something if the person is within a radius of 5


Re: Radius - DRIFT_HUNTER - 18.07.2011

Why you dont use IsPlayerInRangeOfPoint?


Re: Radius - Runedog48 - 18.07.2011

Quote:
Originally Posted by DRIFT_HUNTER
Посмотреть сообщение
Why you dont use IsPlayerInRangeOfPoint?
Sorry, didn't know they had that o.0