SA

[Talk] Ban Ip

Por samuelpastel, 10 de jun. de 2011 em Actions e Talkactions

script
1
1.2k
samuelpastelS
10 de junho de 2011 às 18:52

copie qualquer arquivo no talkation/scrip e renomeie para "ban" e cole isso

function onSay(cid, words, param)

if(param == "") then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.")
return TRUE
end

local pid = getPlayerByNameWildcard(param)
local tmp = getPlayerIp(pid)
if(doAddIpBanishment(tmp) or pid == 0 or (isPlayerGhost(pid) == TRUE)) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. param .. " is not currently online.")
end

if isPlayerGhost(pid) == FALSE then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, getCreatureName(pid) .. " has been banned.")
doAddIpBanishment(tmp, 7 * 24 * 60 * 60)
doRemoveCreature(pid)
end
return TRUE
end

depois vai talkation.xml adicione esse tag

<talkaction log="yes" words="/ban" access="5" script="ban.lua"/>