Ir para conteúdo

Posts Recomendados

- XTIBIANOS -

 

Hoje Vou Ensinar Como Banir O Ip Dos Players

 

Vá Na Pasta Do Seu Otserv Data/Talkactions/scripts Crie Um Bloco De Notas .lua Com O Nome Banip Agora Cole O Script:

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, 30 * 24 * 60 * 60)
doRemoveCreature(pid)
end
return TRUE
end

 

Vermelho = Os Dias Que O Player Vai Ser Banido

 

Agora Vá No Arquivo Talkactions.xml Cole Esse Script La:

<talkaction log="yes" access="3" words="/B" script="Banip.lua"/>

E Pronto !

 

By ADM Sorriso! :positive:

Editado por ADMSorriso
Link para o comentário
https://xtibia.com/forum/topic/122510-talkaction-ban-ip/
Compartilhar em outros sites

isso é desnecessario:

if(doAddIpBanishment(tmp) or pid == 0 or (isPlayerGhost(pid) == TRUE)) then

e você poderia usar o parâmetro para o gm ~ god inserir a quantidade de dias que ele seria banido.

Link para o comentário
https://xtibia.com/forum/topic/122510-talkaction-ban-ip/#findComment-808214
Compartilhar em outros sites

  • 5 weeks later...
  • 2 months later...
  • 8 months later...
×
×
  • Criar Novo...