Player to point
#2

Код:
forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
Код:
public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
{
  if(IsPlayerConnected(playerid))
	{
		new Float:oldposx, Float:oldposy, Float:oldposz;
		new Float:tempposx, Float:tempposy, Float:tempposz;
		GetPlayerPos(playerid, oldposx, oldposy, oldposz);
		tempposx = (oldposx -x);
		tempposy = (oldposy -y);
		tempposz = (oldposz -z);
		if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
		{
			return true;
		}
	}
	return false;
}
cheerz
Reply


Messages In This Thread
Player to point - by Geekzor - 11.08.2009, 16:43
Re: Player to point - by Basss - 11.08.2009, 17:01
Re: Player to point - by Joe Staff - 11.08.2009, 17:02
Re: Player to point - by Geekzor - 11.08.2009, 18:18

Forum Jump:


Users browsing this thread: 1 Guest(s)