ResetWaterLevel: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
m (fix oop)
(Remove obsolete Requirements section)
 
(2 intermediate revisions by one other user not shown)
Line 8: Line 8:
</syntaxhighlight>  
</syntaxhighlight>  


{{OOP||[[water]]:resetLevel}}
{{OOP||[[Water]].resetLevel}}


===Returns===
===Returns===
Line 21: Line 21:
addCommandHandler ( "resetwaterlevel", changeWaterLevelBackToNormal )
addCommandHandler ( "resetwaterlevel", changeWaterLevelBackToNormal )
</syntaxhighlight>
</syntaxhighlight>
==Requirements==
{{Requirements|1.2|1.2|}}


==See Also==
==See Also==
{{Client water functions}}
{{Client water functions}}

Latest revision as of 15:40, 7 November 2024

This function resets the water of the GTA world back to its default level. Water elements are not affected.

Syntax

bool resetWaterLevel ()


OOP Syntax Help! I don't understand this!

Method: Water.resetLevel(...)


Returns

Returns true if water level was reset correctly, false otherwise.

Example

This example adds a command resetwaterlevel with which a player can reset the water level.

function changeWaterLevelBackToNormal ()
    resetWaterLevel ()
end
addCommandHandler ( "resetwaterlevel", changeWaterLevelBackToNormal )

See Also