RedM Natives

_SET_TRAIN_TRACK_JUNCTION_SWITCH

Hash0xE6C5E2125EB210C1
Runtime nameSetTrainTrackJunctionSwitch
NamespaceVEHICLE
SideClient
NameCommunity guess
Docs
Since build1207

Signature

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

Parameters

NameTypeDescription
trainTrackHash—
junctionIndexint—
enabledBOOL—

Returns void

Description

VORPCORE RDR3natives

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

Usage

Lua
SetTrainTrackJunctionSwitch(trainTrack, junctionIndex, enabled)

-- always works, by hash
Citizen.InvokeNative(0xE6C5E2125EB210C1, trainTrack, junctionIndex, enabled)
JavaScript and C#
JavaScript
SetTrainTrackJunctionSwitch(trainTrack, junctionIndex, enabled);

// by hash
Citizen.invokeNative('0xE6C5E2125EB210C1', trainTrack, junctionIndex, enabled);
C#
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

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.