Scripting/Client/Functions/GetDistance
3D distance. Also GetDistance2D(a, b) or (x1,y1,x2,y2).
Syntax
GetDistance(a, b)GetDistance(x1,y1,z1,x2,y2,z2)Arguments
- any a
- float b
- float x1
- float y1
- float z1
- float x2
- float y2
- float z2
Returns
float
Example
function onScriptLoad()
{
local result = GetDistance( 0, 0 );
MessagePlayer( "GetDistance returned: " + result, player );
}This sample was generated from the signature – adapt the values to your gamemode.
Related pages
Section: Utility
Categories: Client functions | Utility