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

Function

setColPolygonPointPosition

ServerCollision shapesIdentical to MTA:SA

Moves a vertex of a polygon zone; the detection area changes immediately.

Syntax

bool setColPolygonPointPosition(colshape shape, int index, float x, float y)

Arguments

shapecolshape
A polygon zone.
indexint
Vertex number from 1.
xfloat
New X.
yfloat
New Y.

Returns

true on success.

Example

local zone = createColPolygon(0, 0, -5, -5, 5, -5, 5, 5)
setColPolygonPointPosition(zone, 3, 10, 10)

See also