dofile("script\\gamemenu.lua");
dofile("script\\lib.lua");
set_inpun_fun("gameinput");
location={}
location["kabinet"] = true
location["kabinet"] = {}
location["kabinet"]["id"] = 4
location["kabinet"]["sub_id"] = 0
function LevelComplete()
  DeleteElement("gr",109);
  DeleteElement("gr",66);
  --speciale_action(2,500);
  flags.levelcomplete=true;
    whole_darkness=false;
  DarkScreen(true);
ShowMenu(false)
end;
function LoadingLevel(param)
if flags.levelcomplete then
  delete_tree_leaf("Root","kabinet");-- Добавляет лист в дерево 
  setnextlavel(5);
  loadlavel();
return; end;
SetAlfaValue(503,0);
     SLevel=param;
return;end;
flags={};
flags["comx"]=false;
flags["comx1"]=false;
flags["minicomplete"]=false;
flags["minicomplete1"]=false;
flags["phone"]=false;
flags["all"]=false;
flags["wire"]=false;
flags["skip"]=false;
flags["levelcomplete"]= false;
flags["nohints"]=false;
flags["HintCount"]=5;
frame=0;


add_tree_leaf("Root","kabinet",4,0);-- Добавляет лист в дерево 
  addstaticobjecttogame(877777777,"buttons",114,625,"",60,0,61,61);
  SetCurrentRM("menu");
  AddSheet(1002,"re","red_b",103,656,37,41,"",99,657,650,80,92,21,5,5,0,59,877777777,nil,"buttonsY");
  SetCurrentRM("main");
  loadresource("data\\photoaparat.png","photoaparat",2000029);
loadresource("data\\animationMENU3.png","menuAn",2000030);
AddImgToBook("photoaparat",821,637);
AddHints()
dofile("./data/4/0/res.lua");
ShowMenu(false);
setcurentleaf("kabinet",4,0);
SwitchToSheet("re");
WaitRender()
flags.comx= true;

playfile(".\\sound\\game_theme2.ogg",true,true);
function StartLevel()
  AddParticleToObject(65,"seif",406,240);
  MoveEmiter("seif",406,240);
  AddParticleToObject(40,"tel",335,448);
  MoveEmiter("tel",335,448);
  AddParticleToObject(40,"tel1",379,403);
  MoveEmiter("tel1",379,403);
  if not flags.minicomplete48 then
    if not wire then
      StartEmiter("tel1"); 
    end;
    StartEmiter("tel"); 
  end;
  if not flags.provod then
    StartEmiter("seif"); 
  end;
  DarkScreen(false);
    SetCurrentRM("menu");
    AddImgToBook("photoaparat",821,637);
    AddHints()
  SetCurrentRM("main");
    ShowMenu(true);
end
