getTime | Multi Theft Auto: Wiki Skip to content

getTime

Client-side
Server-side
Shared

This page is incomplete! Help wanted!

Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.


This function is used to get the current time in the game. If you want to get the real server time, use getRealTime.

Syntax

getTime ( )

Code Examples

server
function currentTime()
local timehour, timeminute = getTime()
outputChatBox( "The current game time is "..timehour..":"..timeminute )
end
addCommandHandler("gettime", currentTime)

See Also

World Functions