Scripting/Squirrel/Functions/Misc/GetTime
From VC-MP Wiki
This function returns the number of seconds elapsed since January 1, 1970.
Syntax
int GetTime()
Arguments
- none
Example
This example tells the player how many days have elapsed since January 1, 1970, when they type '/c days'
function onPlayerCommand( player, cmd, text ) { if ( cmd == "days" ) { MessagePlayer( "Did you know, that " + floor( GetTime() / 86400 ) + " days have elapsed since January 1, 1970?", 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
