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

***

[SixL client API](../../README.md) / [sixl](../README.md) / Mp

# Interface: Mp

The client API object. It is the global `mp`, and the same object as `SixL`.

## Remarks

Not implemented, so not declared: the constructors `mp.Player`, `mp.Vehicle` ... (the pools create entities
the game shows), and the entities' data pools that the server does not send to the client.

## Example

```ts
mp.events.add('playerReady', () => mp.console.logInfo('ready'));
```

## Properties

### blips

> **blips**: [`BlipMpPool`](../../world-entities/interfaces/BlipMpPool.md)

The blips the server sends to this client.

#### Example

```ts
mp.blips.forEach((blip) => blip.sprite);
```

***

### browsers

> **browsers**: [`BrowserMpPool`](../../browser/interfaces/BrowserMpPool.md)

The browsers: pages drawn over the game, created with `mp.browsers.new(url)`.

#### Example

```ts
const hud = mp.browsers.new('package://ui/index.html');
```

***

### cameras

> **cameras**: [`CameraMpPool`](../../cameras/interfaces/CameraMpPool.md)

The script cameras the client's script made, and the gameplay camera.

#### Example

```ts
const cam = mp.cameras.new('default', { x: 0, y: 0, z: 80 });
```

***

### checkpoints

> **checkpoints**: [`CheckpointMpPool`](../../world-entities/interfaces/CheckpointMpPool.md)

The checkpoints the server sends to this client.

#### Example

```ts
mp.checkpoints.forEach((cp) => cp.radius);
```

***

### colshapes

> **colshapes**: [`ColshapeMpPool`](../../colshapes/interfaces/ColshapeMpPool.md)

The colshapes this client made: trigger zones checked against the local player each frame.

#### Example

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

***

### console

> **console**: [`ConsoleMp`](../../system/interfaces/ConsoleMp.md)

The console: log lines to the client's log.

#### Example

```ts
mp.console.logInfo('hello');
```

***

### dummies

> **dummies**: [`DummyEntityMpPool`](../../dummies/interfaces/DummyEntityMpPool.md)

The server's dummy entities: a type and shared variables each, given to every client.

#### Example

```ts
mp.dummies.forEachByType(42, (dummy) => mp.console.logInfo(String(dummy.id)));
```

***

### Event

> **Event**: [`EventMpConstructor`](../../events/interfaces/EventMpConstructor.md)

The constructor of event handles: `new mp.Event(name, handler)`.

#### Example

```ts
const ev = new mp.Event('render', () => {});
```

***

### events

> **events**: [`EventMpPool`](../../events/interfaces/EventMpPool.md)

The event registry: handlers for the server's events and the client's own events.

#### Example

```ts
mp.events.add('render', () => {});
```

***

### game

> **game**: [`GameMp`](../../game/audio/interfaces/GameMp.md)

The game functions, grouped in sections (`mp.game.vehicle`, `mp.game.ped` ...). Declared in game/index.d.ts.

#### Example

```ts
mp.game.clock.setTime(12, 0, 0);
```

***

### gui

> **gui**: [`GuiMp`](../../browser/interfaces/GuiMp.md)

The game's user interface: the mouse cursor over the pages (`mp.gui.cursor`) and the built-in chat (`mp.gui.chat`).

#### Example

```ts
mp.gui.cursor.show(true, true);
```

***

### keys

> **keys**: [`KeysMp`](../../system/interfaces/KeysMp.md)

The keyboard: bind and unbind keys, and read their state.

#### Example

```ts
mp.keys.bind(0x45, true, () => {});
```

***

### labels

> **labels**: [`TextLabelMpPool`](../../world-entities/interfaces/TextLabelMpPool.md)

The text labels the server sends to this client.

#### Example

```ts
mp.labels.forEach((label) => label.text);
```

***

### markers

> **markers**: [`MarkerMpPool`](../../world-entities/interfaces/MarkerMpPool.md)

The markers the server sends to this client.

#### Example

```ts
mp.markers.forEach((marker) => marker.scale);
```

***

### nametags

> **nametags**: `NametagsMp`

RAGE MP's built-in name tags: accepted without effect, SixL draws none.

#### Example

```ts
mp.nametags.enabled = false;
```

***

### objects

> **objects**: [`ObjectMpPool`](../../object/interfaces/ObjectMpPool.md)

The streamed objects.

#### Example

```ts
mp.objects.forEach((obj) => obj.rotation);
```

***

### peds

> **peds**: [`PedMpPool`](../../ped/interfaces/PedMpPool.md)

The streamed peds.

#### Example

```ts
mp.peds.forEach((ped) => ped.getArmour());
```

***

### players

> **players**: [`PlayerMpPool`](../../player/interfaces/PlayerMpPool.md)

The local player and the other players the server streams in to this client.

#### Example

```ts
mp.players.local.position;
```

***

### raycasting

> **raycasting**: [`RaycastingMp`](../../raycasting/interfaces/RaycastingMp.md)

Ray tests in the game's world.

#### Example

```ts
const hit = await mp.raycasting.testPointToPoint(from, to);
```

***

### storage

> **storage**: [`StorageMp`](../../system/interfaces/StorageMp.md)

The client's storage: a data object kept on this computer between sessions, and a session-only one.

#### Example

```ts
mp.storage.data.lastServer = 'main';
```

***

### system

> **system**: [`SystemMp`](../../system/interfaces/SystemMp.md)

The client's machine: whether the game has the focus and runs fullscreen.

#### Example

```ts
if (!mp.system.isFocused) { }
```

***

### user

> **user**: [`UserMp`](../../system/interfaces/UserMp.md)

The player's client settings (`mp.user.preferences`).

#### Example

```ts
const lang = mp.user.preferences.language;
```

***

### Vector3

> **Vector3**: [`Vector3Constructor`](../../common/interfaces/Vector3Constructor.md)

The constructor and helpers of 3D vectors.

#### Example

```ts
const v = new mp.Vector3(1, 2, 3);
```

***

### vehicles

> **vehicles**: [`VehicleMpPool`](../../vehicle/interfaces/VehicleMpPool.md)

The streamed vehicles.

#### Example

```ts
mp.vehicles.forEach((car) => car.getEngineHealth());
```
