RedM Natives

GET_WATER_HEIGHT_NO_WAVES

Hash0xDCF3690AA262C03F
Runtime nameGetWaterHeightNoWaves
NamespaceWATER
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0x8EE6B53CE13A9794

Signature

BOOL GET_WATER_HEIGHT_NO_WAVES(float x, float y, float z, float* height);

Parameters

NameTypeDescription
xfloat—
yfloat—
zfloat—
heightfloat*—

Returns BOOL

Usage

Lua
local retval, height = GetWaterHeightNoWaves(x, y, z, height)

-- always works, by hash
local retval, height = Citizen.InvokeNative(0xDCF3690AA262C03F, x, y, z, Citizen.PointerValueFloatInitialized(height), Citizen.ReturnResultAnyway())
JavaScript and C#
JavaScript
const [retval, height] = GetWaterHeightNoWaves(x, y, z, height);

// by hash
const [retval, height] = Citizen.invokeNative('0xDCF3690AA262C03F', x + 0.0000001, y + 0.0000001, z + 0.0000001, Citizen.pointerValueFloatInitialized(height), Citizen.returnResultAnyway());
C#
var height = new OutputArgument();
bool retval = Function.Call<bool>((Hash)0xDCF3690AA262C03F, x, y, z, height);
// height.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

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.