Ir para conteúdo
  • 0

fawkz12

Pergunta

Duvida: Meu Anti MC não funfa... CONSIGO abrir 2 clientes ao mesmo tempo :/

 

Ajuda: Como colocar para apenas poder abrir 1 cliente?

 

SCRIPT do ANTI MC

--[[ Anti Multi-Client System
 Modify but preserve credits
 Developed by Notorious
]]--


 local config = {
  msg = "Notorious Anti-MC System has detected that you are multi clienting.",
  maxMultiClients = 2,
  allowGroupId = 2,
  ignoreIps = {"ip1", "ip2"}
 }


function onLogin(cid)


    if getPlayerGroupId(cid) >= config.allowGroupId then
     return TRUE
    end


 local number
 local playersOnline = getPlayersOnline()


    for _, pid in pairs(playersOnline) do
     local pip = getPlayerIp(pid)
        if cid ~= pid and getPlayerIp(cid) == pip and not isInArray(config.ignoreIps, doConvertIntegerToIp(getPlayerIp(cid))) then
         number = (number or 0) + 1
            if number > config.maxMultiClients then
             return FALSE, doPlayerPopupFYI(cid, config.msg)
            end
        end
    end


return TRUE
end
Link para o comentário
Compartilhar em outros sites

5 respostass a esta questão

Posts Recomendados

  • 1
  • Diretor

Se não for só para Account Manager

 

Tente este aqui, funciona normal:

local config = {
max = 1, -- Número de players permitido com o mesmo IP.
group_id = 1 -- Kikar apenas player com o group id 1.
}

local accepted_ip_list = {} -- Lista dos players permitidos a usar MC, exemplo: {"200.85.3.60", "201.36.5.222"}

local function antiMC(p)
if #getPlayersByIp(getPlayerIp(p.pid)) >= p.max then
doRemoveCreature(p.pid)
end
return true
end

function onLogin(cid)
if getPlayerGroupId(cid) <= config.group_id then
if isInArray(accepted_ip_list,doConvertIntegerToIp(getPlayerIp(cid))) == false then
addEvent(antiMC, 1000, {pid = cid, max = config.max+1})
end
end
return true
end
<event type="login" name="AntiMC" event="script" value="antimc.lua"/>
Editado por nedroesdoksdja
Link para o comentário
Compartilhar em outros sites

  • 0

tente esse:

 

 

 

 

function onLogin(cid)
local limit,days = 2,360
function CheckMcManager(cid)
local count,on = 0,getPlayersOnline()
if #on > 0 then
for i = 1, #on do
if getCreatureName(on[i]) == "Account Manager" and getPlayerIp(on[i]) == getPlayerIp(cid) then
count = count + 1
end
end
if count > limit then
doAddIpBanishment(getPlayerIp(cid), days * 24 * 60 * 60)
doRemoveCreature(cid)
end
end
return true
end
addEvent(CheckMcManager, 1000, cid)
return true
end

 

<event type="login" name="AntiMbCrash" event="script" value="antimbcrash.lua"/>

Para configurar é fácil, na segunda linha do script está assim:
local limit,days = 2,360
2 = número máximo de Account Manager.
360 = número de dias que o IP ficará banido.

 

Editado por kaleudd
Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...