The Lab
TASK native

WAYPOINT_RECORDING_GET_CLOSEST_WAYPOINT

returns BOOL5 paramsbuild 1207

Writes the index of the waypoint in waypointRecording closest to (x, y, z) into point. Returns true on success.

Signature

C
BOOL WAYPOINT_RECORDING_GET_CLOSEST_WAYPOINT(const char* waypointRecording, float x, float y, float z, int* point); // 0xB629A298081F876F b1207

Parameters

#NameType
1waypointRecordingconst char*
2xfloat
3yfloat
4zfloat
5pointint* (out pointer)

Facts

Facts about WAYPOINT_RECORDING_GET_CLOSEST_WAYPOINT
Name
WAYPOINT_RECORDING_GET_CLOSEST_WAYPOINT
Hash
0xB629A298081F876F
Namespace
Returns
BOOL
Game build
1207

Examples

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

Lua
local result, point = Citizen.InvokeNative(0xB629A298081F876F, -- WAYPOINT_RECORDING_GET_CLOSEST_WAYPOINT
  "text", -- const char* waypointRecording
  0.0, -- float x
  0.0, -- float y
  0.0, -- float z
  Citizen.PointerValueInt(), -- int* point
  Citizen.ReturnResultAnyway()
)
if result then
  -- ...
end
JavaScript
// Whole JS numbers are sent as integers: pass floats like 1.5 (or n + 0.0000001), never 1.
const [result, point] = Citizen.invokeNative("0xB629A298081F876F", // WAYPOINT_RECORDING_GET_CLOSEST_WAYPOINT
  "text", // const char* waypointRecording
  0.0, // float x
  0.0, // float y
  0.0, // float z
  Citizen.pointerValueInt(), // int* point
  Citizen.returnResultAnyway()
);
if (result) {
  // ...
}
C#
var pointArg = new OutputArgument();
bool result = Function.Call<bool>((Hash)0xB629A298081F876F, // WAYPOINT_RECORDING_GET_CLOSEST_WAYPOINT
  "text", // const char* waypointRecording
  0.0f, // float x
  0.0f, // float y
  0.0f, // float z
  pointArg // int* point
);
int point = pointArg.GetResult<int>();
All TASK natives

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