Postado Setembro 19, 2017 7 anos 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 Setembro 19, 2017 7 anos por Dwarfer (veja o histórico de edições)
Postado Setembro 20, 2017 7 anos 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.