Scripting/Squirrel/Functions/SetWeatherLock: 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 "Sets the the weather to be locked or not == Syntax == <pre>bool SetWeatherLock( bool )</pre> == Arguments == * '''bool''' - Whether or not to lock the weather == Example...")
 
No edit summary
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
Sets the the weather to be locked or not
{{Scripting/Deprecated}}


== Syntax ==
{{Scripting/Noop}}
 
<pre>bool SetWeatherLock( bool )</pre>
 
== Arguments ==
 
* '''bool''' - Whether or not to lock the weather
 
== Example ==
 
After typing '/c weatherlock', the weather rate will be locked. And '/c weatherunlock', the weather rate will be unlocked.
 
<source lang="squirrel">
function onPlayerCommand( player, cmd, text )
{
    if ( cmd == "weatherlock" )
    {
          SetWeatherLock( true );
    }
}
</source>
 
or
 
<source lang="squirrel">
function onPlayerCommand( player, cmd, text )
{
    if ( cmd == "weatherunlock" )
    {
          SetWeatherLock( false );
    }
}
</source>
 
== Notes ==
 
The call [[Scripting/Squirrel/Events/Player/onPlayerCommand|onPlayerCommand]] was used in in this example. More info about this in the corresponding page.
 
== Related Functions ==
 
{{Scripting/Squirrel/Functions/Server_Settings}}

Latest revision as of 07:32, 9 March 2016

Note: This function is deprecated. Its use is discouraged as it may be removed in a future update.


Note: This function does not do anything. It only exists for compatibility reasons and will be removed in the future.