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

Function

getBanReason

ServerAdministration and bansIdentical to MTA:SA

Returns the ban reason.

Syntax

string getBanReason(ban ban)

Arguments

banban
The ban handle.

Returns

The reason, or false if none was given.

Example

addCommandHandler("bany", function(admin)
    for i, ban in ipairs(getBans()) do
        outputChatBox(i .. ". " .. tostring(getBanNick(ban)) .. ": " .. (getBanReason(ban) or "bez powodu"), admin)
    end
end, true)

See also