Postado Maio 8, 2012 13 anos 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
Postado Maio 8, 2012 13 anos 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 Maio 8, 2012 13 anos por Yagami (veja o histórico de edições)
Postado Maio 8, 2012 13 anos Ele pega uma lista de ips e verifica com o ip atual. A lista do ip no caso, é os que estão conectados no servidor, fazendo a verificação pode-se ver se tem mais de 1 online com o mesmo ip.
Postado Agosto 17, 2012 12 anos 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.