[Help] Only people who are near me can see what i write
#6

Quote:
Originally Posted by dice7
Open up the search function and type in GetClosestPlayer
Код:
forward GetClosestPlayer(p1);
Код:
public GetClosestPlayer(p1)
{
	new x,Float:dis,Float:dis2,player;
	player = -1;
	dis = 99999.99;
	for (x=0;x<MAX_PLAYERS;x++)
	{
		if(IsPlayerConnected(x))
		{
			if(x != p1)
			{
				dis2 = GetDistanceBetweenPlayers(x,p1);
				if(dis2 < dis && dis2 != -1.00)
				{
					dis = dis2;
					player = x;
				}
			}
		}
	}
	return player;
}
Is this what you are talking about? Answer me please
Reply


Messages In This Thread
[Help] Only people who are near me can see what i write - by Alex_Grant - 28.08.2009, 08:57
Re: Only people who are near me can hear me - by dice7 - 28.08.2009, 09:00
Re: Only people who are near me can hear me - by boelie - 28.08.2009, 09:05
Re: Only people who are near me can hear me - by Alex_Grant - 28.08.2009, 10:08
Re: [Help] Only people who are near me can see what i write - by dice7 - 28.08.2009, 10:11
Re: [Help] Only people who are near me can see what i write - by Alex_Grant - 28.08.2009, 10:26

Forum Jump:


Users browsing this thread: 1 Guest(s)