# setPedExitVehicle (Client)

> Makes a ped get out of its vehicle through the door, with the exit animation.

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

## Syntax

```lua
bool setPedExitVehicle(ped ped)
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `ped` | `ped` | The ped or player. |

## Returns

`true` if the ped started getting out or the request was sent to the server. `false` if the ped is not in a vehicle or is dead.

## Example

```lua
bindKey("x", "down", function()
    if isPedInVehicle(localPlayer) then
        setPedExitVehicle(localPlayer)
    end
end)
```

## See also

- [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.
- [removePedFromVehicle (Shared)](https://wiki.mymp.gg/en/removePedFromVehicle.md): Takes a ped or player out of its vehicle at once, with no animation.
- [onClientVehicleStartExit (Client)](https://wiki.mymp.gg/en/onClientVehicleStartExit.md): Fired on the client when a ped starts getting out of a vehicle. Cancelling the event stops it.
