# VEHICLE::_RETURN_TRAIN_INFO_FROM_HANDLE

- **Hash:** `0x09034479E6E3E269`
- **Namespace:** VEHICLE
- **Runtime name (Lua/JS):** `ReturnTrainInfoFromHandle`
- **Side:** client (game native)
- **Name status:** community guess (may change)
- **Documentation:** described with examples
- **Since game build:** 1207
- **URL:** https://natives.borderlinerp.com/natives/VEHICLE/_RETURN_TRAIN_INFO_FROM_HANDLE

## Signature

```c
BOOL _RETURN_TRAIN_INFO_FROM_HANDLE(Vehicle train, Hash* trainTrack, int* junctionIndex);
```

## Parameters

- `train` (`Vehicle`)
- `trainTrack` (`Hash*`)
- `junctionIndex` (`int*`)

## Returns

`BOOL`

## Description

*Source: alloc8or RDR3 NativeDB*

Outputs track hash and junction index on given train vehicle handle.
trainTrack: https://pastebin.com/mhy0dTXs

*Source: VORPCORE RDR3natives*

Outputs track hash and junction index on given train vehicle handle.
_RESET_VEHICLE_* (?)

## Usage

### Lua

```lua
local retval, trainTrack, junctionIndex = ReturnTrainInfoFromHandle(train)

-- always available, by hash
local retval, trainTrack, junctionIndex = Citizen.InvokeNative(0x09034479E6E3E269, train, Citizen.PointerValueInt(), Citizen.PointerValueInt(), Citizen.ReturnResultAnyway())
```

### JavaScript

```js
const [retval, trainTrack, junctionIndex] = ReturnTrainInfoFromHandle(train);

// by hash
const [retval, trainTrack, junctionIndex] = Citizen.invokeNative('0x09034479E6E3E269', train, Citizen.pointerValueInt(), Citizen.pointerValueInt(), Citizen.returnResultAnyway());
```

### C#

```csharp
var trainTrack = new OutputArgument();
var junctionIndex = new OutputArgument();
bool retval = Function.Call<bool>((Hash)0x09034479E6E3E269, train, trainTrack, junctionIndex);
// trainTrack.GetResult<int>()
// junctionIndex.GetResult<int>()
```

- Pointer (out) arguments are not passed in Lua/JS: their values are returned after the result, in order.
- The name is a community guess and may change. If the named call is missing in your client build, use `InvokeNative` with the hash — it always works.

## Examples

*Source: VORPCORE RDR3natives*

```lua
local trainTrack, junctionIndex = Citizen.InvokeNative(0x09034479E6E3E269, train, Citizen.PointerValueInt(), Citizen.PointerValueInt())
```

*Sources: alloc8or RDR3 NativeDB, VORPCORE RDR3natives.*
