ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Server functions
  3. setWaterLevel

Function

setWaterLevel

ServerWorldIdentical to MTA:SA

Stores the water level: with just a number for the whole world, with a water element for that element.

Syntax

bool setWaterLevel(float/element levelOrWater [, float level = nil])

Arguments

levelOrWaterfloat/element
Water level in metres, or a water element.
levelfloat, optional = nil
Level for the water element.

Returns

true on success.

Example

setWaterLevel(5)

Notes

State for scripts. The sea in the game stays at its level; getWaterLevel and testLineAgainstWater use the stored value.

See also