GET_WATER_HEIGHT
Writes the water surface height at the given coordinates to height, including waves, and returns true if water was found.
Signature
BOOL GET_WATER_HEIGHT(float x, float y, float z, float* height); // 0xFCA8B23F28813F69 b1207Parameters
| # | Name | Type |
|---|---|---|
| 1 | x | float |
| 2 | y | float |
| 3 | z | float |
| 4 | height | float* (out pointer) |
Facts
| Name | GET_WATER_HEIGHT |
|---|---|
| Hash | 0xFCA8B23F28813F69 |
| Namespace | |
| Returns | BOOL |
| Game build | 1207 |
Examples
Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.
local result, height = Citizen.InvokeNative(0xFCA8B23F28813F69, -- GET_WATER_HEIGHT
0.0, -- float x
0.0, -- float y
0.0, -- float z
Citizen.PointerValueFloat(), -- float* height
Citizen.ReturnResultAnyway()
)
if result then
-- ...
end// Whole JS numbers are sent as integers: pass floats like 1.5 (or n + 0.0000001), never 1.
const [result, height] = Citizen.invokeNative("0xFCA8B23F28813F69", // GET_WATER_HEIGHT
0.0, // float x
0.0, // float y
0.0, // float z
Citizen.pointerValueFloat(), // float* height
Citizen.returnResultAnyway()
);
if (result) {
// ...
}var heightArg = new OutputArgument();
bool result = Function.Call<bool>((Hash)0xFCA8B23F28813F69, // GET_WATER_HEIGHT
0.0f, // float x
0.0f, // float y
0.0f, // float z
heightArg // float* height
);
float height = heightArg.GetResult<float>();Related WATER natives
Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.