The Lab
WATER native

TEST_PROBE_AGAINST_ALL_WATER

returns int8 paramsbuild 1207

Casts a probe between two points against all water and writes the hit position to intersectionPos. Returns a result code.

Signature

C
int TEST_PROBE_AGAINST_ALL_WATER(float x1, float y1, float z1, float x2, float y2, float z2, int flags, Vector3* intersectionPos); // 0x8974647ED222EA5F b1207

Parameters

#NameType
1x1float
2y1float
3z1float
4x2float
5y2float
6z2float
7flagsint
8intersectionPosVector3* (out pointer)

Facts

Facts about TEST_PROBE_AGAINST_ALL_WATER
Name
TEST_PROBE_AGAINST_ALL_WATER
Hash
0x8974647ED222EA5F
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, intersectionPos = Citizen.InvokeNative(0x8974647ED222EA5F, -- TEST_PROBE_AGAINST_ALL_WATER
  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
  Citizen.PointerValueVector(), -- Vector3* intersectionPos
  Citizen.ResultAsInteger()
)
print(result, intersectionPos)
JavaScript
// Whole JS numbers are sent as integers: pass floats like 1.5 (or n + 0.0000001), never 1.
const [result, intersectionPos] = Citizen.invokeNative("0x8974647ED222EA5F", // TEST_PROBE_AGAINST_ALL_WATER
  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
  Citizen.pointerValueVector(), // Vector3* intersectionPos
  Citizen.resultAsInteger()
);
console.log(result, intersectionPos)
C#
var intersectionPosArg = new OutputArgument();
int result = Function.Call<int>((Hash)0x8974647ED222EA5F, // TEST_PROBE_AGAINST_ALL_WATER
  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
  intersectionPosArg // Vector3* intersectionPos
);
Vector3 intersectionPos = intersectionPosArg.GetResult<Vector3>();
All WATER natives

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