Scripting/Squirrel/Functions/SetWaterLevel

From Vice City Multiplayer
Revision as of 08:30, 26 April 2019 by Xhefri (talk | contribs) (→‎Example)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Caution icon
This wiki is using an old backup from 2020
Some information may be old/missing

This function will set the water level of the game.

Syntax

SetWaterLevel( waterlevel )

Arguments

  • float waterlevel' - The water level of the game (default is 6)

Example

else if ( cmd == "waterlevel" )
{
if ( !text ) MessagePlayer( "Use /waterlevel <Water Level>", player );
else if ( !IsNum( text ) ) MessagePlayer( "Water level must be an integer.", player );
else {
SetWaterLevel(text.tointeger())
MessagePlayer( "Water level has been changed." , player );
}
}

Notes

Related Functions