# AITRANSPORT::TASK_EXIT_TRANSPORT

- **Hash:** `0xC273A5B8488F7838`
- **Namespace:** AITRANSPORT
- **Runtime name (Lua/JS):** `TaskExitTransport`
- **Side:** client (game native)
- **Name status:** official
- **Documentation:** described with examples
- **Since game build:** 1207
- **URL:** https://natives.borderlinerp.com/natives/AITRANSPORT/TASK_EXIT_TRANSPORT

## Signature

```c
void TASK_EXIT_TRANSPORT(Any* args);
```

## Parameters

- `args` (`Any*`)

## Returns

`void`

## Description

Request a ped to exit a transport. args is a script struct<7> (56 bytes); each field is 8-byte (alignas(8)).

struct TaskExitTransportArgs
{
	alignas(8) Any     p0;       // unused/reserved in observed scripts
	alignas(8) Any     p1;       // unused/reserved in observed scripts
	alignas(8) Any     p2;       // unused/reserved in observed scripts
	alignas(8) Ped     ped;      // performing ped (e.g. PLAYER_PED_ID())
	alignas(8) Vehicle vehicle;  // transport to exit (vehicle or mount entity handle)
	alignas(8) float   pedSpeed; // blend/speed
	alignas(8) int     flags;    // seen values: (1<<30) and 1 (usage unclear)
};

## Usage

### Lua

```lua
local args = TaskExitTransport(args)

-- always available, by hash
local args = Citizen.InvokeNative(0xC273A5B8488F7838, Citizen.PointerValueIntInitialized(args))
```

### JavaScript

```js
const args = TaskExitTransport(args);

// by hash
const args = Citizen.invokeNative('0xC273A5B8488F7838', Citizen.pointerValueIntInitialized(args));
```

### C#

```csharp
var args = new OutputArgument();
Function.Call((Hash)0xC273A5B8488F7838, args);
// args.GetResult<int>()
```

- The last argument is an in/out pointer: pass its initial value, and the updated value is returned after the result.
- `Any*` arguments are often structs. Build them with a DataView buffer and pass it with `:Buffer()` — see the examples and notes below.

## Examples

*Source: VORPCORE RDR3natives*

```lua
struct args
{
  Any p0;
  Any p1;
  Any p2;
  Ped ped;
  Vehicle vehicle;
  float pedSpeed;
  int flags;
}
```

*Sources: alloc8or RDR3 NativeDB, VORPCORE RDR3natives.*
