Scripting/Squirrel/Functions/Game/SetTimerate

From VC-MP Wiki

Jump to: navigation, search

Sets the current timerate in the server.

Syntax

bool SetTimeRate( int rate )

Arguments

  • rate - The timerate to set

Example

After typing '/c timerate Integer', the timerate changes to faster/slower. If Integer = 0, the time will stop.

function onPlayerCommand( player, cmd, text )
{
     if ( cmd == "timerate" )
     {
          SetTimeRate( text.tointeger() );
     }
}

Notes

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

Related Functions

Personal tools
squirrel scripting