ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Shared functions
  3. getTime

Function

getTime

Server and clientWorldIdentical to MTA:SA

Returns the current game hour and minute on the server (the same that players see).

Syntax

int, int getTime()

Returns

Hour 0-23 and minute 0-59.

Example

addCommandHandler("godzina", function(player)
    local hour, minute = getTime()
    outputChatBox(("Jest %02d:%02d"):format(hour, minute), player)
end)

See also