Scripting/Squirrel/Functions/Game/GetTimerate

From VC-MP Wiki

Jump to: navigation, search

Returns the current timerate in the server

Syntax

int GetTimeRate()

Arguments

  • none

Example

To know, what timerate is set on the server, the player type '/c asktimerate'

function onPlayerCommand( player, cmd, text )
{
     if ( cmd == "asktimerate" )
     {
          PrivMessage( "Here is your answer! The timerate on this server is set to: " + GetTimeRate() + ".", 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