function Buttons_T(sender,obj_id)
    ButtonTreatment(obj_id,10001,10002,10003,CloseBtnX,CloseBtnY,34,34,sender,"police",false)  
end; 

function gameinput (sender,obj_id,attachedID)  
Buttons_T(sender,obj_id);
CursorTreatment(obj_id,sender,attachedID);
  if sender == 30 then
      DeleteResource("shkaf_police1");
      DeleteResource("shkaf_police");        
      DeleteResource("shkaf_police8");        
      DeleteResource("police0");  
    setcurentleaf("police",4,0);    
    if flags.shkaf_pol_open and not flags.shkaf_pol_openM then
        flags.shkaf_pol_openM=true
        speciale_action(2,51);    
        speciale_action(10,51);
    end;
    Block_Show_Cur(false);
    if flags.shkaf_police then
      flags.help_photo = true;
      if not flags.shkaf_pol_openM then
      speciale_action(2,51);
      end;
      ActivateObject(52,false);
      Set_Anim_Cur(52,3);
      StopEmiter("shkaf_police");
    end;
  return;end;
  
  if sender==50 then
  flags.help_rugjo = true;
      StartTimer(8882,0.5);
      Block_Show_Cur(true);  
  return;end;  
  
  if sender == 1 then

    if obj_id == 8 then
      if obj.fomka ~= nil and attachedID == obj.fomka.id then
        RemObjFromMouse()
        Set_Anim_Cur(8,3)
        speciale_action(2,5,true);
        speciale_action(2,7,true);    
        playeffect("fomka")
        flags.shkaf_pol_open=true;        
        Set_Anim_Cur(obj.phoot.id,4)
      return; end;
      if attachedID~=-1 and ((obj.fomka~=nil and attachedID ~= obj.fomka.id) or (obj.fomka==nil ))  then
        RemObjFromMouse()
        CreatePlashechka(900000,"1000")
      return;end;         
        CreatePlashechka(900000,"123")      
    return; end;

    if obj_id == obj.phoot.id then
        RemObjFromMouse()
        Set_Anim_Cur(obj.phoot.id,3)
        StoreObj(obj.vint.id,obj_id,"49",335,360,"rujjo",317,223,400000)
        flags.shkaf_police = true;
        StopEmiter("rugjo");
        playeffect("gun")        
    return; end;
    
  return ;end;
  
  if sender == 16 then
    if obj_id == 7 then
      speciale_action(2,8);
      speciale_action(2,5);
      speciale_action(2,7,true);
      speciale_action(2,6,true);      
      speciale_action(2,obj.phoot.id,true);           
      Set_Anim_Cur(obj.phoot.id,4);
    return; end;
  return; end;
  

  
  if sender == 36 then

    if obj_id == 8882 then
      Block_Show_Cur(false);
      
      clear_satelite_leaf("police");
    return; end;
  return; end;

end
function SheetSwitched(nCount)
end;