ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Shared functions
  3. setColPolygonHeight

Function

setColPolygonHeight

Server and clientCollision shapesIdentical to MTA:SA

Limits a polygon zone vertically: it detects only between floor and ceil heights (e.g. one floor of a building). false, false removes the limit. The order of the numbers does not matter.

Syntax

bool setColPolygonHeight(colshape shape, float floor, float ceil)

Arguments

shapecolshape
A polygon zone.
floorfloat
Lower height, or false.
ceilfloat
Upper height, or false.

Returns

true on success.

Example

local floor2 = createColPolygon(0, 0, -5, -5, 5, -5, 5, 5, -5, 5)
setColPolygonHeight(floor2, 16, 20)

See also