# createVehicle (Client)

> Creates a vehicle that exists on this client only.

- **Platform**: MY Multiplayer (MYMP)
- **Kind**: Lua Function
- **Side**: Client
- **Category**: Vehicles
- **URL**: https://wiki.mymp.gg/en/createVehicle-client
- **Counterpart**: Also exists on the server, with its own implementation: [createVehicle (Server)](https://wiki.mymp.gg/en/createVehicle-server.md)

## Syntax

```lua
vehicle|false createVehicle(string model, float x, y, z [, float rx, ry, rz = 0, 0, 0])
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `model` | `string` | The vehicle model's name, such as `infernus`. Case does not matter. |
| `x, y, z` | `float` | Position in the world, or a vec3. |
| `rx, ry, rz` | `float` | Rotation in degrees, or a vec3. *(default: `0, 0, 0`)* |

## Returns

The created vehicle, or `false` if the name is not a vehicle model's.

The vehicle starts with 1000 health and its doors in the model's initial state. Only peds created on this client can get into it.

## Example

```lua
local pos = getElementPosition(localPlayer)
local vehicle = createVehicle("infernus", pos.x + 4, pos.y, pos.z, 0, 0, 90)
```

### Coming from MTA

The model is given by name, not by MTA's number. There are no number plate or variant arguments.

## See also

- [createVehicle (Server)](https://wiki.mymp.gg/en/createVehicle-server.md): Creates a vehicle on the server, seen by every player.
- [warpPedIntoVehicle (Shared)](https://wiki.mymp.gg/en/warpPedIntoVehicle.md): Puts a ped or player straight into a vehicle seat, with no animation.
- [getVehicleMaxPassengers (Client)](https://wiki.mymp.gg/en/getVehicleMaxPassengers-client.md): Tells how many passengers fit in a vehicle, not counting the driver.
