07.12.2010, 02:33
pawn Код:
stock Float:GetDistanceBetweenPoints(Float:x,Float:y,Float:z,Float:x2,Float:y2,Float:z2)
{
new Float:distance[3];
distance[0] = x - x2;
distance[0] *= distance[0];
distance[1] = y - y2;
distance[1] *= distance[1];
distance[2] = z - z2;
distance[2] *= distance[2];
distance[0] += distance[1] + distance[2];
return floatsqroot(distance[0]);
}