[Talk] Ban Ip

samuelpastel
em Actions e Talkactions

samuelpastel

/root
avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 10/06/11Posts: 6

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"/>

Samuel157777 Fan

3213076694321.png

Sign

tumblrlm2miql4wr1qafrh6.gif