Scripting/Squirrel/Functions/Misc/GetTickCount

From VC-MP Wiki

Jump to: navigation, search

This function returns the uptime of the host in milliseconds.

Syntax

int GetTickCount()

Arguments

  • none

Example

This example tells the player how long the host pc has been on when they type '/c hoston'

function onPlayerCommand( player, cmd, text )
{
     if ( cmd == "hoston" )
     {
          MessagePlayer( "The host pc has been online for " + floor( GetTickCount() / 60000 ) + " minutes.", player );
     }
}

Notes

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

Related Functions

Personal tools
squirrel scripting