Postado Agosto 13, 2015 9 anos Fala Povão alguem poderia me ajudar num script de !online porem mostra o reset eo level dos player online tipo: 21:19 TEST (350) [0]. versao 10.10
Postado Agosto 13, 2015 9 anos function onSay(cid, words, param, channel) local strings, i, position, added, showGamemasters = {""}, 1, 1, false, getBooleanFromString(getConfigValue('displayGamemastersWithOnlineCommand')) for _, pid in ipairs(getPlayersOnline()) 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 added = false if((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) .. "] [Resets =" .. getPlayerReset(pid) .. "]" i = i + 1 added = true end end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, (i - 1) .. " player" .. (i > 1 and "s" or "") .. " 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 Agosto 13, 2015 9 anos Autor FAIL ERRO AO USAR SCRIPT AMIGO! Em 13/08/2015 em 00:35, Animal Pak disse: function onSay(cid, words, param, channel) local strings, i, position, added, showGamemasters = {""}, 1, 1, false, getBooleanFromString(getConfigValue('displayGamemastersWithOnlineCommand')) for _, pid in ipairs(getPlayersOnline()) 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 added = false if((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) .. "] [Resets =" .. getPlayerReset(pid) .. "]" i = i + 1 added = true end end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, (i - 1) .. " player" .. (i > 1 and "s" or "") .. " 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 Editado Agosto 13, 2015 9 anos por Dennyz (veja o histórico de edições)
Postado Agosto 13, 2015 9 anos Autor Em 13/08/2015 em 00:46, Larissa Azhaurn disse: Que erro aparece? [Error - talkaction Interface] data/talkactions/scripts/online.lua:onSay description: data/talkactions/scripts/online.lua:16: attempt to call global 'getPlayerReset' < anil value> stack traceback: data/talkactions/scripts/online.lua:16: in function <data/talkactions/scripts/online.lua:1 Editado Agosto 13, 2015 9 anos por Dennyz (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.