Ir para conteúdo

Featured Replies

Postado
  • Autor

 

Vai no onlogin.lua e coloca isso junto dos outros:

registerCreatureEvent(cid, "FragReward")

Valeeeeu caraa! Não to acreditando que deu certo!!! :HAHAHA:  Toma outro rep (y) 

Mas ae, tem como coloca pro player que matar outro do mesmo ip não ganhar nada?

  • Respostas 18
  • Visualizações 6k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • Vai no onlogin.lua e coloca isso junto dos outros: registerCreatureEvent(cid, "FragReward")

  • local config = { --{exp, item, quantidade} {500000, 2152, 50}, -- menor {1000000, 2160, 1}, -- mesmo {2000000, 2160, 2}, -- maior } function onKill(cid, target) if isPlayer(cid) and isPlayer(targ

  • Você registrou no onlogin?

Postado
  • Solução
local config = {
--{exp, item, quantidade}
	{500000, 2152, 50}, -- menor
	{1000000, 2160, 1}, -- mesmo
	{2000000, 2160, 2}, -- maior
}

function onKill(cid, target)
	if isPlayer(cid) and isPlayer(target) then
		if getPlayerIp(cid) == getPlayerIp(target) then return true end
		if getPlayerLevel(target) < getPlayerLevel(cid) then
			doPlayerAddItem(cid, config[1][2], config[1][3])
			doPlayerAddExp(cid, config[1][1])
			
		elseif getPlayerLevel(target) == getPlayerLevel(cid) then
			doPlayerAddItem(cid, config[2][2], config[2][3])
			doPlayerAddExp(cid, config[2][1])
			
		elseif getPlayerLevel(target) > getPlayerLevel(cid) then
			doPlayerAddItem(cid, config[3][2], config[3][3])
			doPlayerAddExp(cid, config[3][1])
		end
	end
	return true
end
Postado
  • Autor
local config = {
--{exp, item, quantidade}
	{500000, 2152, 50}, -- menor
	{1000000, 2160, 1}, -- mesmo
	{2000000, 2160, 2}, -- maior
}

function onKill(cid, target)
	if isPlayer(cid) and isPlayer(target) then
		if getPlayerIp(cid) == getPlayerIp(target) then return true end
		if getPlayerLevel(target) < getPlayerLevel(cid) then
			doPlayerAddItem(cid, config[1][2], config[1][3])
			doPlayerAddExp(cid, config[1][1])
			
		elseif getPlayerLevel(target) == getPlayerLevel(cid) then
			doPlayerAddItem(cid, config[2][2], config[2][3])
			doPlayerAddExp(cid, config[2][1])
			
		elseif getPlayerLevel(target) > getPlayerLevel(cid) then
			doPlayerAddItem(cid, config[3][2], config[3][3])
			doPlayerAddExp(cid, config[3][1])
		end
	end
	return true
end

Valeeu cara! Deu certinho.

Obrigado por ter ajudado!

  • 8 months later...
Postado
local config = {
--{exp, item, quantidade}
	{500000, 2152, 50}, -- menor
	{1000000, 2160, 1}, -- mesmo
	{2000000, 2160, 2}, -- maior
}

function onKill(cid, target)
	if isPlayer(cid) and isPlayer(target) then
		if getPlayerLevel(target) < getPlayerLevel(cid) then
			doPlayerAddItem(cid, config[1][2], config[1][3])
			doPlayerAddExp(cid, config[1][1])
			
		elseif getPlayerLevel(target) == getPlayerLevel(cid) then
			doPlayerAddItem(cid, config[2][2], config[2][3])
			doPlayerAddExp(cid, config[2][1])
			
		elseif getPlayerLevel(target) > getPlayerLevel(cid) then
			doPlayerAddItem(cid, config[3][2], config[3][3])
			doPlayerAddExp(cid, config[3][1])
		end
	end
	return true
end

mano explica em que local devo colar isto por favor :P obrigado

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