TEST_VERTICAL_PROBE_AGAINST_ALL_WATER
Casts a vertical probe at the given point against all water and writes the water height to waterHeight. Returns a result code.
Signature
int TEST_VERTICAL_PROBE_AGAINST_ALL_WATER(float x, float y, float z, int flags, float* waterHeight); // 0x2B3451FA1E3142E2 b1207Parameters
| # | Name | Type |
|---|---|---|
| 1 | x | float |
| 2 | y | float |
| 3 | z | float |
| 4 | flags | int |
| 5 | waterHeight | float* (out pointer) |
Facts
| 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.
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)// 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)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>();Related WATER natives
Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.