# WATER::TEST_VERTICAL_PROBE_AGAINST_ALL_WATER

- **Hash:** `0x2B3451FA1E3142E2`
- **Namespace:** WATER
- **Runtime name (Lua/JS):** `TestVerticalProbeAgainstAllWater`
- **Side:** client (game native)
- **Name status:** official
- **Documentation:** described
- **Since game build:** 1207
- **URL:** https://natives.borderlinerp.com/natives/WATER/TEST_VERTICAL_PROBE_AGAINST_ALL_WATER

## Signature

```c
int TEST_VERTICAL_PROBE_AGAINST_ALL_WATER(float x, float y, float z, int flags, float* waterHeight);
```

## Parameters

- `x` (`float`)
- `y` (`float`)
- `z` (`float`)
- `flags` (`int`)
- `waterHeight` (`float*`)

## Returns

`int`

## Description

Checks against a global variable that is set by _SET_WORLD_WATER_TYPE. If it's set to 1 (Guarma) it will fail.

See TEST_PROBE_AGAINST_ALL_WATER.

## Usage

### Lua

```lua
local retval, waterHeight = TestVerticalProbeAgainstAllWater(x, y, z, flags, waterHeight)

-- always available, by hash
local retval, waterHeight = Citizen.InvokeNative(0x2B3451FA1E3142E2, x, y, z, flags, Citizen.PointerValueFloatInitialized(waterHeight), Citizen.ResultAsInteger())
```

### JavaScript

```js
const [retval, waterHeight] = TestVerticalProbeAgainstAllWater(x, y, z, flags, waterHeight);

// by hash
const [retval, waterHeight] = Citizen.invokeNative('0x2B3451FA1E3142E2', x + 0.0000001, y + 0.0000001, z + 0.0000001, flags, Citizen.pointerValueFloatInitialized(waterHeight), Citizen.returnResultAnyway(), Citizen.resultAsInteger());
```

### C#

```csharp
var waterHeight = new OutputArgument();
int retval = Function.Call<int>((Hash)0x2B3451FA1E3142E2, x, y, z, flags, waterHeight);
// waterHeight.GetResult<float>()
```

- Float parameters: Lua integers (`10`, or whole numbers decoded from NUI/JSON) are sent as ints and read as garbage. Write `10.0` or `value + 0.0`. The generated JS wrappers add `0.0000001` to 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: alloc8or RDR3 NativeDB.*
