SetUnbanTime: Difference between revisions
Jump to navigation
Jump to search
(Created page with "__NOTOC__ {{Server function}} {{Needs_Example}} {{New items|4.0132|1.4| This function set a new unbantime to ban. }} ==Syntax== <syntaxhighlight lang="lua"> bool setUnbanTime( ban th...") |
m (fix oop) |
||
(7 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{Server function}} | {{Server function}} | ||
{{New items|3.014|1.4| | |||
{{New items| | This function sets a new unban time of a given [[ban]] using unix timestamp (seconds since Jan 01 1970). | ||
This function | |||
}} | }} | ||
==Syntax== | ==Syntax== | ||
Line 11: | Line 9: | ||
bool setUnbanTime( ban theBan, int theTime ) | bool setUnbanTime( ban theBan, int theTime ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{OOP||[[ban]]:setUnbanTime|unbanTime|getUnbanTime}} | |||
===Required Arguments=== | ===Required Arguments=== | ||
*'''theBan:''' The [[ban]] | *'''theBan:''' The [[ban]] of which to change the unban time of | ||
*'''theTime:''' the new unban time | *'''theTime:''' the new unban time | ||
===Returns=== | ===Returns=== | ||
Returns ''true'' | Returns ''true'' if changed successfully, ''false'' otherwise. | ||
==Example== | ==Example== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
addCommandHandler("banMe", | |||
function (player) | |||
local ban = banPlayer(player) | |||
setUnbanTime(ban, 500) | |||
end | |||
) | |||
</syntaxhighlight> | </syntaxhighlight> | ||
==See Also== | ==See Also== | ||
{{Admin_functions}} | {{Admin_functions}} | ||
[[ru:setUnbanTime]] |
Latest revision as of 14:39, 7 August 2016
This function sets a new unban time of a given ban using unix timestamp (seconds since Jan 01 1970).
Syntax
bool setUnbanTime( ban theBan, int theTime )
OOP Syntax Help! I don't understand this!
- Method: ban:setUnbanTime(...)
- Variable: .unbanTime
- Counterpart: getUnbanTime
Required Arguments
- theBan: The ban of which to change the unban time of
- theTime: the new unban time
Returns
Returns true if changed successfully, false otherwise.
Example
addCommandHandler("banMe", function (player) local ban = banPlayer(player) setUnbanTime(ban, 500) end )