How do I mesuare the distance between the me and another player?

I’d like to do that I have a SWEP that should draw a specific hud no the screen if the the current player is X distant from another player and draw another hud if it’s Y distant from another player.
For example:



if playerDistanceFromAnother > 100 then
    drawHUD1();
elseif playerDistanceFromAnother < 100 then
    drawHUD2();
end


So basically I’d like to know how to calculate the distance between 2 player (the current player/user and another player), could someone explain me how can I do that? I think I should draw a line between this two player and measure its size or maybe get the (x, y, z) coordinates of both player and perform a simple subtraction, but could someone explain me how I could do that?

ply1:GetPos():Distance(ply2:GetPos())