Making a streamer
#1

Hello, I am currently making a streamer and I need distance function.

Thank you in advance!
Reply
#2

This is something maybe

Код:
stock Distance(Float:x,Float:y,Float:xx,Float:yy)
{
new XDist = Abs(x - xx);
new YDist = Abs(y - yy);
	if(XDist > YDist)
	{
	return XDist;
	}
	else
	{
	return YDist;
	}
}
You should use it like this DistanceBetweenPoints = Distance(myx,myy,targetx,targety);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)