TEST_PROBE_AGAINST_ALL_WATER
SCRIPT_WATER_TEST_RESULT_NONE, SCRIPT_WATER_TEST_RESULT_WATER, SCRIPT_WATER_TEST_RESULT_BLOCKED,
Hash
0x8974647ED222EA5FRuntime name
TestProbeAgainstAllWaterNamespaceWATER
SideClient
NameOfficial
Docs
Since build1207
GTA V hash
0x8974647ED222EA5FSignature
int TEST_PROBE_AGAINST_ALL_WATER(float x1, float y1, float z1, float x2, float y2, float z2, int flags, Vector3* intersectionPos);Parameters
| Name | Type | Description |
|---|---|---|
x1 | float | — |
y1 | float | — |
z1 | float | — |
x2 | float | — |
y2 | float | — |
z2 | float | — |
flags | int | — |
intersectionPos | Vector3* | — |
Returns int
Description
enum eScriptWaterTestResult
{
SCRIPT_WATER_TEST_RESULT_NONE,
SCRIPT_WATER_TEST_RESULT_WATER,
SCRIPT_WATER_TEST_RESULT_BLOCKED,
};Usage
local retval, intersectionPos = TestProbeAgainstAllWater(x1, y1, z1, x2, y2, z2, flags, intersectionPos)
-- always works, by hash
local retval, intersectionPos = Citizen.InvokeNative(0x8974647ED222EA5F, x1, y1, z1, x2, y2, z2, flags, Citizen.PointerValueVector(), Citizen.ResultAsInteger())JavaScript and C#
const [retval, intersectionPos] = TestProbeAgainstAllWater(x1, y1, z1, x2, y2, z2, flags, intersectionPos);
// by hash
const [retval, intersectionPos] = Citizen.invokeNative('0x8974647ED222EA5F', x1 + 0.0000001, y1 + 0.0000001, z1 + 0.0000001, x2 + 0.0000001, y2 + 0.0000001, z2 + 0.0000001, flags, Citizen.pointerValueVector(), Citizen.returnResultAnyway(), Citizen.resultAsInteger());var intersectionPos = new OutputArgument();
int retval = Function.Call<int>((Hash)0x8974647ED222EA5F, x1, y1, z1, x2, y2, z2, flags, intersectionPos);
// intersectionPos.GetResult<Vector3>()- Float parameters: Lua integers (
10, or whole numbers decoded from NUI/JSON) are sent as ints and read as garbage. Write10.0orvalue + 0.0. The generated JS wrappers add0.0000001to non-zero floats for the same reason. - The last argument is an in/out pointer: pass its initial value, and the updated value is returned after the result.
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.