Ir para conteúdo

Featured Replies

Postado
  • Autor

Tenta aí:

function onDeath(cid, corpse, deathList)

	if not isPlayer(cid) then
		return true
	end
	
	local killer = deathList[1]
	
	if isMonster(killer) then
	doBroadcastMessage(getCreatureName(cid).." ["..getPlayerLevel(cid).."] foi morto pelo monstro "..getCreatureName(killer).."." , MESSAGE_STATUS_CONSOLE_RED)
    elseif isPlayer(killer) then
	doBroadcastMessage(getCreatureName(cid).." ["..getPlayerLevel(cid).."] foi morto por "..getCreatureName(killer)..".", MESSAGE_STATUS_CONSOLE_RED)
	end
return true
end        

Registra no login...

Testado:

 

16:59 Caronte [38] foi morto pelo monstro Fire Elemental.

 

 

 

Ou:

function onDeath(cid, corpse, deathList)
 
	if not isPlayer(cid) then
		return true
	end
	
	local killer = deathList[1]
	
	if isMonster(killer) then
	doBroadcastMessage(getCreatureName(cid).." [Level: "..getPlayerLevel(cid).."] foi morto pelo monstro "..getCreatureName(killer).."." , MESSAGE_STATUS_CONSOLE_RED)
    elseif isPlayer(killer) then
	doBroadcastMessage(getCreatureName(cid).." [Level: "..getPlayerLevel(cid).."] foi morto por "..getCreatureName(killer)..".", MESSAGE_STATUS_CONSOLE_RED)
	end
return true
end 

16:59 Caronte [Level: 38] foi morto pelo monstro Fire Elemental.

Ae deu certo, obrigado cara, voce é foda, namoral ! :D

  • Respostas 9
  • Visualizações 715
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • Tenta aí: function onDeath(cid, corpse, deathList) if not isPlayer(cid) then return true end local killer = deathList[1] if isMonster(killer) then doBroadcastMessage(getCreatureName(cid)

  • Eu não coloquei porque você não pediu antes '-',  fiz exatamente como você pediu, em duas versões.     Eu ajudaria, só que fiquei sem net por quase o dia todo. mas o ziptoid já ajudou

Postado
  • Solução

^

function onDeath(cid, corpse, deathList)
    if not isPlayer(cid) then
        return true
    end
    local killer = deathList[1] 
    if isMonster(killer) then
        doBroadcastMessage(getCreatureName(cid).." [Level: "..getPlayerLevel(cid).."] foi morto pelo monstro "..getCreatureName(killer).."." , MESSAGE_STATUS_CONSOLE_RED)
    elseif isPlayer(killer) then
        doBroadcastMessage(getCreatureName(cid).." [Level: "..getPlayerLevel(cid).."] foi morto por "..getCreatureName(killer).." [Level: "..getPlayerLevel(killer).."].", MESSAGE_STATUS_CONSOLE_RED)
    end
    return true
end

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

Postado

quando morre pra player apareçe o level do cara que morreu mas nao apareçe o level do cara que matou me ajudar arrumar isso pf? 

 

Eu não coloquei porque você não pediu antes '-',  fiz exatamente como você pediu, em duas versões.

 

 

Eu ajudaria, só que fiquei sem net por quase o dia todo.

mas o ziptoid já ajudou :D

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