TEST_VERTICAL_PROBE_AGAINST_ALL_WATER
Checks against a global variable that is set by _SET_WORLD_WATER_TYPE.
Hash
0x2B3451FA1E3142E2Runtime name
TestVerticalProbeAgainstAllWaterNamespaceWATER
SideClient
NameOfficial
Docs
Since build1207
GTA V hash
0x2B3451FA1E3142E2Signature
int TEST_VERTICAL_PROBE_AGAINST_ALL_WATER(float x, float y, float z, int flags, float* waterHeight);Parameters
| Name | Type | Description |
|---|---|---|
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.
Usage
local retval, waterHeight = TestVerticalProbeAgainstAllWater(x, y, z, flags, waterHeight)
-- always works, by hash
local retval, waterHeight = Citizen.InvokeNative(0x2B3451FA1E3142E2, x, y, z, flags, Citizen.PointerValueFloatInitialized(waterHeight), Citizen.ResultAsInteger())JavaScript and C#
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());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. 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.