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...")
 
(Replaced content with "SetWeatherLock has no effect! This function is for compatible.")
Line 1: Line 1:
Sets the the weather to be locked or not
SetWeatherLock has no effect! This function is for compatible.
 
== Syntax ==
 
<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}}

Revision as of 13:39, 7 March 2015

SetWeatherLock has no effect! This function is for compatible.