The Lab
TASK native

_CALCULATE_WAYPOINT_DISTANCE_FROM_START

returns float4 paramsbuild 1207

Returns the distance along the waypoint recording waypointRecording from its start to the point nearest (x, y, z).

Signature

C
float _CALCULATE_WAYPOINT_DISTANCE_FROM_START(const char* waypointRecording, float x, float y, float z); // 0x3ACC128510142B9D b1207

Parameters

#NameType
1waypointRecordingconst char*
2xfloat
3yfloat
4zfloat

Facts

Facts about _CALCULATE_WAYPOINT_DISTANCE_FROM_START
Name
_CALCULATE_WAYPOINT_DISTANCE_FROM_START
Hash
0x3ACC128510142B9D
Namespace
Returns
float
Game build
1207

Examples

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

Lua
local result = Citizen.InvokeNative(0x3ACC128510142B9D, -- _CALCULATE_WAYPOINT_DISTANCE_FROM_START
  "text", -- const char* waypointRecording
  0.0, -- float x
  0.0, -- float y
  0.0, -- float z
  Citizen.ResultAsFloat()
)
print(result)
JavaScript
// Whole JS numbers are sent as integers: pass floats like 1.5 (or n + 0.0000001), never 1.
const result = Citizen.invokeNative("0x3ACC128510142B9D", // _CALCULATE_WAYPOINT_DISTANCE_FROM_START
  "text", // const char* waypointRecording
  0.0, // float x
  0.0, // float y
  0.0, // float z
  Citizen.resultAsFloat()
);
console.log(result)
C#
float result = Function.Call<float>((Hash)0x3ACC128510142B9D, // _CALCULATE_WAYPOINT_DISTANCE_FROM_START
  "text", // const char* waypointRecording
  0.0f, // float x
  0.0f, // float y
  0.0f // float z
);
All TASK natives

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