The Lab
WATER native

GET_WATER_HEIGHT_NO_WAVES

returns BOOL4 paramsbuild 1207

Writes the water surface height at the given coordinates to height ignoring waves, and returns true if water was found.

Signature

C
BOOL GET_WATER_HEIGHT_NO_WAVES(float x, float y, float z, float* height); // 0xDCF3690AA262C03F b1207

Parameters

#NameType
1xfloat
2yfloat
3zfloat
4heightfloat* (out pointer)

Facts

Facts about GET_WATER_HEIGHT_NO_WAVES
Name
GET_WATER_HEIGHT_NO_WAVES
Hash
0xDCF3690AA262C03F
Namespace
Returns
BOOL
Game build
1207

Examples

Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.

Lua
local result, height = Citizen.InvokeNative(0xDCF3690AA262C03F, -- GET_WATER_HEIGHT_NO_WAVES
  0.0, -- float x
  0.0, -- float y
  0.0, -- float z
  Citizen.PointerValueFloat(), -- float* height
  Citizen.ReturnResultAnyway()
)
if result then
  -- ...
end
JavaScript
// Whole JS numbers are sent as integers: pass floats like 1.5 (or n + 0.0000001), never 1.
const [result, height] = Citizen.invokeNative("0xDCF3690AA262C03F", // GET_WATER_HEIGHT_NO_WAVES
  0.0, // float x
  0.0, // float y
  0.0, // float z
  Citizen.pointerValueFloat(), // float* height
  Citizen.returnResultAnyway()
);
if (result) {
  // ...
}
C#
var heightArg = new OutputArgument();
bool result = Function.Call<bool>((Hash)0xDCF3690AA262C03F, // GET_WATER_HEIGHT_NO_WAVES
  0.0f, // float x
  0.0f, // float y
  0.0f, // float z
  heightArg // float* height
);
float height = heightArg.GetResult<float>();
All WATER natives

Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.