Scripting/Client/Functions/InPoly

Point-in-polygon test. array is [{x=,y=}, ...] or a flat [x1, y1, x2, y2, ...].

Syntax

InPoly(x, y, array)

Arguments

Returns

bool

Example

function onScriptLoad()
{
	local pos = player.Pos;
	local result = InPoly( pos.x, pos.y, true );
	MessagePlayer( "InPoly returned: " + result, player );
}

This sample was generated from the signature – adapt the values to your gamemode.

Section: Utility

Categories: Client functions | Utility