Ir para conteúdo

Featured Replies

Postado

entao, esse script ali embaixo ta dando erro, e eu n sei como meche nele.. queria saber como mecher , fazendo q so de para logar mage bomb no meu ip!

script:

function onLogin(cid, words, param, channel)

local _ip = nil

local p = 0

local list, ips = {}, {}

local players = getPlayersOnline()

for i, pid in ipairs(players) do

local ip = getPlayerIp(pid)

local tmp = table.find(ips, ip)

if(tmp ~= nil and (not _ip or _ip == ip)) then

if(table.countElements(list, ip) == 0) then

list[players[tmp]] = ip

end

list[pid] = ip

end

table.insert(ips, ip)

end

if(table.maxn(list) > 0) then

meip = getPlayerIp(cid)

mename = getCreatureName(cid)

for pid, ip in pairs(list) do

local metmp = table.find(ips, meip)

if (metmp ~= nil) then

p = p + 1

end

end

if 5 then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce tem ".. p .." chars Online!")

end

if then

doRemoveCreature(cid, mename)

end

else

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce tem ".. p+1 .." char Online!")

end

return true

end

  • Respostas 7
  • Visualizações 3.1k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • Problema resolvido ? Se não foi resolvido eu tenho um script anti-nuke de Account Manager,que creio que é a mesma coisa que você quer,no caso só podem logar 2 players no mesmo IP. (numero de player c

Postado

Ve esse Tuto

Faça um arquivo.lua em creaturescripts/scripts e coloquem assim:

function onLogin(cid)

local quantidade = 5 -- numero max de acc manager on

local b = 0

for _, pid in pairs(getPlayersOnline()) do

if(getCreatureName(pid) == 'Account Manager')then

b = (b or 0) + 1

if b > quantidade then

return FALSE

end

end

end

return TRUE

end

Vai no creaturescripts.xml e coloquem esta tag:

<event type="login" name="AntiAccBomb" script="nome do seu script.lua"/>

Editado por Yagami (veja o histórico de edições)

yagami10.png
  • 3 months later...
Postado

Ae garotinho do primeiro post ae, vo manda o script pra vc, sem bug algum, e só pegar e usar!

function onLogin(cid, words, param, channel)

local _ip = nil

local p = 0

local list, ips = {}, {}

local players = getPlayersOnline()

for i, pid in ipairs(players) do

local ip = getPlayerIp(pid)

local tmp = table.find(ips, ip)

if(tmp ~= nil and (not _ip or _ip == ip)) then

if(table.countElements(list, ip) == 0) then

list[players[tmp]] = ip

end

list[pid] = ip

end

table.insert(ips, ip)

end

if(table.maxn(list) > 0) then

meip = getPlayerIp(cid)

mename = getCreatureName(cid)

for pid, ip in pairs(list) do

local metmp = table.find(ips, meip)

if (metmp ~= nil) then

p = p + 1

end

end

if (p <= 2) then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce tem ".. p .." chars Online!")

end

if (p > 2) then

doRemoveCreature(cid, mename)

end

else

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce tem ".. p+1 .." char Online!")

end

return true

end

[ if (p > 2) then ]

[ if (p <= 2) then ] ''''''/ Esses Números 2 é a quantidade de player que pode ser logado com o mesmo IP.

Só novo aque, intão vlew pelos topicos, pelos posts, agradeço mt, todos scripts são muito uteis pra min!

Abraçoss!

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo