Postado Fevereiro 6, 2018 7 anos Bom dia, tenho um sistema de bike que é possível montar nela e continuar com as cores das outfits dos jogadores. Gostaria de adaptar essa script para que isso aconteça, pois quando o jogador monta na bike a roupa fica branca (cor do looktype "0") function onUse(cid, item, frompos, itemEx, topos) local bike = {lookType = 738, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0} --- Esse vai ser Homen local bike1 = {lookType = 737, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0} --- Esse vai ser mulher local speed = 474 --- Velocidade que a bike terá. if isPlayer(cid) and not isPremium(cid) and premium == true then doTeleportThing(cid, fromPosition, false) doPlayerSendCancel(cid, "Only premium accounts can mount.") return true end if item.uid ~= getPlayerSlotItem(cid, CONST_SLOT_RING).uid then doPlayerSendCancel(cid, "Put in the correct slot.") return true end if getPlayerStorageValue(cid, 17001) == 1 or getPlayerStorageValue(cid, 63215) == 1 or getPlayerStorageValue(cid, 17000) == 1 then doPlayerSendCancel(cid, "Dismount your pokemon to ride.") return true end if getPlayerStorageValue(cid, 32001) == 1 then doRemoveCondition(cid, CONDITION_OUTFIT) doChangeSpeed(cid, -speed) doSendMagicEffect(getPlayerPosition(cid), 18) setPlayerStorageValue(cid, 32001, -1) else if getPlayerSex(cid) == 1 then -- homem doChangeSpeed(cid, speed) doSetCreatureOutfit(cid, bike, -1) doSendMagicEffect(getPlayerPosition(cid), 18) setPlayerStorageValue(cid, 32001, 1) elseif getPlayerSex(cid) == 0 then -- homem doChangeSpeed(cid, speed) doSetCreatureOutfit(cid, bike1, -1) doSendMagicEffect(getPlayerPosition(cid), 18) setPlayerStorageValue(cid, 32001, 1) end end return true end
Postado Fevereiro 6, 2018 7 anos Solução function onUse(cid, item, frompos, itemEx, topos) local bike = {lookType = 738, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet} --- Esse vai ser Homen local bike1 = {lookType = 737, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet} --- Esse vai ser mulher local speed = 474 --- Velocidade que a bike terá. if isPlayer(cid) and not isPremium(cid) and premium == true then doTeleportThing(cid, fromPosition, false) doPlayerSendCancel(cid, "Only premium accounts can mount.") return true end if item.uid ~= getPlayerSlotItem(cid, CONST_SLOT_RING).uid then doPlayerSendCancel(cid, "Put in the correct slot.") return true end if getPlayerStorageValue(cid, 17001) == 1 or getPlayerStorageValue(cid, 63215) == 1 or getPlayerStorageValue(cid, 17000) == 1 then doPlayerSendCancel(cid, "Dismount your pokemon to ride.") return true end if getPlayerStorageValue(cid, 32001) == 1 then doRemoveCondition(cid, CONDITION_OUTFIT) doChangeSpeed(cid, -speed) doSendMagicEffect(getPlayerPosition(cid), 18) setPlayerStorageValue(cid, 32001, -1) else if getPlayerSex(cid) == 1 then -- homem doChangeSpeed(cid, speed) doSetCreatureOutfit(cid, bike, -1) doSendMagicEffect(getPlayerPosition(cid), 18) setPlayerStorageValue(cid, 32001, 1) elseif getPlayerSex(cid) == 0 then -- homem doChangeSpeed(cid, speed) doSetCreatureOutfit(cid, bike1, -1) doSendMagicEffect(getPlayerPosition(cid), 18) setPlayerStorageValue(cid, 32001, 1) end end return true end Te ajudei ?? Que tal fazer uma contribuição ?
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.