createColTube
Shared
Creates a collision shape shaped like an upright cylinder.
element|false createColTube(float x, y, z, float radius, float height)
Parameters
| Name | Type | Description |
|---|---|---|
| x, y, z | float | The centre of the cylinder's base. A vec3 also works. |
| radius | float | The radius in metres. |
| height | float | The height above the base, in metres. |
Returns
The created colshape element, or false if it could not be created.
A collision shape detects players, peds, vehicles and objects by their position and fires onColShapeHit and onColShapeLeave (onClientColShapeHit and onClientColShapeLeave on a client). It goes away when the resource that created it stops.
Example
local tower = createColTube(1544.0, -1353.0, 13.0, 15, 320)