Postado Agosto 18, 2017 7 anos local colors = {94, 81, 79, 88, 18, 11, 92, 128} local storage = 65539 local time = 1 --in miliseconds function onEquip(cid, item, slot) if getPlayerStorageValue(cid, storage) < 1 then local event = addEvent(changeOutfit, time, cid) setPlayerStorageValue(cid, storage, 1) return true end return true end function onDeEquip(cid, item, slot) if getPlayerStorageValue(cid, storage) > 0 then setPlayerStorageValue(cid, storage, 0) 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 Te ajudei ?? Que tal fazer uma contribuição ?
Postado Agosto 21, 2017 7 anos Autor Em 18/08/2017 em 16:29, DboExplorer disse: local colors = {94, 81, 79, 88, 18, 11, 92, 128} local storage = 65539 local time = 1 --in miliseconds function onEquip(cid, item, slot) if getPlayerStorageValue(cid, storage) < 1 then local event = addEvent(changeOutfit, time, cid) setPlayerStorageValue(cid, storage, 1) return true end return true end function onDeEquip(cid, item, slot) if getPlayerStorageValue(cid, storage) > 0 then setPlayerStorageValue(cid, storage, 0) 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 Da o mesmo erro no distro quando desloga com o item equipado
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.