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

Function

setUnbanTime

ServerAdministration and bansIdentical to MTA:SA

Changes when the ban expires. You pass a moment in seconds since 1970, not a duration.

Syntax

bool setUnbanTime(ban ban, int time)

Arguments

banban
The ban handle.
timeint
Expiry time (Unix time).

Returns

true on success.

Example

local now = getRealTime().timestamp
for _, ban in ipairs(getBans()) do
    setUnbanTime(ban, now + 24 * 3600)
end

See also