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

Function

createWater

ServerWorldIdentical to MTA:SA

Creates a water element as an area with three or four corners. A final true argument means shallow water.

Syntax

element createWater(float ...)

Arguments

...float
9 numbers (x, y, z of three corners) or 12 numbers (of four), optionally followed by shallow (bool).

Returns

The water element, or false.

Example

local pool = createWater(2000, -1700, 12, 2010, -1700, 12, 2000, -1690, 12, 2010, -1690, 12)

Notes

State for scripts. The game does not draw script-created water yet; the element stores the corners for script logic.

See also