Postado Maio 12, 2015 10 anos Solução local config = { wall = { time = 5, --Tempo, em minutos, para a parede reaparecer. id = xxx, --ID da wall. pos = {x = x, y = y, z = z}, --Posição da wall. }, items = { {{x = x, y = y, z = z}, itemid}, --{{posição que o item deve estar}, itemid}, {{x = x, y = y, z = z}, itemid}, {{x = x, y = y, z = z}, itemid}, {{x = x, y = y, z = z}, itemid}, {{x = x, y = y, z = z}, itemid}, }, } function onUse(cid) local wall = getTileItemById(config.wall.pos, config.wall.id).uid if wall < 1 then return doPlayerSendCancel(cid, "The wall is already openned.") end for _, item in pairs(config.items) do if getTileItemById(item[1], item[2]).uid < 1 then return doPlayerSendCancel(cid, "One or more items are missing or aren't in the correct position.") end end doRemoveItem(wall) addEvent(function() doCreateItem(config.wall.id, 1, config.wall.pos) end, config.wall.time * 60 * 1000) return true end não respondo pms solicitando suporte em programação/scripting
Postado Maio 12, 2015 10 anos Obrigado, mas tenho uma duvida enquanto a instalação, seria feito tudo em actions? Caso puder me passar as tags. Obrigado e rep+ local config = { wall = { time = 5, --Tempo, em minutos, para a parede reaparecer. id = xxx, --ID da wall. pos = {x = x, y = y, z = z}, --Posição da wall. }, items = { {{x = x, y = y, z = z}, itemid}, --{{posição que o item deve estar}, itemid}, {{x = x, y = y, z = z}, itemid}, {{x = x, y = y, z = z}, itemid}, {{x = x, y = y, z = z}, itemid}, {{x = x, y = y, z = z}, itemid}, }, } function onUse(cid) local wall = getTileItemById(config.wall.pos, config.wall.id).uid if wall < 1 then return doPlayerSendCancel(cid, "The wall is already openned.") end for _, item in pairs(config.items) do if getTileItemById(item[1], item[2]).uid < 1 then return doPlayerSendCancel(cid, "One or more items are missing or aren't in the correct position.") end end doRemoveItem(wall) addEvent(function() doCreateItem(config.wall.id, 1, config.wall.pos) end, config.wall.time * 60 * 1000) return true end
Postado Maio 12, 2015 10 anos local config = { wall = { time = 5, --Tempo, em minutos, para a parede reaparecer. id = xxx, --ID da wall. pos = {x = x, y = y, z = z}, --Posição da wall. }, items = { {{x = x, y = y, z = z}, itemid}, --{{posição que o item deve estar}, itemid}, {{x = x, y = y, z = z}, itemid}, {{x = x, y = y, z = z}, itemid}, {{x = x, y = y, z = z}, itemid}, {{x = x, y = y, z = z}, itemid}, }, } function onUse(cid) local wall = getTileItemById(config.wall.pos, config.wall.id).uid if wall < 1 then return doPlayerSendCancel(cid, "The wall is already openned.") end for _, item in pairs(config.items) do if getTileItemById(item[1], item[2]).uid < 1 then return doPlayerSendCancel(cid, "One or more items are missing or aren't in the correct position.") end end doRemoveItem(wall) addEvent(function() doCreateItem(config.wall.id, 1, config.wall.pos) end, config.wall.time * 60 * 1000) return true end Aqui só fala que a entrada está aberta mas não abre nem remove 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.