# getColShapeType (Shared)

> Tells what shape a collision shape has.

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

## Syntax

```lua
int|false getColShapeType(element shape)
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `shape` | `element` | The collision shape. |

## Returns

`0` circle, `1` cuboid, `2` sphere, `3` rectangle, `4` polygon, `5` tube. `false` if the shape has none registered.

## Example

```lua
if getColShapeType(shape) == 4 then
    local floor, ceiling = getColPolygonHeight(shape)
end
```

## See also

- [createColCircle (Shared)](https://wiki.mymp.gg/en/createColCircle.md): Creates a circular collision shape with no height limit.
- [createColPolygon (Shared)](https://wiki.mymp.gg/en/createColPolygon.md): Creates a collision shape shaped like a flat polygon, with no height limit until setColPolygonHeight gives it one.
