Postado Julho 4, 2016 8 anos seguinte, o sistema não funciona em tutores, tipo, quando eles viram o TOP Level e depois relogam, o efeito não funfa mais, e tbm o sistema funciona em GM, CM e ADM, e ai fica ruim, alguém pode me ajudar?
Postado Julho 7, 2016 8 anos local config = { tempo = 5, --tempo em segundos mensagem = { texto = "[TOP]", --não use mais de 9 caracteres efeito = TEXTCOLOR_LIGHTBLUE --efeito para a função doSendAnimatedText }, efeito = 30, --efeito da função doSendMagicEffect globalstr = 150202 -- uma global storage qualquer q esteje vazia } function TopEffect(cid) local var = tostring(getGlobalStorageValue(config.globalstr)):gsub(':', ''):explode(',') if not isCreature(cid) or getPlayerName(cid) ~= var[1] then return LUA_ERROR end doSendAnimatedText(getCreaturePosition(cid), config.mensagem.texto, config.mensagem.efeito) doSendMagicEffect(getCreaturePosition(cid), config.efeito) addEvent(TopEffect, config.tempo*1000, cid) end function onLogin(cid) if tonumber(getGlobalStorageValue(config.globalstr)) then -- virgin local query = db.getResult("SELECT `name`, `level` FROM `players` WHERE `group_id` < 2 ORDER BY `level` DESC LIMIT 1") if (query:getID() ~= -1) then setGlobalStorageValue(config.globalstr, ":"..query:getDataString("name")..",:"..query:getDataInt("level")) TopEffect(cid) end else TopEffect(cid) end registerCreatureEvent(cid, "CheckTop") return true end function onAdvance(cid, skill, oldLevel, newLevel) if skill ~= SKILL__LEVEL then return true end local var = tostring(getGlobalStorageValue(config.globalstr)):gsub(':', ''):explode(',') if newLevel > tonumber(var[2]) and getPlayerName(cid) ~= var[1] then doBroadcastMessage("O jogador " .. getPlayerName(cid) .. " tornou-se o novo Top Level. Parabens!", 22) setGlobalStorageValue(config.globalstr, ":"..getPlayerName(cid)..",:"..newLevel) TopEffect(cid) end return true end [*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*] DISCORD: vodkart#6090
Postado Fevereiro 9, 2017 8 anos desculpe reviver o topco fiz tudo certo mas n aparece o TOP encima do top e também n gera nenhum erro uso stf 3.6 pokemon cyan
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.