Postado Junho 16, 2014 10 anos Vai na pasta: data/talkactions/scripts copie um arquivo e renomeie para: deathlist1.lua e cole: limit = 5 function onSay(cid, words, param, channel) str = "" if param == "" then local qry = db.getResult("SELECT `player_id`, `date`, `level`, `killer_name` FROM `death_list` ORDER BY `date` DESC LIMIT 0, " .. limit) if(qry:getID() ~= -1) then repeat str = str .."\n "..os.date("%d %B %Y %X ", qry:getDataInt("date")).." "..getPlayerNameByGUID(qry:getDataString("player_id")).." died at level "..qry:getDataInt("level").." by:\n"..qry:getDataString("killer_name") until not(qry:next()) qry:free() else str = "Não há mortes no servidor." end doPlayerPopupFYI(cid, "Last Deaths:\n\n" .. str) return true end local deaths = db.getResult("SELECT `player_id`, `date`, `level`, `killer_name` FROM `death_list` ORDER BY `date` DESC LIMIT 0, " .. limit)if(getPlayer:getID() == -1) then doPlayerSendCancel(cid, "Este Player não existe.") return true end local getGuid = getPlayer:getDataInt("id") getPlayer:free() local qry = db.getResult("SELECT `id`, `date`, `level`, `killer_name` FROM `death_list` WHERE `player_id` = " .. getGuid .." ORDER BY `date` DESC LIMIT 0, " .. limit) if(qry:getID() ~= -1) then repeat str = str .."\n "..os.date("%d %B %Y %X ", qry:getDataInt("date")).." died at level "..qry:getDataInt("level").." by:\n"..qry:getDataString("killer_name") until not(qry:next()) qry:free() else str = "Não há mortes." end doPlayerPopupFYI(cid, "Last Deaths of: " .. param .. ".\n\n" .. str) return true end Vai na pasta: data/talkactions e abre talkactions.xml e cole em player ou em outro lugar, eu coloquei em players. cole isso: <talkaction words="!deathlist" script="deathlist.lua"/> Em limit = 5 logo no começo do script é o limite de quantas mortes irao aparecer dos ultimos player que morreu. Comando !deathlist Editado Junho 16, 2014 10 anos por Frajolaa (veja o histórico de edições)
Postado Junho 16, 2014 10 anos Muito bom amigo, obrigado por compartilhar ... reputado! STYLLER OT 2022
Postado Julho 7, 2014 10 anos esse conteúdo está incompleto, faltou a query para executar na db... já tem esse sistema do novo deathList no fórum tbm :3 [*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*] DISCORD: vodkart#6090
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.