GetTime

From Multi Theft Auto: Wiki
Revision as of 06:37, 5 April 2012 by X86dev (talk | contribs)
Jump to navigation Jump to search

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

Syntax

int int getTime ()

Returns

Returns two ints that represent hours and minutes.

Example

function currentTime()
    local hour, minutes = getTime()
    outputChatBox( "The current time is "..hour..":"..minutes, source )
end
addCommandHandler("gettime", currentTime)

See Also