ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Server functions
  3. getBanTime

Function

getBanTime

ServerAdministration and bansIdentical to MTA:SA

Returns when the ban was created, in seconds since 1 January 1970 (Unix time).

Syntax

int getBanTime(ban ban)

Arguments

banban
The ban handle.

Returns

The creation time or false.

Example

for _, ban in ipairs(getBans()) do
    local t = getRealTime(getBanTime(ban))
    print(string.format("%s: %02d.%02d.%d", tostring(getBanNick(ban)), t.monthday, t.month + 1, t.year + 1900))
end