function gameinput (sender,obj_id,attachedID)
-----------------------------------------------------------------------------------------------------------------------
  if sender==30 then
    setcurentleaf("keys",16,0);
    ShowMenu(true);
    savegame(SaveLevel());
    if flags.all then
      CreateWindow(150,250,"399",5,nil,250,30);
    return;end;
  return;end;
  if sender==28 then---- объект доехал

    if obj_id==1 then
      if frame==0 then
        MoveObjectX(2,1024,600,2);     
      return;end;  
      if frame==3 then
        SetAlfa(-33,1,0,2.5);
        clear_satelite_leaf("keys");
      return;end;
    return;end;
    if obj_id==2 then
      if frame==0 then
        BlockCursor(false);
        setcolor(1101,1,1,1,1,1);
        speciale_action(2,16);
      return;end;  
    return;end;
  return;end;  
---------------------------------------------------------------------------------------------------------------
        if pause_state then
    if sender==1 or sender==6 or sender==14 then
    pause_state=false;
    --set_visible_object(11111,false);
    end;
  return;end;
    if sender==6 then
        frame=frame+1;
      if frame==1  then           
        set_text(1101,"253"); 
      return;end;
      if frame==2  then           
        set_text(1101,"254"); 
      return;end;
      if frame==3 then 
         MoveObjectY(1,-200,-385,2);
         MoveObjectY(12,610,768,2);
         speciale_action(2,2);
         SetAlfa(16,1,0,0.1);
         setcolor(1101,1,1,1,0,1);  
          SetAlfa(-33,0,1,2.5);
      return;end;      
    return;end;
    

end
