• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

TalkAction /ban nick, days, comment (TFS 0.4)

Natan Beckman

Well-Known Member
Joined
Aug 1, 2010
Messages
548
Reaction score
52
Location
Teresina-PI/Br
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:
/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:
I used..
15:15 /ban pedrico, 20, Bye
dibujofm.png

See error.. time and coment.
 
Anyone know how to make banning only player (not all characters - account) on tfs 0.3.6pl1 ?
 
Boa Natan sempre fazendo ótimos trabalhos lembro de quando você postava os melhores Global com teleport nos tempos médio dos otserv.
 
Back
Top