Postado Maio 1, 2015 10 anos Parabéns!! Muito obrigado, a Storage estava 1020. Coloquei 500 e funcionou 100%. Agora pra ficar legal... Falta um Rank reset, e !online mostrando reset! Agradeço! Ficou TOP!
Postado Maio 1, 2015 10 anos online.lua (tfs 1.1) function onSay(player, words, param) local function getPlayerResets() local resets = player:getStorageValue(500) return resets < 0 and 0 or resets end local hasAccess = player:getGroup():getAccess() local players = Game.getPlayers() local playerCount = Game.getPlayerCount() player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, playerCount .. " players online.") local i = 0 local msg = "" for k, tmpPlayer in ipairs(players) do if hasAccess or not tmpPlayer:isInGhostMode() then if i > 0 then msg = msg .. ", " end msg = msg .. tmpPlayer:getName() .. " (" .. tmpPlayer:getLevel() .. ") [Resets: " .. getPlayerResets() .. "]" i = i + 1 end if i == 10 then if k == playerCount then msg = msg .. "." else msg = msg .. "," end player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, msg) msg = "" i = 0 end end if i > 0 then msg = msg .. "." player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, msg) end return false end
Postado Maio 2, 2015 10 anos Erro : Lua Script Error: [TalkAction Interface] data/talkactions/Script/Online:onsay data/talkactions/script/online:7: attempt to index local 'player' <a number valuve> stack traceback: [C]: in function '__index' data/talkactions/script/online:7: in function <data/talkactions/script/online.lua>
Postado Maio 2, 2015 10 anos function onSay(cid, words, param) local player = Player(cid) local function getPlayerResets() local resets = player:getStorageValue(500) return resets < 0 and 0 or resets end local hasAccess = player:getGroup():getAccess() local players = Game.getPlayers() local playerCount = Game.getPlayerCount() player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, playerCount .. " players online.") local i = 0 local msg = "" for k, tmpPlayer in ipairs(players) do if hasAccess or not tmpPlayer:isInGhostMode() then if i > 0 then msg = msg .. ", " end msg = msg .. tmpPlayer:getName() .. " (" .. tmpPlayer:getLevel() .. ") [Resets: " .. getPlayerResets() .. "]" i = i + 1 end if i == 10 then if k == playerCount then msg = msg .. "." else msg = msg .. "," end player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, msg) msg = "" i = 0 end end if i > 0 then msg = msg .. "." player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, msg) end return false end
Postado Maio 2, 2015 10 anos Mostra mais da apenas um problema : !online do Player Killer : 18:29 2 players online. 18:29 Killer (208) [Resets: 2], {ADM} Master Viciado (8) [Resets: 2]. !online do {ADM} : 18:29 2 players online. 18:29 Killer (208) [Resets: 20], {ADM} Master Viciado (8) [Resets: 20]. EDIT* Killer tem 2 resets, {ADM} tem 20** Editado Maio 2, 2015 10 anos por Marjer (veja o histórico de edições)
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.