Scripting/Squirrel/Functions/Misc/GetTickCount
From VC-MP Wiki
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
- Message
- MessagePlayer
- MessageAllExcept
- PrivMessage
- PrivMessageAll
- ClientMessage
- ClientMessageToAll
- Announce
- AnnounceAll
- SendPlayerMessage
- KickPlayer
- BanPlayer
- BanIP
- UnbanIP
- GetWeaponName
- GetWeaponID
- GetDistrictName
- GetSkinName
- GetTickCount
- GetTime
- GetFullTime
- IsNum
- BindKey
- UnbindKey
- CallFunc
- InPoly
- DistanceFromPoint
- ReloadScripts
