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

Function

getColPolygonPoints

ServerCollision shapesIdentical to MTA:SA

Returns all vertices of a polygon zone as a table of {x, y} pairs.

Syntax

table getColPolygonPoints(colshape shape)

Arguments

shapecolshape
A polygon zone.

Returns

A table { {x, y}, ... }, or false for another zone.

Example

local zone = createColPolygon(0, 0, -5, -5, 5, -5, 5, 5)
for i, p in ipairs(getColPolygonPoints(zone)) do outputDebugString(i .. ": " .. p[1] .. ", " .. p[2]) end

See also