Pesquisar na Comunidade
Mostrando resultados para as tags ''players online''.
Encontrado 1 registro
-
talkaction Talkaction !online Informações em excesso... Como reduzir?
uma questão postou je19921992 Scripts
Olá. Tomara que eu tenha postado em area correta porque sinceramente não sei. Mas vamos lá. Minha talkaction online.lua informa: Quantidade de players online, nome de players online, level de players online. Obs: Na (s) ultima (s) linha (s), estão escalados os jogadores que acabaram de entrar. Oque eu quero pedir? Vejamos: Por enquanto, informar o numero de jogadores online, e só. Já tentei retirar algumas strings, mas o que aconteceu foi que quando o jogador usa !online, aparece um monte de linha se tiver muitos jogadores, linhas em branco e se estiver acima de 150 jogadores, a pessoa que quizer saber quantos online tem, deve então tem que subir muito na aba. Para facilitar quero apenas o numero de jogadores online e na(s) linha(s) de baixo, os 10 ultimos jogadores que acabaram de entrar. Não sei nem cmo funciona meu script, mas eh padrão. N sei como ele consegue informar quem acabou de fazer login. Segue scripts: 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) .. " [" .. getPlayerLevel(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- 10 respostas
-
- !online
- online.lua
- (e 2 mais)
