The Lab
SHAPETEST native

GET_SHAPE_TEST_RESULT

returns int5 paramsbuild 1207

Reads the result of an asynchronous shape test into hit, endCoords, surfaceNormal and entityHit, and returns its status (0 invalid, 1 pending, 2 ready).

Poll it each frame after starting a test until it stops returning 1.

Signature

C
int GET_SHAPE_TEST_RESULT(ScrHandle shapeTestHandle, BOOL* hit, Vector3* endCoords, Vector3* surfaceNormal, Entity* entityHit); // 0xEDE8AC7C5108FB1D b1207

Parameters

#NameType
1shapeTestHandleScrHandle
2hitBOOL* (out pointer)
3endCoordsVector3* (out pointer)
4surfaceNormalVector3* (out pointer)
5entityHitEntity* (out pointer)

Facts

Facts about GET_SHAPE_TEST_RESULT
Name
GET_SHAPE_TEST_RESULT
Hash
0xEDE8AC7C5108FB1D
Namespace
Returns
int
Game build
1207

Examples

Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.

Lua
local result, hit, endCoords, surfaceNormal, entityHit = Citizen.InvokeNative(0xEDE8AC7C5108FB1D, -- GET_SHAPE_TEST_RESULT
  0, -- ScrHandle shapeTestHandle
  Citizen.PointerValueInt(), -- BOOL* hit
  Citizen.PointerValueVector(), -- Vector3* endCoords
  Citizen.PointerValueVector(), -- Vector3* surfaceNormal
  Citizen.PointerValueInt(), -- Entity* entityHit
  Citizen.ResultAsInteger()
)
print(result, hit, endCoords, surfaceNormal, entityHit)
JavaScript
const [result, hit, endCoords, surfaceNormal, entityHit] = Citizen.invokeNative("0xEDE8AC7C5108FB1D", // GET_SHAPE_TEST_RESULT
  0, // ScrHandle shapeTestHandle
  Citizen.pointerValueInt(), // BOOL* hit
  Citizen.pointerValueVector(), // Vector3* endCoords
  Citizen.pointerValueVector(), // Vector3* surfaceNormal
  Citizen.pointerValueInt(), // Entity* entityHit
  Citizen.resultAsInteger()
);
console.log(result, hit, endCoords, surfaceNormal, entityHit)
C#
var hitArg = new OutputArgument();
var endCoordsArg = new OutputArgument();
var surfaceNormalArg = new OutputArgument();
var entityHitArg = new OutputArgument();
int result = Function.Call<int>((Hash)0xEDE8AC7C5108FB1D, // GET_SHAPE_TEST_RESULT
  0, // ScrHandle shapeTestHandle
  hitArg, // BOOL* hit
  endCoordsArg, // Vector3* endCoords
  surfaceNormalArg, // Vector3* surfaceNormal
  entityHitArg // Entity* entityHit
);
bool hit = hitArg.GetResult<bool>();
Vector3 endCoords = endCoordsArg.GetResult<Vector3>();
Vector3 surfaceNormal = surfaceNormalArg.GetResult<Vector3>();
int entityHit = entityHitArg.GetResult<int>();
All SHAPETEST natives

Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.