Postado Janeiro 1, 2015 10 anos conte-nos como resolveu, alguém pode estar com a mesma dúvida ... STYLLER OT 2022
Postado Janeiro 1, 2015 10 anos Autor Solução conte-nos como resolveu, alguém pode estar com a mesma dúvida ... Lembrei que o Vodkart havia feito pra min, como meus tópicos foram apagados, não sei como... lembrei que tinha a solução em um bloco de notas no meu pen drive iuasdhuiashdiuai, ele fez uma função ai pra lib diferente: Não ponham apenas essa parte abaixo na lib 50 se estiver com problema parecido: function setFrags(cid) if not isCreature(cid) then return LUA_ERROR end setPlayerStorageValue(cid, 824544, getPlayerFrags(cid)) return doPlayerSave(cid) end Coloque assim \/ function getPlayerFrags(cid) local time = os.time() local times = {today = (time - 86400), week = (time - (7 * 86400))} local contents, result = {day = {}, week = {}, month = {}}, db.getResult("SELECT `pd`.`date`, `pd`.`level`, `p`.`name` FROM `player_killers` pk LEFT JOIN `killers` k ON `pk`.`kill_id` = `k`.`id` LEFT JOIN `player_deaths` pd ON `k`.`death_id` = `pd`.`id` LEFT JOIN `players` p ON `pd`.`player_id` = `p`.`id` WHERE `pk`.`player_id` = " .. getPlayerGUID(cid) .. " AND `k`.`unjustified` = 1 AND `pd`.`date` >= " .. (time - (30 * 86400)) .. " ORDER BY `pd`.`date` DESC") if(result:getID() ~= -1) then repeat local content = {date = result:getDataInt("date")} if(content.date > times.today) then table.insert(contents.day, content) elseif(content.date > times.week) then table.insert(contents.week, content) else table.insert(contents.month, content) end until not result:next() result:free() end local size = {day = table.maxn(contents.day),week = table.maxn(contents.week),month = table.maxn(contents.month)} return size.day + size.week + size.month end function setFrags(cid) if not isCreature(cid) then return LUA_ERROR end setPlayerStorageValue(cid, 824544, getPlayerFrags(cid)) return doPlayerSave(cid) end Editado Janeiro 1, 2015 10 anos por jNo (veja o histórico de edições) (1º) | [8.60] - Galaxy Server - Download (2º) | [8.60] - Glorious Server - Download (3º) | [8.60] - Epic Server - Download
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.