Ir para conteúdo

Featured Replies

Postado
  • 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

  • Respostas 14
  • Visualizações 1.1k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • local config = {     wall = {         time = 5,                      --Tempo, em minutos, para a parede reaparecer.         id = xxx,                      --ID da wall.         pos = {x = x, y = y, z

Postado

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
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.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo