Postado Setembro 3, 2018 6 anos Bom galera preciso fazer com que os player não usem um determinado item enquanto estiver no fly como não sei aonde que vai colocar essa script para não usar esse item vo colocar o fly up o fly donw e a propria script desse item MEU SCRIPT DO FLY LOGO AKI EM BAIXO FLY UP Spoiler function onSay(cid, words, param) if param ~= "" then return false end if getPlayerStorageValue(cid, 17000) <= 0 then return true end if getThingPos(cid).z == 0 then doPlayerSendCancel(cid, "You can\'t go higher!") return true end local pos = getThingPos(cid) pos.z = pos.z-1 pos.stackpos = 0 if getTileThingByPos(pos).itemid >= 1 or getTileItemById(getThingPos(cid), 1386).itemid >= 1 then if getTileThingByPos(pos).itemid ~= 460 then doPlayerSendCancel(cid, "You can\'t fly through constructions.") return true end end for x=-1,1 do for y=-1,1 do posa = {x=pos.x+x,y=pos.y+y,z=pos.z} if(getTileThingByPos(posa).itemid == 460) then if(getItemAttribute(getTileThingByPos(posa).uid, "criadopor") == getCreatureName(cid)) then doRemoveItem(getTileThingByPos(posa).uid, 1) end end end end doCombatAreaHealth(cid, 0, pos, 0, 0, 0, CONST_ME_NONE) itemex1 = doCreateItem(460, 1, pos) doItemSetAttribute(itemex1, "criadopor", getCreatureName(cid)) doTeleportThing(cid, pos) if getCreatureOutfit(cid).lookType == 667 or getCreatureOutfit(cid).lookType == 999 then markPosEff(cid, getThingPos(cid)) --edited porygon fly sistem end return true end FLY DOWN Spoiler local lower = {'460', '11675', '11676'} local houses = {'919', '1015', '1590', '1591', '1592', '1593', '1582', '1584', '1586', '1588', '5248', '5189'} function onSay(cid, words, param) if param ~= "" then return false end if getPlayerStorageValue(cid, 17000) <= 0 then return true end if getThingPos(cid).z == 7 then doPlayerSendCancel(cid, "You can\'t go lower!") return true end if getTileInfo(getThingPos(cid)).itemid == 11677 then doPlayerSendCancel(cid, "Sorry, it's not possible to go lower.") return true end if not isInArray(lower, getTileInfo(getThingPos(cid)).itemid) and getTileInfo(getThingPos(cid)).itemid >= 2 then doPlayerSendCancel(cid, "You can\'t go lower.") return true end local pos = getThingPos(cid) pos.z = pos.z+1 pos.stackpos = 0 if getTileThingByPos(pos).itemid >= 1 then if getTilePzInfo(pos) == true then doPlayerSendCancel(cid, "You can\'t go down here.") return true end if not canWalkOnPos(pos, true, true, false, false, true) then doPlayerSendCancel(cid, "You can't go down here.") return true end doTeleportThing(cid, pos) if getCreatureOutfit(cid).lookType == 667 or getCreatureOutfit(cid).lookType == 999 then markPosEff(cid, getThingPos(cid)) end else for x=-1,1 do for y=-1,1 do posa = {x=pos.x+x,y=pos.y+y,z=pos.z} if isInArray(lower, getTileThingByPos(posa).itemid) then if(getTileThingByPos(posa).itemid == 460) then if(getItemAttribute(getTileThingByPos(posa).uid, "criadopor") == getCreatureName(cid)) then doRemoveItem(getTileThingByPos(posa).uid, 1) end end end end end doCombatAreaHealth(cid, 0, pos, 0, 0, 0, CONST_ME_NONE) itemex1 = doCreateItem(460, 1, pos) doItemSetAttribute(itemex1, "criadopor", getCreatureName(cid)) doTeleportThing(cid, pos) if getCreatureOutfit(cid).lookType == 667 or getCreatureOutfit(cid).lookType == 999 then markPosEff(cid, getThingPos(cid)) --edited porygon fly sistem end return true end return true end script do item ID DO ITEM E >>> 13629 Spoiler local looktype = 3025 -- looktype da outfit. function onUse(cid, item, frompos, item2, topos) if getCreatureOutfit (cid).lookType ~= looktype then doSetCreatureOutfit (cid, {lookType = looktype}, -1) else doPlayerSendTextMessage (cid, 19, "Você já está utilizando esta roupa!") end return true end FLY Q ESTA NO MOVIMENTES Spoiler local del = {'460', '1022', '1023', '11675', '11676', '11677'} local updown = {'1', '3'} function onStepIn(cid, item, frompos, item2, topos) if getPlayerStorageValue(cid, 17000) <= 0 then doTeleportThing(cid, topos, false) if(getItemAttribute(getTileThingByPos(posa).uid, "criadopor") == getCreatureName(cid)) then doRemoveItem(getTileThingByPos(frompos).uid, 1) end if isPlayer(cid) then doPlayerSendCancel(cid, "You can't fly.") end return true end if getPlayerStorageValue(cid, 17000) >= 1 then if topos.z == frompos.z then if getCreatureOutfit(cid).lookType == 316 then effect = 136 else effect = 2 end doSendMagicEffect(topos, effect) end end for x=-1,1 do for y=-1,1 do posa = {x=topos.x+x,y=topos.y+y,z=topos.z} if isInArray(del, getTileThingByPos(posa).itemid) then if(getTileThingByPos(posa).itemid == 460) then if(getItemAttribute(getTileThingByPos(posa).uid, "criadopor") == getCreatureName(cid)) then doRemoveItem(getTileThingByPos(posa).uid, 1) end else doRemoveItem(getTileThingByPos(posa).uid, 1) end end end end for x=-1,1 do for y=-1,1 do pose = {x=frompos.x+x,y=frompos.y+y,z=frompos.z} if getTileThingByPos(pose).itemid == 0 then doCombatAreaHealth(cid, 0, pose, 0, 0, 0, CONST_ME_NONE) itemex = doCreateItem(460, 1, pose) doItemSetAttribute(itemex, "criadopor", getCreatureName(cid)) end end end doCombatAreaHealth(cid, 0, topos, 0, 0, 0, CONST_ME_NONE) if getTileThingByPos(frompos).itemid == 0 then itemex1 = doCreateItem(460, 1, frompos) doItemSetAttribute(itemex1, "criadopor", getCreatureName(cid)) end return true end tipo quando o player for usar esse item aparecer uma msg Voce não pode usar esse item enquanto estiver no fly algo do tipo tem como ajudar.. Editado Setembro 3, 2018 6 anos por iury alves potter (veja o histórico de edições)
Postado Setembro 4, 2018 6 anos Solução @iury alves potter Spoiler local looktype = 3025 -- looktype da outfit. function onUse(cid, item, frompos, item2, topos) if getPlayerStorageValue(cid, 17000) < 1 then if getCreatureOutfit (cid).lookType ~= looktype then doSetCreatureOutfit (cid, {lookType = looktype}, -1) else doPlayerSendTextMessage (cid, 19, "Você já está utilizando esta roupa!") end else doPlayerSendTextMessage (cid, 19, "Você não pode usar esse outfit em quanto estiver no fly.") end return true end
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.