# AITRANSPORT::TASK_ENTER_TRANSPORT

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

## Signature

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

## Parameters

- `args` (`Any*`)

## Returns

`void`

## Description

Request a ped to enter/join a transport seat. args is a script struct<9> (72 bytes); each field is 8-byte (alignas(8)).

struct TaskEnterTransportArgs
{
	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
	alignas(8) Vehicle vehicle;   // target transport
	alignas(8) int     seatIndex; // seat to join (scripts use -1 or explicit seat)
	alignas(8) int     timeoutMs; // time until forced join/teleport (commonly 20000)
	alignas(8) float   pedSpeed;  // blend/speed
	alignas(8) int     flags;     // seen values: (1<<30), 1, 16, 1048578 (usage unclear)
};

## Usage

### Lua

```lua
local args = TaskEnterTransport(args)

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

### JavaScript

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

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

### C#

```csharp
var args = new OutputArgument();
Function.Call((Hash)0xAEE3ADD08829CB6F, 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;
  int seatIndex;
  int timer;
  float pedSpeed;
  int flags;
}
```

*Sources: alloc8or RDR3 NativeDB, VORPCORE RDR3natives.*
