Postado Agosto 27, 2020 4 anos Alguem pode tirar a quantidade que tem q ter pra poder puxar alavanca pf tipo... esse script so teleporta se tiver a quantidade de playes em determinado lugar, que que pudesse para teleporta sem quantidade max. Alguem pode ajudar pf. Gostaria que pudesse puxar com 1 ou ''max'' de plays. local lvl = 500 local entrada = { {x = 154, y = 60, z = 7}, {x = 155, y = 60, z = 7}, {x = 156, y = 60, z = 7}, {x = 157, y = 60, z = 7}, {x = 158, y = 60, z = 7} } local saida = {x = 153, y = 62, z = 7} function onUse(cid, item, fromPosition, itemEx, toPosition) local check = {} for _, k in ipairs(entrada) do local x = getTopCreature(k).uid if(x == 0 or not isPlayer(x) or getPlayerLevel(x) < lvl) then doPlayerSendCancel(cid, 'esta faltando jogador ou alguem nao tem '..lvl..' ou mais.') return true end check[#check+1] = x end for _, pid in pairs(check) do doSendMagicEffect(getPlayerPosition(pid), CONST_ME_POFF) doTeleportThing(pid, saida) doSendMagicEffect(getPlayerPosition(pid), CONST_ME_ENERGYAREA) end doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945) return true end Editado Agosto 27, 2020 4 anos por Doidodepeda (veja o histórico de edições)
Postado Agosto 27, 2020 4 anos local lvl = 500 local entrada = { {x = 154, y = 60, z = 7}, {x = 155, y = 60, z = 7}, {x = 156, y = 60, z = 7}, {x = 157, y = 60, z = 7}, {x = 158, y = 60, z = 7} } local saida = {x = 153, y = 62, z = 7} function onUse(cid, item, fromPosition, itemEx, toPosition) local check = {} for _, k in ipairs(entrada) do local x = getTopCreature(k).uid if isPlayer(x) then if getPlayerLevel(x) > lvl then check[#check+1] = x else doPlayerSendCancel(x, "Você não tem level suficiente.") end end end for _, pid in pairs(check) do doSendMagicEffect(getPlayerPosition(pid), CONST_ME_POFF) doTeleportThing(pid, saida) doSendMagicEffect(getPlayerPosition(pid), CONST_ME_ENERGYAREA) end doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945) return true end Discord: Naze#3578 Ter Linux Dentro de Windows com Acesso 'localhost' para testes e + AutoLoot Otimizado Direto na Source (tfs 0.4/otx) // Pirataria é crime, original é roubo, compartilhar é legal.
Postado Agosto 28, 2020 4 anos Autor 13 horas atrás, Naze disse: local lvl = 500 local entrada = { {x = 154, y = 60, z = 7}, {x = 155, y = 60, z = 7}, {x = 156, y = 60, z = 7}, {x = 157, y = 60, z = 7}, {x = 158, y = 60, z = 7} } local saida = {x = 153, y = 62, z = 7} function onUse(cid, item, fromPosition, itemEx, toPosition) local check = {} for _, k in ipairs(entrada) do local x = getTopCreature(k).uid if isPlayer(x) then if getPlayerLevel(x) > lvl then check[#check+1] = x else doPlayerSendCancel(x, "Você não tem level suficiente.") end end end for _, pid in pairs(check) do doSendMagicEffect(getPlayerPosition(pid), CONST_ME_POFF) doTeleportThing(pid, saida) doSendMagicEffect(getPlayerPosition(pid), CONST_ME_ENERGYAREA) end doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945) return true end Amigo, Fico muito grato por tentar ajudar . ( Nao deu nenhum erro ) Porem não esta puxando o player.
Postado Agosto 28, 2020 4 anos @Doidodepeda local lvl = 500 local entrada = { {x = 154, y = 60, z = 7}, {x = 155, y = 60, z = 7}, {x = 156, y = 60, z = 7}, {x = 157, y = 60, z = 7}, {x = 158, y = 60, z = 7} } local saida = {x = 153, y = 62, z = 7} function onUse(cid, item, fromPosition, itemEx, toPosition) local check = {} for _, k in ipairs(entrada) do local x = getTopCreature(k).uid if (x > 0 and isPlayer(x) and getPlayerLevel(x) >= lvl) then check[#check+1] = x end end for _, pid in pairs(check) do doSendMagicEffect(getPlayerPosition(pid), CONST_ME_POFF) doTeleportThing(pid, saida) doSendMagicEffect(getPlayerPosition(pid), CONST_ME_ENERGYAREA) end doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945) return true end [*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*] DISCORD: vodkart#6090
Postado Agosto 28, 2020 4 anos Autor 2 horas atrás, Vodkart disse: @Doidodepeda local lvl = 500 local entrada = { {x = 154, y = 60, z = 7}, {x = 155, y = 60, z = 7}, {x = 156, y = 60, z = 7}, {x = 157, y = 60, z = 7}, {x = 158, y = 60, z = 7} } local saida = {x = 153, y = 62, z = 7} function onUse(cid, item, fromPosition, itemEx, toPosition) local check = {} for _, k in ipairs(entrada) do local x = getTopCreature(k).uid if (x > 0 and isPlayer(x) and getPlayerLevel(x) >= lvl) then check[#check+1] = x end end for _, pid in pairs(check) do doSendMagicEffect(getPlayerPosition(pid), CONST_ME_POFF) doTeleportThing(pid, saida) doSendMagicEffect(getPlayerPosition(pid), CONST_ME_ENERGYAREA) end doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945) return true end Nenhum ERROR, mas ao puxar a alavanca nao acontece nada !
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.