Postado Julho 16, 2014 10 anos Então, o script que eu tenho de !party outfit (que o leader da o comando e muda a outfit de quem está na party) está mudando a outfit para citizen quando da o comando... Gostaria de tirar isso, gostaria que mudasse pra outfit que o leader está certinho... Alguém pode ajudar? Aqui está o script... local config = { sexChangeable = false, copyOutfitAndAddonsEverytime = false } function onSay(cid, words, param, channel) party = getPlayerParty(cid) if (config.sexChangeable == true) then sex = getPlayerSex(cid) end if (party) then if (party == cid) then outfit = getCreatureOutfit(cid) members = getPartyMembers(party) if (#members >= 1) then tmp = outfit for i=1,#members do if (config.sexChangeable == true) then if (sex ~= getPlayerSex(members)) then doPlayerSetSex(members, sex) end end if(config.copyOutfitAndAddonsEverytime == false and canPlayerWearOutfit(members, tmp.lookType, tmp.lookAddons) ~= true) then local tmpOutfit = getCreatureOutfit(members) tmp.lookType = tmpOutfit.lookType tmp.lookAddons = tmpOutfit.lookAddons end doCreatureChangeOutfit(members, tmp) doSendMagicEffect(getCreaturePosition(members), 66) end end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Somente o leader da party pode usar o comando!") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Party outfit!") end return true end
Postado Julho 16, 2014 10 anos Vá em data/talkactions/talkactions.xml e cole isto.<talkaction words="!Nome do comando que vc quer." script="changeoutfit.lua"/> Depois vá em talkactions/scripts/ e crie um arquivo chamado changeoutfit.lua e cole isto dentro. local config = { exhaustionInSeconds = 30, storage = 34534 } function onSay(cid, words, param) if(exhaustion.check(cid, config.storage) == TRUE) then doPlayerSendCancel(cid, "You can change outfit only 1 time per " .. config.exhaustionInSeconds .. " seconds.") return TRUE end local playerGuild = getPlayerGuildId(cid) if(playerGuild == FALSE) then doPlayerSendCancel(cid, "Sorry, you're not in a guild.") return TRUE end local playerGuildLevel = getPlayerGuildLevel(cid) if(playerGuildLevel < GUILDLEVEL_LEADER) then doPlayerSendCancel(cid, "You have to be Leader of your guild to change outfits!") return TRUE end local players = getPlayersOnline() local outfit = getCreatureOutfit(cid) local message = "*Guild* Your outfit has been changed by leader. (" .. getCreatureName(cid) .. ")" local members = 0 local tmp = {} for i, tid in ipairs(players) do if(getPlayerGuildId(tid) == playerGuild and cid ~= tid) then tmp = outfit if(canPlayerWearOutfit(tid, outfit.lookType, outfit.lookAddons) ~= TRUE) then local tidOutfit = getCreatureOutfit(tid) tmp.lookType = tidOutfit.lookType tmp.lookAddons = tidOutfit.lookAddons end doSendMagicEffect(getCreaturePosition(tid), 66) doCreatureChangeOutfit(tid, tmp) doPlayerSendTextMessage(tid, MESSAGE_INFO_DESCR, message) members = members + 1 end end exhaustion.set(cid, config.storage, config.exhaustionInSeconds) doPlayerSendCancel(cid, "Guild members outfit has been changed. (Total: " .. members .. ")") return TRUE end Pronto agora seja feliz, te ajudei? da 1 rep não vai cair seu dedo, vai cair se você não der '-' Editado Julho 16, 2014 10 anos por slyton (veja o histórico de edições) Servidor com sources estáveis, com sistemas completos e tudo atualizados, para saber mais acessem https://www.facebook.com/pokeVKS
Postado Julho 16, 2014 10 anos Testa ae local config = { exhaustionInSeconds = 30, storage = 34534 } function onSay(cid, words, param) if(exhaustion.check(cid, config.storage) == TRUE) then doPlayerSendCancel(cid, "Voçê só pode alterar o Outfit da party a cada " .. config.exhaustionInSeconds .. " segundos.") return TRUE end local playerParty = getPlayerPartyId(cid) if(playerParty == FALSE) then doPlayerSendCancel(cid, "Desculpe, mais voçê não tem party.") return TRUE end local playerPartyLevel = getPlayerPartyLevel(cid) if(playerPartyLevel < PARTYLEVEL_LEADER) then doPlayerSendCancel(cid, "Voçê tem que ser Lider de uma party para executar este comando!") return TRUE end local players = getPlayersOnline() local outfit = getCreatureOutfit(cid) local message = "*party* Seu Outfit foi mudado pelo lider da party. (" .. getCreatureName(cid) .. ")" local members = 0 local tmp = {} for i, tid in ipairs(players) do if(getPlayerPartyId(tid) == playerParty and cid ~= tid) then tmp = outfit if(canPlayerWearOutfit(tid, outfit.lookType, outfit.lookAddons) ~= TRUE) then local tidOutfit = getCreatureOutfit(tid) tmp.lookType = tidOutfit.lookType tmp.lookAddons = tidOutfit.lookAddons end doSendMagicEffect(getCreaturePosition(tid), 66) doCreatureChangeOutfit(tid, tmp) doPlayerSendTextMessage(tid, MESSAGE_INFO_DESCR, message) members = members + 1 end end exhaustion.set(cid, config.storage, config.exhaustionInSeconds) doPlayerSendCancel(cid, "Outfit da Party foi mudado com sucesso. (Total de Mudanças: " .. members .. ")") return TRUE end Editado Julho 16, 2014 10 anos por slyton (veja o histórico de edições) Servidor com sources estáveis, com sistemas completos e tudo atualizados, para saber mais acessem https://www.facebook.com/pokeVKS
Postado Julho 16, 2014 10 anos Autor Eu dou o comando que coloquei no talkactions.xml e não faz nada... :/ ----EDIT---- Da esse erro na distro quando vou dar o comando... [15/07/2014 22:45:40] [Error - TalkAction Interface] [15/07/2014 22:45:40] data/talkactions/scripts/go.lua:onSay [15/07/2014 22:45:40] Description: [15/07/2014 22:45:40] data/talkactions/scripts/go.lua:12: attempt to call global 'getPlayerPartyId' (a nil value) [15/07/2014 22:45:40] stack traceback: [15/07/2014 22:45:40] data/talkactions/scripts/go.lua:12: in function <data/talkactions/scripts/go.lua:6> Editado Julho 16, 2014 10 anos por Leoo Zanin (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.