_GET_PLAYER_PED_WATER_DEPTH
Returns how deep the water is below the ped (if in water) -1.0f = Not in water 10.0f = Max water depth
Hash
0x2942457417A5FD24Runtime name
GetPlayerPedWaterDepthNamespacePED
SideClient
NameCommunity guess
Docs
Since build1207
Signature
float _GET_PLAYER_PED_WATER_DEPTH(Ped ped);Parameters
| Name | Type | Description |
|---|---|---|
ped | Ped | — |
Returns float
Description
Returns how deep the water is below the ped (if in water)
-1.0f = Not in water
10.0f = Max water depth
Usage
local retval = GetPlayerPedWaterDepth(ped)
-- always works, by hash
local retval = Citizen.InvokeNative(0x2942457417A5FD24, ped, Citizen.ResultAsFloat())JavaScript and C#
const retval = GetPlayerPedWaterDepth(ped);
// by hash
const retval = Citizen.invokeNative('0x2942457417A5FD24', ped, Citizen.returnResultAnyway(), Citizen.resultAsFloat());float retval = Function.Call<float>((Hash)0x2942457417A5FD24, ped);- The name is a community guess and may change. If the named call is missing in your client build, use
InvokeNativewith the hash — it always works.
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.