{"hash":"0x86AFC343CF7F0B34","ns":"VEHICLE","name":"_GET_TRAIN_TRACK_JUNCTION_AT_COORDS","slug":"_GET_TRAIN_TRACK_JUNCTION_AT_COORDS","official":false,"named":true,"luaName":"GetTrainTrackJunctionAtCoords","game":"rdr3","apiset":"client","returnType":"BOOL","params":[{"name":"trainTrack","type":"Hash"},{"name":"x","type":"float"},{"name":"y","type":"float"},{"name":"z","type":"float"},{"name":"junctionIndex","type":"int*"}],"summary":"Outputs junctionIndex, to be used with 0xE6C5E2125EB210C1.","descriptions":[{"source":"alloc8or","format":"text","body":"Outputs junctionIndex, to be used with 0xE6C5E2125EB210C1.\ntrainTrack: see 0x09034479E6E3E269."}],"examples":[],"aliases":[],"enums":[],"related":[],"build":"1207","sources":["alloc8or"],"doc":2,"url":"https://natives.borderlinerp.com/natives/VEHICLE/_GET_TRAIN_TRACK_JUNCTION_AT_COORDS","markdownUrl":"https://natives.borderlinerp.com/natives/VEHICLE/_GET_TRAIN_TRACK_JUNCTION_AT_COORDS.md","snippets":{"lua":"local retval, junctionIndex = GetTrainTrackJunctionAtCoords(trainTrack, x, y, z, junctionIndex)","luaInvoke":"local retval, junctionIndex = Citizen.InvokeNative(0x86AFC343CF7F0B34, trainTrack, x, y, z, Citizen.PointerValueIntInitialized(junctionIndex), Citizen.ReturnResultAnyway())","js":"const [retval, junctionIndex] = GetTrainTrackJunctionAtCoords(trainTrack, x, y, z, junctionIndex);","jsInvoke":"const [retval, junctionIndex] = Citizen.invokeNative('0x86AFC343CF7F0B34', trainTrack, x + 0.0000001, y + 0.0000001, z + 0.0000001, Citizen.pointerValueIntInitialized(junctionIndex), Citizen.returnResultAnyway());","csharp":"var junctionIndex = new OutputArgument();\nbool retval = Function.Call<bool>((Hash)0x86AFC343CF7F0B34, trainTrack, x, y, z, junctionIndex);\n// junctionIndex.GetResult<int>()","notes":["Hash parameters: the named function also accepts a string and hashes it for you; `Citizen.InvokeNative` needs the number — pass `joaat(\"name\")` or a backtick literal like `` `name` ``.","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.","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."]}}