ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Server functions
  3. addColPolygonPoint

Function

addColPolygonPoint

ServerCollision shapesIdentical to MTA:SA

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)

See also