- Documentation
- Server functions
- addColPolygonPoint
Function
addColPolygonPoint
Adds a vertex to a polygon zone. Without index at the end, with index - at that position in the list (from 1). The detection area changes immediately.
Syntax
bool addColPolygonPoint(colshape shape, float x, float y [, int index = koniec])Arguments
shapecolshape- A polygon zone.
xfloat- Vertex X.
yfloat- Vertex Y.
indexint, optional = koniec- Position in the list from 1.
Returns
true on success.
Example
local zone = createColPolygon(0, 0, -5, -5, 5, -5, 5, 5)
addColPolygonPoint(zone, -5, 5)