{"hash":"0xB629A298081F876F","ns":"TASK","name":"WAYPOINT_RECORDING_GET_CLOSEST_WAYPOINT","slug":"WAYPOINT_RECORDING_GET_CLOSEST_WAYPOINT","official":true,"named":true,"luaName":"WaypointRecordingGetClosestWaypoint","game":"rdr3","apiset":"client","returnType":"BOOL","params":[{"name":"waypointRecording","type":"const char*"},{"name":"x","type":"float"},{"name":"y","type":"float"},{"name":"z","type":"float"},{"name":"point","type":"int*"}],"summary":"","descriptions":[],"examples":[],"aliases":[],"enums":[],"related":[],"build":"1207","gtaHash":"0xB629A298081F876F","gtaJhash":"0xC4CD35AF","sources":["alloc8or"],"doc":1,"url":"https://natives.borderlinerp.com/natives/TASK/WAYPOINT_RECORDING_GET_CLOSEST_WAYPOINT","markdownUrl":"https://natives.borderlinerp.com/natives/TASK/WAYPOINT_RECORDING_GET_CLOSEST_WAYPOINT.md","snippets":{"lua":"local retval, point = WaypointRecordingGetClosestWaypoint(waypointRecording, x, y, z, point)","luaInvoke":"local retval, point = Citizen.InvokeNative(0xB629A298081F876F, waypointRecording, x, y, z, Citizen.PointerValueIntInitialized(point), Citizen.ReturnResultAnyway())","js":"const [retval, point] = WaypointRecordingGetClosestWaypoint(waypointRecording, x, y, z, point);","jsInvoke":"const [retval, point] = Citizen.invokeNative('0xB629A298081F876F', waypointRecording, x + 0.0000001, y + 0.0000001, z + 0.0000001, Citizen.pointerValueIntInitialized(point), Citizen.returnResultAnyway());","csharp":"var point = new OutputArgument();\nbool retval = Function.Call<bool>((Hash)0xB629A298081F876F, waypointRecording, x, y, z, point);\n// point.GetResult<int>()","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 last argument is an in/out pointer: pass its initial value, and the updated value is returned after the result."]}}