WAYPOINT_RECORDING_GET_CLOSEST_WAYPOINT
Writes the index of the waypoint in waypointRecording closest to (x, y, z) into point. Returns true on success.
Signature
BOOL WAYPOINT_RECORDING_GET_CLOSEST_WAYPOINT(const char* waypointRecording, float x, float y, float z, int* point); // 0xB629A298081F876F b1207Parameters
| # | Name | Type |
|---|---|---|
| 1 | waypointRecording | const char* |
| 2 | x | float |
| 3 | y | float |
| 4 | z | float |
| 5 | point | int* (out pointer) |
Facts
| 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.
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// 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) {
// ...
}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>();Related TASK natives
- WAYPOINT_RECORDING_GET_COORD
- WAYPOINT_RECORDING_GET_NUM_POINTS
- WAYPOINT_RECORDING_GET_SPEED_AT_POINT
- WAYPOINT_PLAYBACK_GET_IS_AIMING
- WAYPOINT_PLAYBACK_GET_IS_PAUSED
- WAYPOINT_PLAYBACK_GET_IS_SHOOTING
- GET_IS_WAYPOINT_RECORDING_LOADED
- WAYPOINT_PLAYBACK_OVERRIDE_SPEED
- WAYPOINT_PLAYBACK_PAUSE
- WAYPOINT_PLAYBACK_RESUME
- WAYPOINT_PLAYBACK_START_AIMING_AT_COORD
- WAYPOINT_PLAYBACK_START_AIMING_AT_ENTITY
Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.