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
- float x
- float y
- array value
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.
Related pages
- Vector
- Colour
- VectorScreen
- GetDistance
- GetTok
- IsIn
- GetTime
- date
- GetVehicleModel
- GetVehicleName
- NewTimer
- HashTable
Section: Utility
Categories: Client functions | Utility