Natan Beckman
Well-Known Member
A few days i ago to look for a topic relaciondo / ban and found none.
Therefore I am posting an updated script in version 0.4 TFS.
You use the command...
example:
Script by LukeSkywalker!
Therefore I am posting an updated script in version 0.4 TFS.
You use the command...
example:
/ban player, 3, using bug abuse
<talkaction log="yes" words="/ban" access="3" event="script" value="ban.lua"/>
function onSay(cid, words, param)
local parametres = string.explode(param, ",")
if(parametres[1] ~= nil) then
local accId = getAccountIdByName(parametres[1])
if(accId > 0) then
local comment = ""
if(parametres[2] == nil) then
doPlayerSendCancel(cid, "You must enter ban days.")
return true
elseif(isNumber(parametres[2]) == false) then
doPlayerSendCancel(cid, "Ban days use only numbers.")
return true
end
if(parametres[3] ~= nil) then
comment = parametres[3]
end
doAddAccountBanishment(accId, getPlayerGUIDByName(parametres[1]), os.time() + (86400 * parametres[2]), 4, 2, comment, getPlayerGUID(cid), '')
local player = getPlayerByNameWildcard(parametres[1])
if(isPlayer(player) == TRUE) then
doRemoveCreature(player)
end
else
doPlayerSendCancel(cid, "Player with name " .. parametres[1] .. " doesn't exist.")
end
else
doPlayerSendCancel(cid, "You must enter name.")
end
return true
end
Script by LukeSkywalker!
Last edited: