Postado Julho 18, 2017 7 anos Daee galera, alguem pode me ajudar com o script de TFS 1.x para o talkactions !online... Eu gostaria que ao dado o comando !online, desse para ver quantos estão online e que mostra-se todos os nomes! Desde já Obrigado
Postado Julho 18, 2017 7 anos Testa esse Spoiler 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_FIRST, (i - 1) .. " Player(s) Online:") for i, str in ipairs(strings) do if(str:sub(str:len()) ~= ",") then str = str .. "." end doPlayerSendTextMessage(cid, MESSAGE_FIRST, "--> "..str.."") end return true end Spoiler <talkaction words="/online" hide="yes" access="5" event="script" value="online.lua"/> Meu facebook Spoiler https://www.facebook.com/csbjgames1 Meu Projeto Spoiler https://www.facebook.com/otpMysterious/?fref=ts Meu Skype Spoiler brendo.dmg.yago Meu Servidor Online: Spoiler Em Construção
Postado Julho 18, 2017 7 anos Autor Lua Script Error: [Test Interface] data/talkactions/scripts/online.lua data/talkactions/scripts/online.lua:2: attempt to call global 'getConfigValue' (a nil value) stack traceback: [C]: in function 'getConfigValue' data/talkactions/scripts/online.lua:2: in main chunk [C]: in function 'reload' data/talkactions/scripts/reload.lua:73: in function [Warning - Event::checkScript] Can not load script: scripts/online.lua data/talkactions/scripts/online.lua:1: syntax error near 'onSay'
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.