- Documentation
- Shared functions
- createColRectangle
Function
createColRectangle
Creates a rectangular collision zone from the corner (x, y) - with no height limit. The size is given in metres along X and Y.
Syntax
colshape createColRectangle(float fX, float fY, float fWidth, float fHeight)Arguments
fXfloat- Corner X (lowest X).
fYfloat- Corner Y (lowest Y).
fWidthfloat- Size along X.
fHeightfloat- Size along Y.
Returns
The new zone.
Example
local parking = createColRectangle(2480, -1680, 30, 20)
See also
createColCuboidCreates a box-shaped collision zone from the corner (x, y, z): width along X, depth along Y and height upward.createColPolygonCreates a collision zone shaped as any polygon on the map (e.g. a gang territory outline). The first two numbers are the centre point (element position), then x, y pairs of vertices - at least three. No height limit by default;setColPolygonHeightsets a range.