Ir para conteúdo

Featured Replies

Postado
  • Solução

@jNo

 

Em creaturescripts/scripts:

 

deathchannel.lua

 

Spoiler

function onDeath(cid, corpse, deathList)
    if not isPlayer(cid) then return true end
    local killers, i = "", 1
    for _, v in pairs(deathList) do
        killers = killers .. getCreatureName(v) .. (i == #deathList and "" or ", ")
        i = i + 1
    end
    local msg = "Player " .. getPlayerName(cid) .. "["..getPlayerLevel(cid).."] was killed by " .. killers
    for _, pid in ipairs(getPlayersOnline()) do
        doPlayerSendChannelMessage(pid, "Death Channel:", msg, TALKTYPE_CHANNEL_R1, 10)
    end
return true
end

 

 

Registre no login.lua: registerCreatureEvent(cid, "DeathChannel")

 

Adicione a tag no creaturescripts.xml: <event type="death" name="DeathChannel" event="script" value="deathchannel.lua"/>

 

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

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

Top Posters In This Topic

Most Popular Posts

  • @jNo   Em creaturescripts/scripts:   deathchannel.lua     Registre no login.lua: registerCreatureEvent(cid, "DeathChannel")   Adicione a tag no creatures

Postado
  • Autor
4 horas atrás, Dwarfer disse:

@jNo

 

Em creaturescripts/scripts:

 

deathchannel.lua

 

  Mostrar conteúdo oculto


function onDeath(cid, corpse, deathList)
    if not isPlayer(cid) then return true end
    local killers, i = "", 1
    for _, v in pairs(deathList) do
        killers = killers .. getCreatureName(v) .. (i == #deathList and "" or ", ")
        i = i + 1
    end
    local msg = "Player " .. getPlayerName(cid) .. "["..getPlayerLevel(cid).."] was killed by " .. killers
    for _, pid in ipairs(getPlayersOnline()) do
        doPlayerSendChannelMessage(pid, "Death Channel:", msg, TALKTYPE_CHANNEL_R1, 10)
    end
return true
end

 

 

Registre no login.lua: registerCreatureEvent(cid, "DeathChannel")

 

Adicione a tag no creaturescripts.xml: <event type="death" name="DeathChannel" event="script" value="deathchannel.lua"/>

 

 

 

vlw jow perfect

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