Scripting/Server/Functions/GetDistance2D
Distance ignoring height.
Syntax
GetDistance2D(a, b)GetDistance2D(x1, y1, x2, y2)Arguments
- any a
- float b
- float x1
- float y1
- float x2
- float y2
Returns
float
Example
function onPlayerCommand( player, cmd, params )
{
if ( cmd == "getdistance2d" )
{
local result = GetDistance2D( 0, 0 );
MessagePlayer( "GetDistance2D returned: " + result, player );
}
}This sample was generated from the signature – adapt the values to your gamemode.
Related pages
Section: Maths and strings
Categories: Server functions | Maths and strings