# createColTube (Shared)

> Creates a collision shape shaped like an upright cylinder.

- **Platform**: MY Multiplayer (MYMP)
- **Kind**: Lua Function
- **Side**: Shared
- **Category**: Collision shapes
- **URL**: https://wiki.mymp.gg/en/createColTube

## Syntax

```lua
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

```lua
local tower = createColTube(1544.0, -1353.0, 13.0, 15, 320)
```

## See also

- [createColCircle (Shared)](https://wiki.mymp.gg/en/createColCircle.md): Creates a circular collision shape with no height limit.
- [createColSphere (Shared)](https://wiki.mymp.gg/en/createColSphere.md): Creates a spherical collision shape.
- [onColShapeHit (Server)](https://wiki.mymp.gg/en/onColShapeHit.md): Fired when a player, ped, vehicle or object enters a collision shape.
