Black Ops III

DepthInWater

Returns the depth (in inches) that the entity is in water. Returns depth in inches, or 0 if the entity isn't in water. Will work for all water types.

Example:

depth = get_players()[0] DepthInWater()