5 coordinates - 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: 5 coordinates (
/showthread.php?tid=246925)
5 coordinates -
GaudenasLT - 06.04.2011
Hi, i have problem, i dont know how to create, that check or player is in point or not of 5 coordinates.
Sorry, my bad english
Re: 5 coordinates -
Elka_Blazer - 06.04.2011
if(IsPlayerInRangeOfPoint(playerid,RANGE,X,Y,Z))
Re: 5 coordinates -
Alby Fire - 06.04.2011
pawn Код:
stock IsPlayerInMyRange(playerid)
{
if(IsPlayerInRangeOfPoint(playerid, RANGE, X, Y, Z)) {
return true;
}
if(IsPlayerInRangeOfPoint(playerid, RANGE, X, Y, Z)) {
return true;
}
if(IsPlayerInRangeOfPoint(playerid, RANGE, X, Y, Z)) {
return true;
}
if(IsPlayerInRangeOfPoint(playerid, RANGE, X, Y, Z)) {
return true;
}
if(IsPlayerInRangeOfPoint(playerid, RANGE, X, Y, Z)) {
return true;
}
return false;
}
Change RANGE, X, Y and Z with your coordinates.
Use it like this
pawn Код:
if(IsPlayerInMyRange(playerid)) {
//Functions
}
Re: 5 coordinates -
GaudenasLT - 07.04.2011
Thanks, for you ;]