_CALCULATE_WAYPOINT_DISTANCE_FROM_START
Returns the distance along the waypoint recording waypointRecording from its start to the point nearest (x, y, z).
Signature
float _CALCULATE_WAYPOINT_DISTANCE_FROM_START(const char* waypointRecording, float x, float y, float z); // 0x3ACC128510142B9D b1207Parameters
| # | Name | Type |
|---|---|---|
| 1 | waypointRecording | const char* |
| 2 | x | float |
| 3 | y | float |
| 4 | z | float |
Facts
| 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.
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)// 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)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
);Related TASK natives
- GET_PED_WAYPOINT_DISTANCE
- GET_WAYPOINT_DISTANCE_ALONG_ROUTE
- WAYPOINT_PLAYBACK_START_AIMING_AT_COORD
- WAYPOINT_PLAYBACK_START_AIMING_AT_ENTITY
- WAYPOINT_PLAYBACK_START_AIMING_AT_PED
- WAYPOINT_PLAYBACK_START_SHOOTING_AT_COORD
- WAYPOINT_PLAYBACK_START_SHOOTING_AT_ENTITY
- WAYPOINT_PLAYBACK_START_SHOOTING_AT_PED
- WAYPOINT_RECORDING_GET_CLOSEST_WAYPOINT
- _CREATE_WAYPOINT_PATH
- _DELETE_PATCH_OBJECTS_FROM_HERB_COMPOSITES
- _DISASSOCIATE_PROP_FROM_SCENARIO
Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.