# PED::GET_VEHICLE_PED_IS_IN

- **Hash:** `0x9A9112A0FE9A4713`
- **Namespace:** PED
- **Runtime name (Lua/JS):** `GetVehiclePedIsIn`
- **Side:** client (game native)
- **Name status:** official
- **Documentation:** described
- **Since game build:** 1207
- **URL:** https://natives.borderlinerp.com/natives/PED/GET_VEHICLE_PED_IS_IN

## Signature

```c
Vehicle GET_VEHICLE_PED_IS_IN(Ped ped, BOOL lastVehicle);
```

## Parameters

- `ped` (`Ped`)
- `lastVehicle` (`BOOL`)

## Returns

`Vehicle`

## Description

Gets the vehicle the specified Ped is in.

If the Ped is not in a vehicle and includeLastVehicle is true, the vehicle they were last in is returned.

## Usage

### Lua

```lua
local retval = GetVehiclePedIsIn(ped, lastVehicle)

-- always available, by hash
local retval = Citizen.InvokeNative(0x9A9112A0FE9A4713, ped, lastVehicle, Citizen.ResultAsInteger())
```

### JavaScript

```js
const retval = GetVehiclePedIsIn(ped, lastVehicle);

// by hash
const retval = Citizen.invokeNative('0x9A9112A0FE9A4713', ped, lastVehicle, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
```

### C#

```csharp
int retval = Function.Call<int>((Hash)0x9A9112A0FE9A4713, ped, lastVehicle);
```

*Sources: alloc8or RDR3 NativeDB.*
