# VEHICLE::_SET_TRAIN_TRACK_JUNCTION_SWITCH

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

## Signature

```c
void _SET_TRAIN_TRACK_JUNCTION_SWITCH(Hash trainTrack, int junctionIndex, BOOL enabled);
```

## Parameters

- `trainTrack` (`Hash`)
- `junctionIndex` (`int`)
- `enabled` (`BOOL`)

## Returns

`void`

## Description

*Source: alloc8or RDR3 NativeDB*

trainTrack: see 0x09034479E6E3E269.

*Source: VORPCORE RDR3natives*

trainTrack: FREIGHT_GROUP, TRAINS3, BRAITHWAITES2_TRACK_CONFIG, TRAINS_OLD_WEST01, TRAINS_OLD_WEST03, TRAINS_NB1, TRAINS_INTERSECTION1_ANN

## Usage

### Lua

```lua
SetTrainTrackJunctionSwitch(trainTrack, junctionIndex, enabled)

-- always available, by hash
Citizen.InvokeNative(0xE6C5E2125EB210C1, trainTrack, junctionIndex, enabled)
```

### JavaScript

```js
SetTrainTrackJunctionSwitch(trainTrack, junctionIndex, enabled);

// by hash
Citizen.invokeNative('0xE6C5E2125EB210C1', trainTrack, junctionIndex, enabled);
```

### C#

```csharp
Function.Call((Hash)0xE6C5E2125EB210C1, trainTrack, junctionIndex, enabled);
```

- Hash parameters: the named function also accepts a string and hashes it for you; `Citizen.InvokeNative` needs the number — pass `joaat("name")` or a backtick literal like `` `name` ``.
- 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.

*Sources: alloc8or RDR3 NativeDB, VORPCORE RDR3natives.*
