Postado Janeiro 21, 2018 7 anos Gostaria de mudar para permanecer as cores já selecionadas(as cores que ele está usando na sua outfit) pelo jogador quando montado na bicicleta (meu sprite permite isso) falta ajustar a script. function onUse(cid, item, fromPosition, itemEx, toPosition) local sBike = 2547 local t = { [16689] = {article='a', name='Bike', text='', dtext='', s=9999, condition=bikeCondition}, } function BikeSpeedOn(cid,nSpeed) setPlayerStorageValue(cid,sBike,getCreatureSpeed(cid)) doChangeSpeed(cid,-getCreatureSpeed(cid)) doChangeSpeed(cid,nSpeed) end function BikeSpeedOff(cid) doChangeSpeed(cid,-getCreatureSpeed(cid)) doChangeSpeed(cid,getPlayerStorageValue(cid,sBike)) end local v, r = getCreaturePosition(cid), t[item.itemid] local s = r.s local pos = {x = v.x, y = v.y, z = v.z} if r then if getPlayerStorageValue(cid, 25000) == 5 then return end if getPlayerStorageValue(cid, 23000) == 5 then return end if getPlayerStorageValue(cid, 17001) == 1 or getPlayerStorageValue(cid, 63215) == 1 or getPlayerStorageValue(cid, 17000) == 1 then doPlayerSendCancel(cid, "You can't use bike while ride/fly/surf.") return true end if getPlayerSlotItem(cid, CONST_SLOT_AMMO).uid == item.uid then doPlayerSendCancel("Não está no slot correto") return true end if getPlayerStorageValue(cid, s) <= 0 then doCreatureSay(cid, r.text, 19) setPlayerStorageValue(cid, s, 1) BikeSpeedOn(cid,800) if getPlayerSex(cid) == 1 then doSetCreatureOutfit(cid, {lookType = 2293, lookHead = 0, lookAddons = 0, lookLegs = 0, lookBody = 0, lookFeet = 0}, -1) ---Female else doSetCreatureOutfit(cid, {lookType = 2292, lookHead = 0, lookAddons = 0, lookLegs = 0, lookBody = 0, lookFeet = 0}, -1) --- Male end elseif getPlayerStorageValue(cid, s) == 1 then doCreatureSay(cid, r.dtext, 19) setPlayerStorageValue(cid, s, 0) BikeSpeedOff(cid) return doRemoveCondition(cid, CONDITION_OUTFIT) else return doPlayerSendCancel(cid, 'You can\'t do this.') end else return doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE, 'Report bugs in Bike system.') end end Basicamente só adaptar isso: if getPlayerSex(cid) == 1 then doSetCreatureOutfit(cid, {lookType = 2293, lookHead = 0, lookAddons = 0, lookLegs = 0, lookBody = 0, lookFeet = 0}, -1) ---Female else doSetCreatureOutfit(cid, {lookType = 2292, lookHead = 0, lookAddons = 0, lookLegs = 0, lookBody = 0, lookFeet = 0}, -1) --- Male end
Postado Janeiro 21, 2018 7 anos Eu não entendi muito bem o que você quer. É pra mudar o outfit dele pro outfitID 2292 ou 2293(dependendo do sexo) porém permanecendo com as cores que ele estava antes? Se sim, a sua tag já esttá correta: lookHead = 0, lookAddons = 0, lookLegs = 0, lookBody = 0, lookFeet Att, Grafit.
Postado Janeiro 21, 2018 7 anos Autor @grafit É justamente isso, a cor "0" é a branca no looktype, quero que ela mantenha a que o jogador selecionou, exemplo: ele tem o cabelo vermelho, quando montar na bicicleta não mudar para a cor 0, que é a branca. Entendeu?
Postado Janeiro 21, 2018 7 anos Solução Só mudar o if do teu script pra esse: player_outfit = getCreatureOutfit(cid) if getPlayerSex(cid) == 1 then doSetCreatureOutfit(cid, {lookType = 2293, lookHead = player_outfit.lookHead, lookAddons = 0, lookLegs = player_outfit.lookLegs, lookBody = player_outfit.lookBody, lookFeet = player_outfit.lookFeet}, -1) ---Female else doSetCreatureOutfit(cid, {lookType = 2292, lookHead = player_outfit.lookHead, lookAddons = 0, lookLegs = player_outfit.lookLegs, lookBody = player_outfit.lookBody, lookFeet = player_outfit.lookFeet}, -1) --- Male end
Postado Janeiro 21, 2018 7 anos Em 21/01/2018 em 05:12, grafit disse: Eu não entendi muito bem o que você quer. É pra mudar o outfit dele pro outfitID 2292 ou 2293(dependendo do sexo) porém permanecendo com as cores que ele estava antes? Se sim, a sua tag já esttá correta: lookHead = 0, lookAddons = 0, lookLegs = 0, lookBody = 0, lookFeet Não está correta, se igualar à zero vai deixar a outfit branca no esquema rgb
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.