{"hash":"0x4114EAA8A7F7766D","ns":"PATH","name":"GET_NTH_CLOSEST_VEHICLE_NODE_ID_WITH_HEADING","slug":"GET_NTH_CLOSEST_VEHICLE_NODE_ID_WITH_HEADING","official":true,"named":true,"luaName":"GetNthClosestVehicleNodeIdWithHeading","game":"rdr3","apiset":"client","returnType":"int","params":[{"name":"x","type":"float"},{"name":"y","type":"float"},{"name":"z","type":"float"},{"name":"nthClosest","type":"int"},{"name":"returnHeading","type":"float*"},{"name":"returnNumLanes","type":"int*"},{"name":"nodeFlags","type":"int"},{"name":"zMeasureMult","type":"float"},{"name":"zTolerance","type":"float"}],"summary":"Returns the nth closest vehicle node with a heading to a coord","descriptions":[{"source":"alloc8or","format":"text","body":"Returns the nth closest vehicle node with a heading to a coord"}],"examples":[],"aliases":[],"enums":[],"related":[],"build":"1207","gtaHash":"0x6448050E9C2A7207","gtaJhash":"0xC1AEB88D","sources":["alloc8or"],"doc":2,"url":"https://natives.borderlinerp.com/natives/PATH/GET_NTH_CLOSEST_VEHICLE_NODE_ID_WITH_HEADING","markdownUrl":"https://natives.borderlinerp.com/natives/PATH/GET_NTH_CLOSEST_VEHICLE_NODE_ID_WITH_HEADING.md","snippets":{"lua":"local retval, returnHeading, returnNumLanes = GetNthClosestVehicleNodeIdWithHeading(x, y, z, nthClosest, nodeFlags, zMeasureMult, zTolerance)","luaInvoke":"local retval, returnHeading, returnNumLanes = Citizen.InvokeNative(0x4114EAA8A7F7766D, x, y, z, nthClosest, Citizen.PointerValueFloat(), Citizen.PointerValueInt(), nodeFlags, zMeasureMult, zTolerance, Citizen.ResultAsInteger())","js":"const [retval, returnHeading, returnNumLanes] = GetNthClosestVehicleNodeIdWithHeading(x, y, z, nthClosest, nodeFlags, zMeasureMult, zTolerance);","jsInvoke":"const [retval, returnHeading, returnNumLanes] = Citizen.invokeNative('0x4114EAA8A7F7766D', x + 0.0000001, y + 0.0000001, z + 0.0000001, nthClosest, Citizen.pointerValueFloat(), Citizen.pointerValueInt(), nodeFlags, zMeasureMult + 0.0000001, zTolerance + 0.0000001, Citizen.returnResultAnyway(), Citizen.resultAsInteger());","csharp":"var returnHeading = new OutputArgument();\nvar returnNumLanes = new OutputArgument();\nint retval = Function.Call<int>((Hash)0x4114EAA8A7F7766D, x, y, z, nthClosest, returnHeading, returnNumLanes, nodeFlags, zMeasureMult, zTolerance);\n// returnHeading.GetResult<float>()\n// returnNumLanes.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.","Pointer (out) arguments are not passed in Lua/JS: their values are returned after the result, in order."]}}