Scripting/Squirrel/Functions/SetWaterLevel: Difference between revisions

From Vice City Multiplayer
Jump to navigation Jump to search
Caution icon
This wiki is using an old backup from 2020
Some information may be old/missing
(Created page with "This function will set the gravity of the game. == Syntax == <pre>SetWaterLevel( waterlevel )</pre> == Arguments == * ''float'' '''waterlevel'''' - The waterlevel of the g...")
 
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
This function will set the gravity of the game.
This function will set the water level of the game.


== Syntax ==
== Syntax ==
Line 7: Line 7:
== Arguments ==
== Arguments ==


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


== Example ==
== Example ==
 
<source lang=squirrel>
{{Scripting/Needs_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 );
}
}
</source>


=== Notes ===
=== Notes ===


== Related Functions ==
== Related Functions ==


{{Scripting/Squirrel/Functions/Server_Settings}}
{{Scripting/Squirrel/Functions/Server_Settings}}
[[Category:Scripting/Squirrel/Functions/Server_Settings _Functions]]

Latest revision as of 08:30, 26 April 2019

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