Scripting/Squirrel/Functions/SetWeatherLock

From Vice City Multiplayer
Revision as of 22:08, 5 March 2015 by Rww (talk | contribs) (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...")
(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

Sets the the weather to be locked or not

Syntax

bool SetWeatherLock( bool )

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.

function onPlayerCommand( player, cmd, text )
{
     if ( cmd == "weatherlock" )
     {
          SetWeatherLock( true );
     }
}

or

function onPlayerCommand( player, cmd, text )
{
     if ( cmd == "weatherunlock" )
     {
          SetWeatherLock( false );
     }
}

Notes

The call onPlayerCommand was used in in this example. More info about this in the corresponding page.

Related Functions