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

***

[SixL server API](../../README.md) / [world-entities](../README.md) / BlipMpPool

# Interface: BlipMpPool

The pool of blips: `mp.blips`.

## Example

```ts
mp.blips.forEach((b) => b.destroy());
```

## Extends

- [`BasicMpPool`](../../entity/interfaces/BasicMpPool.md)\<[`BlipMp`](BlipMp.md)\>

## Properties

### colours

> `readonly` **colours**: `Readonly`\<`Record`\<`"yellow"` \| `"gold"` \| `"amber"` \| `"red"` \| `"green"` \| `"blue"` \| `"cyan"` \| `"teal"` \| `"pink"` \| `"lavender"` \| `"crimson"` \| `"white"`, `number`\>\>

The VI blip colours by appearance: `yellow`, `gold`, `amber`, `red`, `green`, `blue`, `cyan`, `teal`, `pink`,
`lavender`, `crimson`, `white`. Each is a VI blip modifier key to set as a blip's `color`.

#### Remarks

SixL-only. These are VI's own measured colours, not GTA V's: RAGE MP colour ids are not translated.

#### Example

```ts
mp.blips.new(0x607ab926, new mp.Vector3(0, 0, 70), { color: mp.blips.colours.red });
```

***

### length

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

The number of entities in the pool.

#### Example

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

#### Inherited from

[`BasicMpPool`](../../entity/interfaces/BasicMpPool.md).[`length`](../../entity/interfaces/BasicMpPool.md#length)

## Methods

### at()

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

Finds an entity by id.

#### Parameters

##### id

`number`

The entity's id.

#### Returns

[`BlipMp`](BlipMp.md)

The entity, or `null` when there is none.

#### Example

```ts
const blip = mp.blips.at(1);
```

#### Inherited from

[`BasicMpPool`](../../entity/interfaces/BasicMpPool.md).[`at`](../../entity/interfaces/BasicMpPool.md#at)

***

### exists()

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

Whether an entity (or an id) is still in the pool.

#### Parameters

##### entity

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

An entity or its id.

#### Returns

`boolean`

True when it exists.

#### Example

```ts
if (mp.blips.exists(blip)) { }
```

#### Inherited from

[`BasicMpPool`](../../entity/interfaces/BasicMpPool.md).[`exists`](../../entity/interfaces/BasicMpPool.md#exists)

***

### forEach()

> **forEach**(`callingFunction`): `void`

Calls a function for every entity.

#### Parameters

##### callingFunction

(`entity`) => `void`

Called with each entity.

#### Returns

`void`

#### Example

```ts
mp.blips.forEach((b) => b.destroy());
```

#### Inherited from

[`BasicMpPool`](../../entity/interfaces/BasicMpPool.md).[`forEach`](../../entity/interfaces/BasicMpPool.md#foreach)

***

### forEachFast()

> **forEachFast**(`callingFunction`): `void`

Calls a function for every entity; the same as `forEach` in SixL.

#### Parameters

##### callingFunction

(`entity`) => `void`

Called with each entity.

#### Returns

`void`

#### Example

```ts
mp.blips.forEachFast((b) => b.destroy());
```

#### Inherited from

[`BasicMpPool`](../../entity/interfaces/BasicMpPool.md).[`forEachFast`](../../entity/interfaces/BasicMpPool.md#foreachfast)

***

### new()

> **new**(`sprite`, `position`, `options?`): [`BlipMp`](BlipMp.md)

Creates a blip.

#### Parameters

##### sprite

`number`

The VI sprite key.

##### position

[`Vector3`](../../common/interfaces/Vector3.md)

Where (metres).

##### options?

Optional: `name` (default `'NULL'`), `scale` (1), `color` (a VI colour key, 0 = none), `alpha` (255), `drawDistance`
(0), `shortRange` (false), `rotation` (degrees, 0) and `dimension` (0).

###### alpha?

`number`

###### color?

`number`

###### dimension?

`number`

###### drawDistance?

`number`

###### name?

`string`

###### rotation?

`number`

###### scale?

`number`

###### shortRange?

`boolean`

#### Returns

[`BlipMp`](BlipMp.md)

The blip.

#### Remarks

Partial: see [BlipMp](BlipMp.md).

#### Example

```ts
const blip = mp.blips.new(1, new mp.Vector3(0, 0, 70), { name: 'Spawn', color: mp.blips.colours.green });
```

***

### toArray()

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

A snapshot of all entities.

#### Returns

[`BlipMp`](BlipMp.md)[]

A new array; changing it does not change the pool.

#### Example

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

#### Inherited from

[`BasicMpPool`](../../entity/interfaces/BasicMpPool.md).[`toArray`](../../entity/interfaces/BasicMpPool.md#toarray)
