setWaterVertexPosition | Multi Theft Auto: Wiki Skip to content

setWaterVertexPosition

Client-side
Server-side
Shared

Pair: getWaterVertexPosition

This page is incomplete! Help wanted!

Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.


Sets the world position of a corner point of a water area.

Note

X and Y positions will be changed to an even integer. i.e. -2, 0, 2, 4 etc.

Syntax

setWaterVertexPosition ( )

Code Examples

server

This example creates a water whose vertices 2 and 4 go up and down when someone uses the '/water' command.

waterSquare = createWater (1418, -625, 91.8, 1436, -625, 91.8, 1418, -613, 91.8, 1436, -613, 91.8)
local waterVertices = false
function waterUp ()
if waterVertices == false then
setWaterVertexPosition (waterSquare, 2, 1436, -625, 94.8)
setWaterVertexPosition (waterSquare, 4, 1436, -613, 94.8)
waterVertices = true
else
setWaterVertexPosition (waterSquare, 2, 1436, -625, 91.8)
setWaterVertexPosition (waterSquare, 4, 1436, -613, 91.8)
waterVertices = false
end
end
addCommandHandler("water", waterUp)