GetTime: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
Line 11: Line 11:
==Example==
==Example==
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
local hour, mins = getTime ()
function currentTime()
outputChatBox ( "The current time is " .. hour .. ":" .. mins )
local hour, minutes = getTime()
outputChatBox( "The current time is "..hour..":"..minutes.."", source )
end
addCommandHandler("gettime", currentTime)
</syntaxhighlight>
</syntaxhighlight>



Revision as of 18:23, 4 April 2012