loadresource("data\\10\\3\\0002.png","auto2",2);
loadresource("data\\10\\3\\auto_big.png","auto_big",3);
loadresource("data\\10\\3\\0008.jpg","auto8",8);

--set_activ_free_leaf("auto");
AddObjForCur()


addstaticobjecttogame(22,"auto_big",523,338,"",0+543,3,57,230);
addstaticobjecttogame(21,"auto_big",511,218,"",556,312,184,129);
addstaticobjecttogame(20,"auto_big",507,164,"",201+543,3,76,226);
speciale_action(2,20);
speciale_action(2,21);
speciale_action(2,22);
count_act=0

addstaticobjecttogame(2,"auto2",313,61 ,""); --рамка
CloseBtnX,CloseBtnY=Coords(2)

SetFlagsForSatButtons()

CloseWidth=34
CloseHeight=34

Activ={
500,290,
625,290,
625,440,
500,440
}

CreateCloseBtn(CloseBtnX,CloseBtnY);


addstaticobjecttogame(3,"auto_big",572,355,"",687,491,24,24); --вкр
addstaticobjecttogame(31,"auto_big",544,411,"",687,491,24,24); --вкр
addstaticobjecttogame(32,"auto_big",562,319,"",687,491,24,24); --вкр
speciale_action(2,3);
speciale_action(2,31);
speciale_action(2,32);

sdv1x=561-523
sdv1y=355-339

sdv2x=561-518
sdv2y=355-255

sdv3x=561-507
sdv3y=355-164



addactivobjecttogame(4,"auto_big",561,355,"","",0,0,619,491,33,30); --торч
addactivobjecttogame(41,"auto_big",532,408,"","",0,0,619,491,33,30); --торч
addactivobjecttogame(42,"auto_big",555,318,"","",0,0,619,491,33,30); --торч
set_pixel_check(4,false);
set_pixel_check(41,false);
set_pixel_check(42,false);
speciale_action(2,4);
speciale_action(2,41);
speciale_action(2,42);
addactivobjecttogame(5,"auto_big",548,316,"","",0,0,723,490,46,116); --дырк
CreatePolygon(5,4,"Activ")
speciale_action(2,5);
addstaticobjecttogame(6,"auto_big",321,68 ,"",0,490,591,493); --с колесом
speciale_action(2,6);
addactivobjecttogame(7,"auto_big",369,68 ,"","",0,0,0,0,543,490); --без колеса
Set_Anim_Cur(7,4);
addstaticobjecttogame(8,"auto8",321,68 ,"",0,0,591,490); --бг

if flags.is_coleso then
  speciale_action(2,6);
  speciale_action(2,5);
  speciale_action(2,7);
end;

if flags.is_bolts then
  speciale_action(2,4);
    speciale_action(2,41);
    speciale_action(2,42);  
  speciale_action(2,5);
end;

  if s_obj>0 then
  AddObjToMouse(s_obj)
  s_obj=0
  end;

WaitRender();