The Lab
VEHICLE native

_GET_CHECKPOINT_TRAIN_SPAWN_LOCATION

returns Vector36 paramsbuild 1207

Returns a train spawn position on track trackIndex near the given coordinates.

Signature

C
Vector3 _GET_CHECKPOINT_TRAIN_SPAWN_LOCATION(int trackIndex, float x, float y, float z, float distance, BOOL direction); // 0x35D302397E524939 b1207

Parameters

#NameType
1trackIndexint
2xfloat
3yfloat
4zfloat
5distancefloat
6directionBOOL

Facts

Facts about _GET_CHECKPOINT_TRAIN_SPAWN_LOCATION
Name
_GET_CHECKPOINT_TRAIN_SPAWN_LOCATION
Hash
0x35D302397E524939
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(0x35D302397E524939, -- _GET_CHECKPOINT_TRAIN_SPAWN_LOCATION
  0, -- int trackIndex
  0.0, -- float x
  0.0, -- float y
  0.0, -- float z
  0.0, -- float distance
  false, -- BOOL direction
  Citizen.ResultAsVector()
)
print(coords.x, coords.y, coords.z)
JavaScript
// Whole JS numbers are sent as integers: pass floats like 1.5 (or n + 0.0000001), never 1.
const coords = Citizen.invokeNative("0x35D302397E524939", // _GET_CHECKPOINT_TRAIN_SPAWN_LOCATION
  0, // int trackIndex
  0.0, // float x
  0.0, // float y
  0.0, // float z
  0.0, // float distance
  false, // BOOL direction
  Citizen.resultAsVector()
);
const [x, y, z] = coords
C#
Vector3 coords = Function.Call<Vector3>((Hash)0x35D302397E524939, // _GET_CHECKPOINT_TRAIN_SPAWN_LOCATION
  0, // int trackIndex
  0.0f, // float x
  0.0f, // float y
  0.0f, // float z
  0.0f, // float distance
  false // BOOL direction
);
All VEHICLE natives

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