{"hash":"0xEDE8AC7C5108FB1D","ns":"SHAPETEST","name":"GET_SHAPE_TEST_RESULT","slug":"GET_SHAPE_TEST_RESULT","official":true,"named":true,"luaName":"GetShapeTestResult","game":"rdr3","apiset":"client","returnType":"int","params":[{"name":"shapeTestHandle","type":"ScrHandle"},{"name":"hit","type":"BOOL*"},{"name":"endCoords","type":"Vector3*"},{"name":"surfaceNormal","type":"Vector3*"},{"name":"entityHit","type":"Entity*"}],"summary":"Returns the result of a shape test: 0 if the handle is invalid, 1 if the shape test is still pending, or 2 if the shape test has completed, and the handle should be invalidated.","descriptions":[{"source":"alloc8or","format":"text","body":"Returns the result of a shape test: 0 if the handle is invalid, 1 if the shape test is still pending, or 2 if the shape test has completed, and the handle should be invalidated.\n\nWhen used with an asynchronous shape test, this native should be looped until returning 0 or 2, after which the handle is invalidated.\n\nenum eShapeTestStatus\n{\n\tSHAPETEST_STATUS_NONEXISTENT,\n\tSHAPETEST_STATUS_RESULTS_NOTREADY,\n\tSHAPETEST_STATUS_RESULTS_READY\n};"}],"examples":[],"aliases":[],"enums":[],"related":[],"build":"1207","gtaHash":"0x3D87450E15D98694","gtaJhash":"0xF3C2875A","sources":["alloc8or"],"doc":2,"url":"https://natives.borderlinerp.com/natives/SHAPETEST/GET_SHAPE_TEST_RESULT","markdownUrl":"https://natives.borderlinerp.com/natives/SHAPETEST/GET_SHAPE_TEST_RESULT.md","snippets":{"lua":"local retval, hit, endCoords, surfaceNormal, entityHit = GetShapeTestResult(shapeTestHandle)","luaInvoke":"local retval, hit, endCoords, surfaceNormal, entityHit = Citizen.InvokeNative(0xEDE8AC7C5108FB1D, shapeTestHandle, Citizen.PointerValueInt() --[[ BOOL* ]], Citizen.PointerValueVector(), Citizen.PointerValueVector(), Citizen.PointerValueInt(), Citizen.ResultAsInteger())","js":"const [retval, hit, endCoords, surfaceNormal, entityHit] = GetShapeTestResult(shapeTestHandle);","jsInvoke":"const [retval, hit, endCoords, surfaceNormal, entityHit] = Citizen.invokeNative('0xEDE8AC7C5108FB1D', shapeTestHandle, Citizen.pointerValueInt() /* BOOL* */, Citizen.pointerValueVector(), Citizen.pointerValueVector(), Citizen.pointerValueInt(), Citizen.returnResultAnyway(), Citizen.resultAsInteger());","csharp":"var hit = new OutputArgument();\nvar endCoords = new OutputArgument();\nvar surfaceNormal = new OutputArgument();\nvar entityHit = new OutputArgument();\nint retval = Function.Call<int>((Hash)0xEDE8AC7C5108FB1D, shapeTestHandle, hit, endCoords, surfaceNormal, entityHit);\n// hit.GetResult<bool>()\n// endCoords.GetResult<Vector3>()\n// surfaceNormal.GetResult<Vector3>()\n// entityHit.GetResult<int>()","notes":["Pointer (out) arguments are not passed in Lua/JS: their values are returned after the result, in order."]}}