SetUnbanTime: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
Line 20: Line 20:
==Example==
==Example==
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
--TODO
addCommandHandler("banMe",
function (player)
local ban = banPlayer(player)
setUnbanTime(ban, 500)
end
)
 
</syntaxhighlight>
</syntaxhighlight>



Revision as of 19:13, 16 July 2016

Accessories-text-editor.png Script Example Missing Function SetUnbanTime needs a script example, help out by writing one.

Before submitting check out Editing Guidelines Script Examples.

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 )

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
)

See Also