local function onCloseDoor(id, pos)
if getTileItemById(pos, id).uid > 0 then
doTransformItem(getTileItemById(pos, id).uid, id -1)
end
end
addEvent(onCloseDoor, 10 * 1000, doors[item.itemid], toPosition)
if(isInArray(keys, item.itemid)) then
if(itemEx.actionid > 0) then
if(item.actionid == itemEx.actionid and doors[itemEx.itemid] ~= nil) then
doTransformItem(itemEx.uid, doors[itemEx.itemid])
return true
end
doPlayerSendCancel(cid, "The key does not match.")
return true
end
return false
end
addEvent(onCloseDoor, 10 * 1000, doors[itemEx.itemid], toPosition)
local function onCloseDoor(id, pos)
if getTileItemById(pos, id).uid > 0 then
doTransformItem(getTileItemById(pos, id).uid, id -1)
end
end