Scripting/Squirrel/Functions/Game/SetMinute

From VC-MP Wiki

Jump to: navigation, search

This function changes the minutes of the server time.

Syntax

bool SetMinute( int min )

Arguments

  • min - Minutes to set

Example

This example will set the minutes to the amount player inputs with the command '/c setmin 12'.

function onPlayerCommand( player, cmd, text )
{
     if ( cmd == "setmin" )
     {
          local min = text.tointeger();
 
          if ( ( min > 0 ) && ( min < 60 ) ) SetMinute( min );
     }
}

Notes

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

Related Functions

Personal tools
squirrel scripting