# warpPedIntoVehicle (Shared)

> Puts a ped or player straight into a vehicle seat, with no animation.

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

## Syntax

```lua
bool warpPedIntoVehicle(ped ped, vehicle vehicle [, int seat = 0])
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `ped` | `ped` | The ped or player. |
| `vehicle` | `vehicle` | The vehicle. |
| `seat` | `int` | The seat: `0` is the driver, `1` and up the passengers. *(default: `0`)* |

## Returns

`true` if the ped was put in. `false` if the seat does not exist, the ped is dead, the vehicle is wrecked or, on the server, whoever holds the seat is getting in or out.

Whoever was in the seat is removed first. The enter events fire as if the ped had got in. On the server, putting someone in the driver's seat turns the engine on.

## Example

```lua
addCommandHandler("car", function(player)
    local vehicle = createVehicle("infernus", 2495.0, -1680.0, 13.4)
    warpPedIntoVehicle(player, vehicle)
end)
```

### Note

On the client it only works with peds and vehicles that client created; server elements raise an error.

## See also

- [removePedFromVehicle (Shared)](https://wiki.mymp.gg/en/removePedFromVehicle.md): Takes a ped or player out of its vehicle at once, with no animation.
- [setPedEnterVehicle (Client)](https://wiki.mymp.gg/en/setPedEnterVehicle.md): Makes a ped walk to a vehicle and get in, as if the player pressed the enter key.
- [getPedOccupiedVehicle (Shared)](https://wiki.mymp.gg/en/getPedOccupiedVehicle.md): Gets the vehicle a ped or player is in.
- [onVehicleEnter (Server)](https://wiki.mymp.gg/en/onVehicleEnter.md): Fired on the server when a ped has finished getting into a vehicle.
