is player in range of 2 points? o.o
#6

@MarkoN ...

Quote:
Originally Posted by Twinklies
Посмотреть сообщение
... if player is in range of two points? ...
Quote:
Originally Posted by MarkoN
Посмотреть сообщение
that means that he must stand near the first and the second at the same time to work...
so it should be
pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 5.0, 1566.8317, -1691.0072, 5.8906) || IsPlayerInRangeOfPoint(playerid, 5.0, 2497.3757, -1687.8939, 13.5221))
The Explication:
Код:
Point 1 = {X1, Y1, Z1};
Point 2 = {X2, Y2, Z2};

Purple colour	= "The player"
Green colour	= "Point 1";
Blue colour	= "Point 2";
Red colour	= "Intersection of 'Point 1' whit 'Point 2'"
MY.IDEEA: [Jessyy]
Код:
if(IsPlayerInRangeOfPoint(playerid, 5.0, X1, Y1, Z1) && IsPlayerInRangeOfPoint(playerid, 5.0, X2, Y2, Z2)) {
	print("YES");
}
else {
	print("NO");
}
YOUR.IDEEA: [MarkoN]
Код:
if(IsPlayerInRangeOfPoint(playerid, 5.0, X1, Y1, Z1) || IsPlayerInRangeOfPoint(playerid, 5.0, X2, Y2, Z2)) {
	print("YES");
}
else {
	print("NO");
}
First case:
Quote:

PRINTOUT - MY.IDEEA: "NO"
PRINTOUT - YOUR.IDEEA: "YES"
Second case:
Quote:

PRINTOUT - MY.IDEEA: "NO"
PRINTOUT - YOUR.IDEEA: "YES"
Third case:
Quote:

PRINTOUT - MY.IDEEA: "YES"
PRINTOUT - YOUR.IDEEA: "YES"
Read this https://sampwiki.blast.hk/wiki/Control_Structures#if ...
Reply


Messages In This Thread
is player in range of 2 points? o.o - by Twinklies - 18.09.2012, 19:04
Re: is player in range of 2 points? o.o - by Jessyy - 18.09.2012, 19:07
Re: is player in range of 2 points? o.o - by Drake1994 - 18.09.2012, 19:08
Re: is player in range of 2 points? o.o - by Twinklies - 18.09.2012, 19:08
Re: is player in range of 2 points? o.o - by MarkoN - 18.09.2012, 19:37
Re: is player in range of 2 points? o.o - by Jessyy - 18.09.2012, 21:06
Re: is player in range of 2 points? o.o - by ReneG - 18.09.2012, 22:03
Re: is player in range of 2 points? o.o - by Jessyy - 19.09.2012, 11:12

Forum Jump:


Users browsing this thread: 1 Guest(s)