The Lab
VEHICLE native

_GET_TRAIN_POSITION_ON_TRACK

returns Vector31 parambuild 1207

Returns the position of the train on track trackIndex.

Signature

C
Vector3 _GET_TRAIN_POSITION_ON_TRACK(int trackIndex); // 0x1E8A921112891651 b1207

Parameters

#NameType
1trackIndexint

Facts

Facts about _GET_TRAIN_POSITION_ON_TRACK
Name
_GET_TRAIN_POSITION_ON_TRACK
Hash
0x1E8A921112891651
Namespace
Returns
Vector3
Game build
1207

Examples

Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.

Lua
local coords = Citizen.InvokeNative(0x1E8A921112891651, -- _GET_TRAIN_POSITION_ON_TRACK
  0, -- int trackIndex
  Citizen.ResultAsVector()
)
print(coords.x, coords.y, coords.z)
JavaScript
const coords = Citizen.invokeNative("0x1E8A921112891651", // _GET_TRAIN_POSITION_ON_TRACK
  0, // int trackIndex
  Citizen.resultAsVector()
);
const [x, y, z] = coords
C#
Vector3 coords = Function.Call<Vector3>((Hash)0x1E8A921112891651, // _GET_TRAIN_POSITION_ON_TRACK
  0 // int trackIndex
);
All VEHICLE natives

Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.