The Lab
SHAPETEST native

START_EXPENSIVE_SYNCHRONOUS_SHAPE_TEST_LOS_PROBE

returns ScrHandle9 paramsbuild 1207

Casts a line-of-sight ray from (x1, y1, z1) to (x2, y2, z2) that resolves on the same frame, at a higher cost than the asynchronous probe. Returns a handle for GET_SHAPE_TEST_RESULT.

Prefer START_SHAPE_TEST_LOS_PROBE unless the result is needed immediately.

Signature

C
ScrHandle START_EXPENSIVE_SYNCHRONOUS_SHAPE_TEST_LOS_PROBE(float x1, float y1, float z1, float x2, float y2, float z2, int flags, Entity entityToIgnore, int p8); // 0x377906D8A31E5586 b1207

Parameters

#NameType
1x1float
2y1float
3z1float
4x2float
5y2float
6z2float
7flagsint
8entityToIgnoreEntity
9p8int

Facts

Facts about START_EXPENSIVE_SYNCHRONOUS_SHAPE_TEST_LOS_PROBE
Name
START_EXPENSIVE_SYNCHRONOUS_SHAPE_TEST_LOS_PROBE
Hash
0x377906D8A31E5586
Namespace
Returns
ScrHandle
Game build
1207

Examples

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

Lua
local scrHandle = Citizen.InvokeNative(0x377906D8A31E5586, -- START_EXPENSIVE_SYNCHRONOUS_SHAPE_TEST_LOS_PROBE
  0.0, -- float x1
  0.0, -- float y1
  0.0, -- float z1
  0.0, -- float x2
  0.0, -- float y2
  0.0, -- float z2
  0, -- int flags
  PlayerPedId(), -- Entity entityToIgnore
  0, -- int p8
  Citizen.ResultAsInteger()
)
print(scrHandle)
JavaScript
// Whole JS numbers are sent as integers: pass floats like 1.5 (or n + 0.0000001), never 1.
const scrHandle = Citizen.invokeNative("0x377906D8A31E5586", // START_EXPENSIVE_SYNCHRONOUS_SHAPE_TEST_LOS_PROBE
  0.0, // float x1
  0.0, // float y1
  0.0, // float z1
  0.0, // float x2
  0.0, // float y2
  0.0, // float z2
  0, // int flags
  PlayerPedId(), // Entity entityToIgnore
  0, // int p8
  Citizen.resultAsInteger()
);
console.log(scrHandle)
C#
int scrHandle = Function.Call<int>((Hash)0x377906D8A31E5586, // START_EXPENSIVE_SYNCHRONOUS_SHAPE_TEST_LOS_PROBE
  0.0f, // float x1
  0.0f, // float y1
  0.0f, // float z1
  0.0f, // float x2
  0.0f, // float y2
  0.0f, // float z2
  0, // int flags
  API.PlayerPedId(), // Entity entityToIgnore
  0 // int p8
);
All SHAPETEST natives

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