[**SixL client API**](../../README.md)

***

[SixL client API](../../README.md) / [colshapes](../README.md) / ColshapeMpPool

# Interface: ColshapeMpPool

The colshapes this client made: `mp.colshapes`.

## Example

```ts
for (const shape of mp.colshapes.toArray()) shape.destroy();
```

## Properties

### length

> `readonly` **length**: `number`

The number of colshapes this client made and has not destroyed.

#### Example

```ts
const count = mp.colshapes.length;
```

## Methods

### at()

> **at**(`id`): [`ColshapeMp`](ColshapeMp.md)

The colshape with this number, or `undefined`.

#### Parameters

##### id

`number`

The colshape's number on this client.

#### Returns

[`ColshapeMp`](ColshapeMp.md)

The colshape, or `undefined`.

#### Example

```ts
const zone = mp.colshapes.at(1);
```

***

### exists()

> **exists**(`shape`): `boolean`

Whether the colshape (or the number) is in the pool.

#### Parameters

##### shape

`number` \| [`ColshapeMp`](ColshapeMp.md)

The colshape, or its number.

#### Returns

`boolean`

`true` while it exists.

#### Example

```ts
if (mp.colshapes.exists(zone)) { }
```

***

### newCircle()

> **newCircle**(`x`, `y`, `range`, `dimension?`): [`ColshapeMp`](ColshapeMp.md)

Makes a circle: a round zone of any height.

#### Parameters

##### x

`number`

The centre's x.

##### y

`number`

The centre's y.

##### range

`number`

The radius, metres.

##### dimension?

`number`

The dimension (0 by default).

#### Returns

[`ColshapeMp`](ColshapeMp.md)

The new colshape.

#### Remarks

Partial: not yet confirmed in the game.

#### Example

```ts
const zone = mp.colshapes.newCircle(10, 20, 5);
```

***

### newCuboid()

> **newCuboid**(`x`, `y`, `z`, `width`, `depth`, `height`, `dimension?`): [`ColshapeMp`](ColshapeMp.md)

Makes a cuboid centred on a point.

#### Parameters

##### x

`number`

The centre's x.

##### y

`number`

The centre's y.

##### z

`number`

The centre's z.

##### width

`number`

Its size along x, metres.

##### depth

`number`

Its size along y, metres.

##### height

`number`

Its size along z, metres.

##### dimension?

`number`

The dimension (0 by default).

#### Returns

[`ColshapeMp`](ColshapeMp.md)

The new colshape.

#### Remarks

Partial: not yet confirmed in the game.

#### Example

```ts
const zone = mp.colshapes.newCuboid(10, 20, 30, 4, 4, 3);
```

***

### newRectangle()

> **newRectangle**(`x`, `y`, `width`, `height`, `dimension?`): [`ColshapeMp`](ColshapeMp.md)

Makes a rectangle centred on a point: of any height.

#### Parameters

##### x

`number`

The centre's x.

##### y

`number`

The centre's y.

##### width

`number`

Its size along x, metres.

##### height

`number`

Its size along y, metres.

##### dimension?

`number`

The dimension (0 by default).

#### Returns

[`ColshapeMp`](ColshapeMp.md)

The new colshape.

#### Remarks

Partial: not yet confirmed in the game.

#### Example

```ts
const zone = mp.colshapes.newRectangle(10, 20, 8, 6);
```

***

### newSphere()

> **newSphere**(`x`, `y`, `z`, `range`, `dimension?`): [`ColshapeMp`](ColshapeMp.md)

Makes a sphere.

#### Parameters

##### x

`number`

The centre's x.

##### y

`number`

The centre's y.

##### z

`number`

The centre's z.

##### range

`number`

The radius, metres.

##### dimension?

`number`

The dimension (0 by default).

#### Returns

[`ColshapeMp`](ColshapeMp.md)

The new colshape.

#### Remarks

Partial: not yet confirmed in the game.

#### Example

```ts
const zone = mp.colshapes.newSphere(10, 20, 30, 5);
```

***

### newTube()

> **newTube**(`x`, `y`, `z`, `range`, `height`, `dimension?`): [`ColshapeMp`](ColshapeMp.md)

Makes a tube: a circle that rises from a point by its height.

#### Parameters

##### x

`number`

The bottom centre's x.

##### y

`number`

The bottom centre's y.

##### z

`number`

The bottom centre's z.

##### range

`number`

The radius, metres.

##### height

`number`

How high it rises, metres.

##### dimension?

`number`

The dimension (0 by default).

#### Returns

[`ColshapeMp`](ColshapeMp.md)

The new colshape.

#### Remarks

Partial: not yet confirmed in the game.

#### Example

```ts
const zone = mp.colshapes.newTube(10, 20, 30, 5, 10);
```

***

### toArray()

> **toArray**(): [`ColshapeMp`](ColshapeMp.md)[]

The colshapes as an array.

#### Returns

[`ColshapeMp`](ColshapeMp.md)[]

The colshapes.

#### Example

```ts
const all = mp.colshapes.toArray();
```
