10.10.2011, 11:53
This is something maybe
You should use it like this DistanceBetweenPoints = Distance(myx,myy,targetx,targety);
Код:
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; } }