float value of water height?
-
Does anyone know how to obtain a float value of the water height?
-
Try with these
BOOL GET_WATER_HEIGHT(float x, float y, float z, float height) BOOL GET_WATER_HEIGHT_NO_WAVES(float x, float y, float z, float* height) float _GET_CURRENT_INTENSITY()
-
@Alex106 I'm using C# and I want to be able to retrieve the float* height.
-
Check if this work
using GTA; using GTA.Native; using System; using System.Windows.Forms; public class Main : Script { int height = 0; public Main() { KeyDown += OnKeyDown; } void OnKeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.F8) { height = Function.Call<int>((Hash)0x2B2A2CC86778B619); //_GET_CURRENT_INTENSITY UI.Notify("" + height.ToString()); }}}
-
@Alex106 said in float value of water height?:
using GTA;
using GTA.Native;
using System;
using System.Windows.Forms;public class Main : Script
{
int height = 0;public Main()
{
KeyDown += OnKeyDown;
}void OnKeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.F8)
{
height = Function.Call<int>((Hash)0x2B2A2CC86778B619); //_GET_CURRENT_INTENSITY
UI.Notify("" + height.ToString());
}}}Okay im testing now
-
anyone know?
-
float GetWaterHeight(Vector3 position) { OutputArgument outHeight = new OutputArgument(); Function.Call<bool>(Hash.GET_WATER_HEIGHT, position.X, position.Y, position.Z, outHeight); return outHeight.GetResult<float>(); }
-
@Jitnaught Thanks man
-
@Jitnaught It works very good