Ir para conteúdo
  • Cadastre-se

(Resolvido)[Resolvido] Script online.lua Modificado


Ir para solução Resolvido por Saintsbr,

Posts Recomendados

  • 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 por Saintsbr (veja o histórico de edições)
Link para o post
Compartilhar em outros sites
  • Respostas 10
  • Created
  • Última resposta

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

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 edit

tenta isso coloca no online.lua 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.") 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 ..

isso mesmo, resolveu minha questão ;)

Malblofor REP+

tk-melhor.png

Citar

[ADMINISTRAÇÃO DE SERVIDORES]

Link para o post
Compartilhar em outros sites

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

Link para o post
Compartilhar em outros sites

@, 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) .. "]"
Link para o post
Compartilhar em outros sites

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.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

  • Estatísticas dos Fóruns

    96844
    Tópicos
    519597
    Posts



×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo