The Lab
WATER native

TEST_VERTICAL_PROBE_AGAINST_ALL_WATER

returns int5 paramsbuild 1207

Casts a vertical probe at the given point against all water and writes the water height to waterHeight. Returns a result code.

Signature

C
int TEST_VERTICAL_PROBE_AGAINST_ALL_WATER(float x, float y, float z, int flags, float* waterHeight); // 0x2B3451FA1E3142E2 b1207

Parameters

#NameType
1xfloat
2yfloat
3zfloat
4flagsint
5waterHeightfloat* (out pointer)

Facts

Facts about TEST_VERTICAL_PROBE_AGAINST_ALL_WATER
Name
TEST_VERTICAL_PROBE_AGAINST_ALL_WATER
Hash
0x2B3451FA1E3142E2
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, waterHeight = Citizen.InvokeNative(0x2B3451FA1E3142E2, -- TEST_VERTICAL_PROBE_AGAINST_ALL_WATER
  0.0, -- float x
  0.0, -- float y
  0.0, -- float z
  0, -- int flags
  Citizen.PointerValueFloat(), -- float* waterHeight
  Citizen.ResultAsInteger()
)
print(result, waterHeight)
JavaScript
// Whole JS numbers are sent as integers: pass floats like 1.5 (or n + 0.0000001), never 1.
const [result, waterHeight] = Citizen.invokeNative("0x2B3451FA1E3142E2", // TEST_VERTICAL_PROBE_AGAINST_ALL_WATER
  0.0, // float x
  0.0, // float y
  0.0, // float z
  0, // int flags
  Citizen.pointerValueFloat(), // float* waterHeight
  Citizen.resultAsInteger()
);
console.log(result, waterHeight)
C#
var waterHeightArg = new OutputArgument();
int result = Function.Call<int>((Hash)0x2B3451FA1E3142E2, // TEST_VERTICAL_PROBE_AGAINST_ALL_WATER
  0.0f, // float x
  0.0f, // float y
  0.0f, // float z
  0, // int flags
  waterHeightArg // float* waterHeight
);
float waterHeight = waterHeightArg.GetResult<float>();
All WATER natives

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