TEST_PROBE_AGAINST_ALL_WATER
Casts a probe between two points against all water and writes the hit position to intersectionPos. Returns a result code.
Signature
int TEST_PROBE_AGAINST_ALL_WATER(float x1, float y1, float z1, float x2, float y2, float z2, int flags, Vector3* intersectionPos); // 0x8974647ED222EA5F b1207Parameters
| # | Name | Type |
|---|---|---|
| 1 | x1 | float |
| 2 | y1 | float |
| 3 | z1 | float |
| 4 | x2 | float |
| 5 | y2 | float |
| 6 | z2 | float |
| 7 | flags | int |
| 8 | intersectionPos | Vector3* (out pointer) |
Facts
| 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.
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)// 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)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>();Related WATER natives
Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.