Scripting/Squirrel/Functions/Game/GetWeatherRate

From VC-MP Wiki

Jump to: navigation, search

Returns the rate at which weather will change in the server

Syntax

int GetWeatherRate()

Arguments

  • none

Example

Similar to GetTimeRate. The time is returned in milliseconds, but after '/ 1000' it will be returned in seconds, like in this example. Use '/c askweatherrate'

function onPlayerCommand( player, cmd, text )
{
     if ( cmd == "askweatherrate" )
     {
          PrivMessage( "Here is your answer! The weather is changing every " + ( GetWeatherRate() / 1000 ) + " secs.", player );
     }
}

Notes

The function PrivMessage and call onPlayerCommand were used in in this example. More info about them in the corresponding pages.

Related Functions

Personal tools
squirrel scripting