Postado Junho 14, 2018 7 anos TFS 0.4 8.6 Exemplo ADM usa o comando !adm on é se ele estiver com outfit citizen ficar mudando de cores ! é pra desligar o comando !adm off comando apenas para group id 6 .... 758x426.bmp
Postado Junho 14, 2018 7 anos 2 horas atrás, ADM Mayk on BaiakME disse: TFS 0.4 8.6 Exemplo ADM usa o comando !adm on é se ele estiver com outfit citizen ficar mudando de cores ! é pra desligar o comando !adm off comando apenas para group id 6 .... Em talkactions, crie um arquivo chamado rainbow.lua e poem isso dentro. Spoiler local colors = {94, 81, 79, 88, 18, 11, 92, 128} local storage = 65535 local time = 10 --in miliseconds function onSay(cid, words, param, channel) if(param == "on") then if getPlayerStorageValue(cid, storage) < 1 then if doPlayerRemoveMoney(cid, 0) == TRUE then local event = addEvent(changeOutfit, time, cid) setPlayerStorageValue(cid, storage, 1) return TRUE else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You do not have enough money.") return TRUE end else return TRUE end elseif(param == "off") then if getPlayerStorageValue(cid, storage) > 0 then setPlayerStorageValue(cid, storage, 0) return TRUE else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You do not have rainbow outfit on.") return TRUE end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Use !rainbow on-off.") return TRUE end return TRUE end function changeOutfit(cid) local randomHead = colors[math.random(#colors)] local randomLegs = colors[math.random(#colors)] local randomBody = colors[math.random(#colors)] local randomFeet = colors[math.random(#colors)] local tmp = {} if getPlayerStorageValue(cid, storage) > 0 then local outfit = getCreatureOutfit(cid) tmp = outfit tmp.lookType = outfit.lookType tmp.lookHead = randomHead tmp.lookLegs = randomLegs tmp.lookBody = randomBody tmp.lookFeet = randomFeet tmp.lookAddons = outfit.lookAddons doCreatureChangeOutfit(cid, tmp) local event = addEvent(repeatChangeOutfit, time, cid) return TRUE else stopEvent(event) return TRUE end end function repeatChangeOutfit(cid) local randomHead = colors[math.random(#colors)] local randomLegs = colors[math.random(#colors)] local randomBody = colors[math.random(#colors)] local randomFeet = colors[math.random(#colors)] local tmp = {} if getPlayerStorageValue(cid, storage) > 0 then local outfit = getCreatureOutfit(cid) tmp = outfit tmp.lookType = outfit.lookType tmp.lookHead = randomHead tmp.lookLegs = randomLegs tmp.lookBody = randomBody tmp.lookFeet = randomFeet tmp.lookAddons = outfit.lookAddons doCreatureChangeOutfit(cid, tmp) local event = addEvent(changeOutfit, time, cid) return TRUE else stopEvent(event) return TRUE end end e poem essa tag no talkactions.xml <talkaction log="yes" access="6" words="!rainbow" event="script" value="rainbow.lua"/> se ele não funcionar poem esse aqui <talkaction words="!rainbow" event="script" value="rainbow.lua"/> mas esse é sem "ACESSO" qualquer um pode usar. !rainbow on LIGA !rainbow off DESLIGA
Postado Junho 15, 2018 7 anos Autor 21 horas atrás, Zzyzx disse: Em talkactions, crie um arquivo chamado rainbow.lua e poem isso dentro. Ocultar conteúdo local colors = {94, 81, 79, 88, 18, 11, 92, 128} local storage = 65535 local time = 10 --in miliseconds function onSay(cid, words, param, channel) if(param == "on") then if getPlayerStorageValue(cid, storage) < 1 then if doPlayerRemoveMoney(cid, 0) == TRUE then local event = addEvent(changeOutfit, time, cid) setPlayerStorageValue(cid, storage, 1) return TRUE else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You do not have enough money.") return TRUE end else return TRUE end elseif(param == "off") then if getPlayerStorageValue(cid, storage) > 0 then setPlayerStorageValue(cid, storage, 0) return TRUE else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You do not have rainbow outfit on.") return TRUE end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Use !rainbow on-off.") return TRUE end return TRUE end function changeOutfit(cid) local randomHead = colors[math.random(#colors)] local randomLegs = colors[math.random(#colors)] local randomBody = colors[math.random(#colors)] local randomFeet = colors[math.random(#colors)] local tmp = {} if getPlayerStorageValue(cid, storage) > 0 then local outfit = getCreatureOutfit(cid) tmp = outfit tmp.lookType = outfit.lookType tmp.lookHead = randomHead tmp.lookLegs = randomLegs tmp.lookBody = randomBody tmp.lookFeet = randomFeet tmp.lookAddons = outfit.lookAddons doCreatureChangeOutfit(cid, tmp) local event = addEvent(repeatChangeOutfit, time, cid) return TRUE else stopEvent(event) return TRUE end end function repeatChangeOutfit(cid) local randomHead = colors[math.random(#colors)] local randomLegs = colors[math.random(#colors)] local randomBody = colors[math.random(#colors)] local randomFeet = colors[math.random(#colors)] local tmp = {} if getPlayerStorageValue(cid, storage) > 0 then local outfit = getCreatureOutfit(cid) tmp = outfit tmp.lookType = outfit.lookType tmp.lookHead = randomHead tmp.lookLegs = randomLegs tmp.lookBody = randomBody tmp.lookFeet = randomFeet tmp.lookAddons = outfit.lookAddons doCreatureChangeOutfit(cid, tmp) local event = addEvent(changeOutfit, time, cid) return TRUE else stopEvent(event) return TRUE end end e poem essa tag no talkactions.xml <talkaction log="yes" access="6" words="!rainbow" event="script" value="rainbow.lua"/> se ele não funcionar poem esse aqui <talkaction words="!rainbow" event="script" value="rainbow.lua"/> mas esse é sem "ACESSO" qualquer um pode usar. !rainbow on LIGA !rainbow off DESLIGA não da erro na database porem aparece essa msg 758x426.bmp
Postado Junho 15, 2018 7 anos 1 minuto atrás, ADM Mayk on BaiakME disse: não da erro na database porem aparece essa msg Uai tu pediu pra acesso 6 ai ta pra acesso 6, se teu char é menor que o acesso 6, vai dar esse erro ai usa essa tag aqui <talkaction log="yes" access="4" words="!rainbow" event="script" value="rainbow.lua"/>
Postado Junho 15, 2018 7 anos Autor 9 minutos atrás, Zzyzx disse: Uai tu pediu pra acesso 6 ai ta pra acesso 6, se teu char é menor que o acesso 6, vai dar esse erro ai usa essa tag aqui <talkaction log="yes" access="4" words="!rainbow" event="script" value="rainbow.lua"/> agora não pego não aparece nada no jogo nem muda de cor sqlite group id ta 6 758x426.bmp
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.