float GetEntitiesDistance ( string &in fromEntity, string &in toEntity )
{
float x1 = GetEntityPosX( fromEntity );
float y1 = GetEntityPosY( fromEntity );
float z1 = GetEntityPosZ( fromEntity );
float x2 = GetEntityPosX( toEntity );
float y2 = GetEntityPosY( toEntity );
float z2 = GetEntityPosZ( toEntity );
float distance1 = MathSqrt(MathPow(MathAbs(x1),2) + MathPow(MathAbs(z1),2));
distance1 = MathSqrt(MathPow(MathAbs(y1),2) + MathPow(MathAbs(distance1),2));
float distance2 = MathSqrt(MathPow(MathAbs(x2),2) + MathPow(MathAbs(z2),2));
distance2 = MathSqrt(MathPow(MathAbs(y2),2) + MathPow(MathAbs(distance2),2));
float totalDistance = MathMax(distance1,distance2) - MathMin(distance1,distance2);
return totalDistance;
}