SetBanReason: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 27: | Line 27: | ||
if getBanNick(v) == name then | if getBanNick(v) == name then | ||
setBanReason(v,reason) | setBanReason(v,reason) | ||
outputChatBox("Successfully edited the new Ban Reason.") | outputChatBox("Successfully edited the new Ban Reason.",player,0,125,0) | ||
end | end | ||
end | end |
Revision as of 15:18, 23 July 2014
Syntax
bool setBanReason( ban theBan, string theReason )
Required Arguments
- theBan: The ban in which you wish to retrieve the username of.
- theReason: the new reason (max 60 characters)
Returns
Returns true when is changed, false otherwise.
Example
function setreason (player,cmd,name,...) local reason = table.concat({...}," ") if name and reason then local bans = getBans() for i,v in ipairs(bans)do if getBanNick(v) == name then setBanReason(v,reason) outputChatBox("Successfully edited the new Ban Reason.",player,0,125,0) end end end end addCommandHandler("setreason",setreason)
See Also
- addBan
- banPlayer
- getBanAdmin
- getBanIP
- getBanNick
- getBanReason
- getBanSerial
- getBanTime
- getBanUsername
- getBans
- getUnbanTime
- isBan
- kickPlayer
- setBanAdmin
- setBanNick
- setBanReason
- setUnbanTime
- reloadBans
- removeBan