Ir para conteúdo
Banner com Efeitos

(Resolvido)Bloquear login se player tiver shareando account (IP diferente na mesma account)

Featured Replies

  • Respostas 19
  • Visualizações 1.9k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • local removeTime = 5 -- Segundos local removeMsg = "You're gonna be disconnected in "..removeTime.." seconds for sharring the account." function onLogin(cid) for _, pid in pairs(getPlayersByAccountI

  • Testa ai. function onLogin(cid) for _, pid in pairs(getPlayersByAccountId(getPlayerAccountId(cid))) do if getPlayerIp(cid) ~= getPlayerIp(pid) then return false end end return true end

  • Testa ai. local removeTime = 5 -- Segundos local removeMsg = "You're gonna be disconnected in "..removeTime.." seconds for sharring the account." function onLogin(cid) if getCreatureName(cid):lo

Postado
7 horas atrás, Way20 disse:

 


local removeTime = 5 -- Segundos
local removeMsg = "You're gonna be disconnected in "..removeTime.." seconds for sharring the account."

function onLogin(cid)
	for _, pid in pairs(getPlayersByAccountId(getPlayerAccountId(cid))) do
		if getPlayerIp(cid) ~= getPlayerIp(pid) then
			doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, removeMsg)
			addEvent(function()
				doSendMagicEffect(getThingPos(cid), CONST_ME_POFF)
				doRemoveCreature(cid)
			end, removeTime*1000)
			break
		end
	end
	return true
end

 

 

caralho, tu é genial.

Postado
  • Solução
7 minutos atrás, poko360 disse:

@Way20  opa way, eu percebi um pequeno bugzinho, os account managers so podem fazer a conta 1 pessoa por vez, tem como tipo colocar pra "ignorar" o script pros acc manager? grato

 

Testa ai.

local removeTime = 5 -- Segundos
local removeMsg = "You're gonna be disconnected in "..removeTime.." seconds for sharring the account."

function onLogin(cid)
	if getCreatureName(cid):lower() ~= "account manager" then
		for _, pid in pairs(getPlayersByAccountId(getPlayerAccountId(cid))) do
			if getPlayerIp(cid) ~= getPlayerIp(pid) then
				doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, removeMsg)
				addEvent(function()
					doSendMagicEffect(getThingPos(cid), CONST_ME_POFF)
					doRemoveCreature(cid)
				end, removeTime*1000)
				break
			end
		end
	end
	return true
end

 

 

 

 

Nós somos aquilo que fazemos repetidamente. Excelência, não é um modo de agir, mas um hábito.

                                                                                                                                                                                                                                        Aristóteles 

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.7k

Informação Importante

Confirmação de Termo