Help Warning
#3

Becuase you have a "Distance" stock somewhere around ur script...

Код:
//==============================================================================
stock GetClosestPlayer(playerid)
{
	if (!IsPlayerConnected(playerid)) return 0;

	new Float:cdist, targetid = -1;
	foreach (new i : Player)
	{
	    if (GetPlayerState(i) == PLAYER_STATE_SPECTATING) continue;
	    if (playerid == i) continue;

		if (targetid < 0 || cdist > GetDistanceBetweenPlayers(playerid, i))
		{
	  		targetid = i;
	  		cdist = GetDistanceBetweenPlayers(playerid, i);
		}
	}
	return targetid;
}
Reply


Messages In This Thread
Help Warning - by KingPersona - 03.04.2015, 19:02
Re: Help Warning - by KingPersona - 03.04.2015, 22:03
Re: Help Warning - by Evocator - 03.04.2015, 22:13
Re: Help Warning - by KingPersona - 04.04.2015, 11:01
Re: Help Warning - by KingPersona - 04.04.2015, 11:10
Re: Help Warning - by CalvinC - 04.04.2015, 11:57

Forum Jump:


Users browsing this thread: 1 Guest(s)