{"hash":"0x3ACC128510142B9D","ns":"TASK","name":"_CALCULATE_WAYPOINT_DISTANCE_FROM_START","slug":"_CALCULATE_WAYPOINT_DISTANCE_FROM_START","official":false,"named":true,"luaName":"CalculateWaypointDistanceFromStart","game":"rdr3","apiset":"client","returnType":"float","params":[{"name":"waypointRecording","type":"const char*"},{"name":"x","type":"float"},{"name":"y","type":"float"},{"name":"z","type":"float"}],"summary":"Signed arclength (meters) from the start of a loaded waypoint recording to the point on the path nearest to (x,y,z).","descriptions":[{"source":"alloc8or","format":"text","body":"Signed arclength (meters) from the start of a loaded waypoint recording to the point on the path nearest to (x,y,z).\nNegative before the first node; clamped to total length past the last node. Recording must be requested/loaded."},{"source":"vorp","format":"text","body":"Returns the signed distance along the waypoint recording from its start (first node) to the point on the recording that corresponds to coords\n need `REQUEST_WAYPOINT_RECORDING`"}],"examples":[],"aliases":[],"enums":[],"related":[],"build":"1207","sources":["alloc8or","vorp"],"doc":2,"url":"https://natives.borderlinerp.com/natives/TASK/_CALCULATE_WAYPOINT_DISTANCE_FROM_START","markdownUrl":"https://natives.borderlinerp.com/natives/TASK/_CALCULATE_WAYPOINT_DISTANCE_FROM_START.md","snippets":{"lua":"local retval = CalculateWaypointDistanceFromStart(waypointRecording, x, y, z)","luaInvoke":"local retval = Citizen.InvokeNative(0x3ACC128510142B9D, waypointRecording, x, y, z, Citizen.ResultAsFloat())","js":"const retval = CalculateWaypointDistanceFromStart(waypointRecording, x, y, z);","jsInvoke":"const retval = Citizen.invokeNative('0x3ACC128510142B9D', waypointRecording, x + 0.0000001, y + 0.0000001, z + 0.0000001, Citizen.returnResultAnyway(), Citizen.resultAsFloat());","csharp":"float retval = Function.Call<float>((Hash)0x3ACC128510142B9D, waypointRecording, x, y, z);","notes":["Float parameters: Lua integers (`10`, or whole numbers decoded from NUI/JSON) are sent as ints and read as garbage. Write `10.0` or `value + 0.0`. The generated JS wrappers add `0.0000001` to non-zero floats for the same reason.","The name is a community guess and may change. If the named call is missing in your client build, use `InvokeNative` with the hash — it always works."]}}