Postado Julho 14, 2014 10 anos Solução não não pessoal, vocês não entenderam .... Eu não quero que apareça nenhum nome do player e level, quero só a quantidade de player online em numero .... e que eu possa escrever um texto depois disso. aata então tenta assim Editado~~ eu testei no meu, vc vai fazer o seguinte. va na pasta, data/talkactions/scripts, dai olha la se tem uma pasta, "players" e outra "gamemaster", ou algo assim, entra na pasta players e acha "online.lua" e substitui por esse script abaixo. (caminho ~~ data/talkactions/scripts/players/online.lua Se por acaso não tiver a pasta players, procure direto no data/talkactions/script/online.lua (aqui vai ter um arquivo desses de qualquer maneira,mas vc deve editar o da pasta players, só edite esse se no seu não tiver a pasta players) ali function onSay(cid, words, param) local player = Player(cid) local hasAccess = player:getGroup():getAccess() local players = Game.getPlayers() local playerCount = Game.getPlayerCount() player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, playerCount .. " players online.") end caso não de certo, entre na pasta do seu servidor aperte "ctrl+f" e digite "online.lua" dai me diga quais pastas e os locais que aparece, se preferir pode tirar uma print haha Editado Julho 15, 2014 10 anos por Saintsbr (veja o histórico de edições)
Postado Julho 17, 2014 10 anos que bom poder ajudar o meu online.lua está assim, poderia deixar para quando fala !online aparece level e os nome do players? online.lua local config = { showGamemasters = getBooleanFromString(getConfigValue('displayGamemastersWithOnlineCommand')) } function onSay(cid, words, param, channel) local players = getPlayersOnline() local strings = {""} local i, position = 1, 1 local added = false for _, pid in ipairs(players) do if(added) then if(i > (position * 7)) then strings[position] = strings[position] .. "," position = position + 1 strings[position] = "" else strings[position] = i == 1 and "" or strings[position] .. ", " end end if((config.showGamemasters or getPlayerCustomFlagValue(cid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES) or not getPlayerCustomFlagValue(pid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES)) and (not isPlayerGhost(pid) or getPlayerGhostAccess(cid) >= getPlayerGhostAccess(pid))) then strings[position] = strings[position] .. getCreatureName(pid) .. "" i = i + 1 added = true else added = false end end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, (i - 1) .. " player(s) online:") for i, str in ipairs(strings) do if(str:sub(str:len()) ~= ",") then str = str .. "." end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, str) end return true end
Postado Julho 17, 2014 10 anos @, tente trocar essas duas linhas: if((config.showGamemasters or getPlayerCustomFlagValue(cid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES) or not getPlayerCustomFlagValue(pid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES)) and (not isPlayerGhost(pid) or getPlayerGhostAccess(cid) >= getPlayerGhostAccess(pid))) then strings[position] = strings[position] .. getCreatureName(pid) .. "" Por essas: if((config.showGamemasters or getPlayerCustomFlagValue(cid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES) or not getPlayerCustomFlagValue(pid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES)) and (not isPlayerGhost(pid) or getPlayerGhostAccess(cid) >= getPlayerGhostAccess(pid))) then strings[position] = strings[position] .. getCreatureName(pid) .. " [" .. getPlayerLevel(pid) .. "]"
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.